RubiDan

Prompt Security Agent — Security skill for Claude Code

Security community

A small multi-agent system, built with LangChain and Claude, that acts as a security gatekeeper for user prompts.

How to install Prompt Security Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open RubiDan/Prompt-Security-Agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Prompt Security Agent does

A small multi-agent system, built with LangChain and Claude, that acts as a security gatekeeper for user prompts. Before a prompt reaches an AI application, the system checks it for jailbreak attempts and leaked or requested secrets, then returns a clear **SAFE** or **BLOCKED** verdict with the reason. This is a proof of concept .

Alternatives in Security

  • FastAPI Review — Review a FastAPI application for architecture, async correctness, dependency injection, Pydantic schemas, secu 243.5k ★
  • Cybersecurity Roadmap — Skills and career roadmap for various security roles like application security, cloud security, DevSecOps, sec 509 ★
  • Agent Skills Guard — 一款提供Agent Skills安全扫描和可视化管理的桌面应用 A desktop application that provides security scanning and visual management fo 389 ★

README

Prompt Security Agent

A small multi-agent system, built with LangChain and Claude, that acts as a security gatekeeper for user prompts. Before a prompt reaches an AI application, the system checks it for jailbreak attempts and leaked or requested secrets, then returns a clear **SAFE** or **BLOCKED** verdict with the reason.

This is a proof of concept .

How it works

User prompt
    |
    v
Supervisor agent (agent.py)
    |-- calls --> Jailbreak specialist agent  --> "CLEAN" or "THREAT: ..."
    |-- calls --> Secrets specialist agent    --> "CLEAN" or "THREAT: ..."
    v
Final verdict: "SAFE: ..." or "BLOCKED: "
  • Supervisor agent (agent.py): a tool-calling agent that always runs both specialists on the full prompt, then decides. If either reports a threat, it blocks. Otherwise it marks the prompt safe.
  • Jailbreak specialist (tools.py): its own LLM agent that detects jailbreaks and prompt injection by meaning, including paraphrased attacks that keyword lists miss.
  • Secrets specialist (tools.py): its own LLM agent that detects API keys, passwords, private keys and credit card numbers in the text. It also flags attempts to extract such secrets from the AI.
  • CLI (main.py): a simple loop that reads a prompt and prints the verdict.

Each specialist is wrapped with LangChain's `@tool` decorator, so the supervisor calls it like any other tool. The console prints a line such as `[agent] jailbreak specialist is running...` whenever one runs.

Security design choices

  • Untrusted input: every agent is told that the analyzed text is data, never instructions, to resist prompt injection against the gatekeeper itself.
  • Narrow specialists: each specialist has one job and no tools of its own, which limits what a malicious prompt can make it do.
  • Always run both checks: the supervisor never skips a specialist, so a prompt cannot avoid one check by looking harmless to the other.