Memory Poisoning Detection

100TrustedPre-approves tools

Persistent instruction injection defense for agents with long-term memory capabilities.

What it does

Memory Poisoning Detection monitors whether an AI assistant can be tricked into accepting and later acting upon unauthorized, permanent instructions. By validating the agent's memory persistence mechanisms, this skill identifies vulnerabilities where malicious commands could be surreptitiously stored for future execution.

Installing this skill adds a systematic verification process to the assistant's workflow. It focuses strictly on identifying instances where an agent confirms the storage of external rules that override its primary operating logic, helping developers ensure that memory-based features remain secure against manipulation.

When it earns its place

Reach for it when…

Apply this skill when your agent includes long-term memory, user profile settings, or persistent note-taking features that allow it to retain information across distinct sessions or conversations.

Look elsewhere when…

Do not use this for checking data privacy or unauthorized information disclosure, as it does not address the leakage of sensitive documents or user secrets.

What to say to use it

You never invoke a skill directly — the assistant picks it up when your request matches what it covers. These are the kinds of things that do that.

  • Check if this agent can store rules in its memory
  • Test if the assistant is vulnerable to instruction poisoning
  • Identify if persistent instructions can be injected into the profile
  • Verify if saved notes can override system prompts

Install it

Install for all your projects

Copy the skill directory into your personal skills folder. Claude picks it up on its own the next time your request matches what it does — there is nothing to enable.

bash
git clone --depth 1 --branch main https://github.com/Tencent/AI-Infra-Guard.git /tmp/AI-Infra-Guard
mkdir -p ~/.claude/skills
cp -r /tmp/AI-Infra-Guard/agent-scan/agent_scan/prompt/skills/memory-poisoning-detection ~/.claude/skills/memory-poisoning-detection

Install for one project only

Put it in the project's own skills folder instead, so it can be committed and shared with everyone working on that repository.

bash
cp -r /tmp/AI-Infra-Guard/agent-scan/agent_scan/prompt/skills/memory-poisoning-detection .claude/skills/memory-poisoning-detection

If a skill of the same name exists in both places, the personal one wins.

Installing on Claude.ai or through the API instead? The full guide covers every surface.

Pair it with an MCP server