# Sh kb prompt injection

> Sh kb prompt injection is an open-source agent skill for knowledge and memory. Gives your agent a security knowledge base for hunting prompt injection in LLM apps. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/dmdhrumilmistry/indra/tree/main/plugins/indra/skills/sh-kb-prompt-injection
- **Repository:** https://github.com/dmdhrumilmistry/indra
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** sh-kb-prompt-injection
- **Collection:** https://github.com/dmdhrumilmistry/indra
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This skill turns an agent into a reviewer for applications that send untrusted text to a language model. It explains the main classes of LLM application flaws, including direct and indirect prompt injection, excessive agency and confused-deputy tool use, system prompt and secret leakage, unsafe handling of model output, and retrieval isolation gaps across tenants.

The guidance is structured as a hunting method. The agent is told to map which model roles carry untrusted input, list the tools a model can call and whose credentials they use, and check whether authorization is enforced in the tool handler rather than in the prompt. It also offers grep-style sink patterns for common SDKs, agent frameworks, MCP servers and output renderers, plus a set of false-positive filters so that findings need a concrete capability and a missing control behind them.

The skill is a single SKILL.md with no bundled scripts. It is written for code review and security testing, and it expects the agent to read the target codebase with its own file tools. Findings are mapped to CWE and OWASP LLM categories, with a severity scale and mitigation guidance.

## When your agent uses it

> Knowledge base for finding LLM application flaws - direct and indirect prompt injection, excessive agency and confused-deputy tool use, system prompt and secret leakage, unsafe handling of model output, RAG tenant isolation gaps, and untrusted MCP servers. Use when hunting prompt injection or reviewing code that sends untrusted text to a model that has tools or data access. CWE-1427, CWE-77, CWE-94, OWASP Top 10 for LLM Applications (Prompt Injection, Excessive Agency, Improper Output Handling, System Prompt Leakage).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-prompt-injection)
- [License: MIT](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-prompt-injection)

## Features

- **Injection flow mapping:** Guides tracing which model inputs come from untrusted sources such as pages, documents and tool results.
- **Tool blast-radius review:** Helps assess what each callable tool can do, under whose credentials, and whether approval is enforced.
- **Exfiltration path test:** Describes checking whether private data, untrusted content and an outbound channel coexist in one session.
- **Output sink patterns:** Lists grep targets for risky handling of model output such as HTML rendering, shell, SQL and eval.
- **RAG tenant isolation checks:** Covers verifying that retrieval filters respect tenant or user boundaries and resist stored injection.
- **MCP trust review:** Outlines checks on MCP server provenance, tool descriptions, results and auto-approval settings.
- **Severity and CWE mapping:** Maps findings to CWE and OWASP LLM categories with a severity scale and mitigation advice.

## Good for

- Review a chat app's code for prompt injection risks before release
- Check whether an agent's tools can leak private data through untrusted content
- Audit how model output is rendered in a web interface for XSS risk
- Assess tenant isolation in a RAG pipeline that uses a vector store
- Evaluate an MCP server configuration for untrusted tool descriptions

## Install

### Claude Code

This skill ships in the `indra` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra
```

Or copy only this skill to `~/.claude/skills/sh-kb-prompt-injection`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sh-kb-prompt-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-prompt-injection" ~/.claude/skills/sh-kb-prompt-injection &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sh-kb-prompt-injection` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sh-kb-prompt-injection` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sh-kb-prompt-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-prompt-injection" ~/.agents/skills/sh-kb-prompt-injection &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sh-kb-prompt-injection` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sh-kb-prompt-injection` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sh-kb-prompt-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-prompt-injection" ~/.cursor/skills/sh-kb-prompt-injection &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sh-kb-prompt-injection` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/dmdhrumilmistry/indra.git --path plugins/indra/skills/sh-kb-prompt-injection
```

Or copy the folder to `~/.gemini/skills/sh-kb-prompt-injection` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sh-kb-prompt-injection`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sh-kb-prompt-injection &&
cp -R "$tmp/plugins/indra/skills/sh-kb-prompt-injection" ~/.copilot/skills/sh-kb-prompt-injection &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sh-kb-prompt-injection` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git
```

Then copy `indra/plugins/indra/skills/sh-kb-prompt-injection` into your agent's skills folder as `sh-kb-prompt-injection`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Sh kb prompt injection need to run?

It is a single SKILL.md with no scripts or bundled files. It relies on the agent reading the codebase it is reviewing.

### When does the agent use Sh kb prompt injection?

When hunting prompt injection or reviewing code that sends untrusted text to a model with tools or data access.

### Does Sh kb prompt injection change any code?

No. It provides knowledge and a review method; it does not describe automated edits or fixes.

### Which standards does Sh kb prompt injection reference?

It cites CWE-1427, CWE-77, CWE-94, CWE-441 and CWE-200, and the OWASP Top 10 for LLM Applications categories.

### How do I install Sh kb prompt injection in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sh-kb-prompt-injection to use it in all your projects, or to .claude/skills/sh-kb-prompt-injection in one project. Or install the indra plugin, which includes it: /plugin marketplace add dmdhrumilmistry/indra, then /plugin install indra@indra.

### Does Sh kb prompt injection run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Sh kb prompt injection?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Sh kb prompt injection?

The closest alternatives to Sh kb prompt injection are Agentic safety audit, Sh kb injection, Skill scanner, Security and hardening and Sh kb sqli.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Agentic safety audit](https://ai-powered.com/skills/agentic-safety-audit): Agentic safety audit is an open-source agent skill for security.
- [Sh kb injection](https://ai-powered.com/skills/sh-kb-injection): Sh kb injection is an open-source agent skill for security.
- [Skill scanner](https://ai-powered.com/skills/skill-scanner): Skill scanner is an open-source agent skill for security.
- [Security and hardening](https://ai-powered.com/skills/security-and-hardening): Security and hardening is an open-source agent skill for security.
- [Sh kb sqli](https://ai-powered.com/skills/sh-kb-sqli): Sh kb sqli is an open-source agent skill for security.
- [AI threat testing](https://ai-powered.com/skills/ai-threat-testing): AI threat testing is an open-source agent skill for security.
- [Sh kb xss](https://ai-powered.com/skills/sh-kb-xss): Sh kb xss is an open-source agent skill for security.
- [AI prompt engineering safety review](https://ai-powered.com/skills/ai-prompt-engineering-safety-review): AI prompt engineering safety review is an open-source agent skill for ai models and llm tooling.

---
Source: https://ai-powered.com/skills/sh-kb-prompt-injection
