Neural Claude Code
Lightweight harness for Claude Code. Security hooks, dev pipeline, smart defaults.
curl -fsSL https://raw.githubusercontent.com/brolag/neural-claude-code/main/install.sh | bash
The Problem
Every Claude Code session runs without guardrails. No security hooks. No structured workflow. No token optimization. Your CLAUDE.md is either too long (burning tokens) or too short (missing conventions).
The Solution
A lightweight starter kit that gives you production-grade guardrails in one command:
v1 (150+ files, ~4300 tokens/msg): Commands, TTS, squads, custom memory...
v2 (~635 tokens/msg): Hooks + skills + rules. That's it.
What's Inside
Security Hooks (zero token cost)
Hooks run as bash scripts outside the context window. They enforce behavior without burning a single token.
| Hook | What it does |
|---|
dangerous-actions-blocker | Blocks rm -rf /, force push to main, DROP TABLE, package publish |
prompt-injection-detector | Blocks "ignore previous instructions", jailbreak attempts |
output-scanner | Warns when API keys, tokens, or private keys appear in output |
sensitive-file-guard | Blocks read/write access to .env, credentials, SSH keys |
pre-compact | Saves git state and active plans before context compaction |
Skills (on-demand, zero tokens when idle)
Skills only load into context when you invoke them. No overhead otherwise.
| Skill | What it does |
|---|
/init | Scans your project and generates a customized CLAUDE.md |
/discover | Surfaces unknown-unknowns before you plan. Blindspot pass, four quadrants, interview. Hands off to /spec |
/spec | Plans a non-trivial change into an approvable artifact (signatures, CWE invariants, executable acceptance). Stops for review; writes no code |
/craft | Builds an approved /spec plan: baseline, execute, review, measure, stop for ship |
/vet | Clean-context review gate. A fresh independent reviewer challenges the diff (correctness, acceptance, consistency, slop). Verdict SHIP/HOLD/BLOCK |
/exercise | Behavioral gate: runs tests, then drives the running app as a real user. Reports PASS/FAIL with evidence |
/git-save | Conventional commits workflow with safety checks |
/slop-scan | Detects AI slop, tech debt, dead code (default: recent changes only) |
/html | On-demand PlanViewer / ResultViewer. /spec and /discover write Markdown only |
Everything runs on vanilla Claude Code (the Agent tool + native tools). No second model, local LLM,
or extra subscription is required. Optional enhancements (a second model via the Codex CLI for /vet,
browser/computer-use MCP for /exercise) are auto-detected and never assumed.
Pipeline skills (/discover, /spec, /craft, /vet, /exercise) are the Claude Code port of
neural-codex. Same contracts: unknowns map, locked signatures,
independent review, evidence-backed exercise. Slash invocation and Agent as the default reviewer.
Compact Rules (~135 tokens total)
Each rule is 1-2 lines. Maximum signal, minimum tokens.
| Rule | What it enforces |
|---|
verify-first | Check before assuming. Local files, then docs, then act. |
scope-lock | Do exactly what was asked. Don't expand scope. |
test-then-ship | Tests pass, types clean, lint clean before commit. |
no-slop | No dead code, no over-abstraction, no vague TODOs. |
git-discipline | Feature branches, conventional commits, never force-push main. |
Token Budget
Per-message overhead: ~635 tokens
CLAUDE.md template: ~300 tokens (30 lines)
5 compact rules: ~135 tokens (3 lines each)
Auto-memory index: ~200 tokens
Compare: typical unoptimized setup = 3000-5000 tokens/message
Design Principle: Hooks Enforce, Rules Guide
If behavior can be enforced with a hook (0 tokens), don't write a rule for it.
Rules are for guidance that requires judgment. Hooks are for hard constraints.
Quick Start
# 1. Install (one command) — or install as a plugin (see "Install as a Plugin" below)
curl -fsSL https://raw.githubusercontent.com/brolag/neural-claude-code/main/install.sh | bash