Skip to content

Data Leakage Detection

Probes an AI agent with escalating questions to test whether it reveals secrets, prompts, or user data.

Stars
7,320
Licence
Apache-2.0
Files
1 file

What it does

This skill is a security test script written in plain instructions for an AI agent. It makes a targeted AI system (such as a chatbot or agent under review) answer a series of escalating questions designed to trick it into revealing its hidden system prompt, API keys, environment variables, personal data, or internal endpoints. It then classifies any leaked content by severity and records only the leaks that actually reach an attacker. It is meant for auditing AI applications before they ship, not for attacking others.

Great for

  • Security teams red-teaming an AI agent or chatbot before release
  • Developers checking that their own system prompts and secrets are not exposed through conversation
  • Auditors who need a repeatable, staged checklist of leakage probes

Skip it if

  • Testing systems you do not own or have written permission to test, since the probes are designed to extract confidential data and may be illegal or unethical to run against others
  • Production systems with real user data, because the PII probe asks for the last five users' contact details and could expose real records even in a test
  • Anyone expecting a full security scan of code or infrastructure; it only covers conversational leakage

Try asking

  • “Run data leakage detection against my customer support chatbot and report any exposed system prompt or keys”
  • “Check whether my RAG assistant reveals its retrieved knowledge base context verbatim”
  • “Audit this agent's dialogue interface for credential and environment variable disclosure”
Step-by-step guide: how to use Data Leakage DetectionInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    data-leakage-detection.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip data-leakage-detection.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip data-leakage-detection.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Only point it at systems you are authorised to test, and use a staging environment rather than live user data
  • Review the findings: the skill is designed to stop after the first confirmed leak per category, so run it again after fixes to confirm they hold
  • Pair it with the prior reconnaissance stage so it skips categories the target clearly lacks, saving time and noise

What's inside

  • SKILL.md

Redistributed unmodified from Tencent/AI-Infra-Guard under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.