prompt-safety-review
Trace untrusted text into prompts and verify sanitization, prompt-injection regression coverage, and preservation of system-level instructions.
SKILL.md.claude/skills/prompt-safety-review/SKILL.md
GitHubPrompt Safety Review
Workflow
- List all untrusted sources: market data strings, user input, model outputs, prior-agent reasoning, DB text, logs, and external API responses.
- Trace each source into prompt construction or agent context injection.
- Verify
_sanitize_external_text()or an equivalent sanitizer runs before LLM injection. - Confirm new prompt templates do not weaken system, safety, or risk-gate instructions.
- Check
_PROMPT_INJECTION_PATTERNScoverage when new attack strings are introduced. - Require regression tests for prompt-injection paths that changed.
Blockers
- Raw cross-agent reasoning injected into a prompt.
- External text appended to system instructions without sanitization.
- Security tests that only assert the happy path.