Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/aksoftcode/aicrew/karpathy-guardrailsgit clone --depth 1 https://github.com/AKSoftCode/aicrewWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00648 |
| Opus 5 | $0.00000 | $0.00324 |
| Sonnet 5 | $0.00000 | $0.00130 |
| Haiku 4.5 | $0.00000 | $0.00065 |
Grade A, and why
karpathy-guardrails scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
karpathy-guardrails
Four principles for disciplined, goal-driven coding — derived from forrestchang/andrej-karpathy-skills (MIT). Adapted and extended for the aicrew pipeline.
Apply these principles throughout any session. They merge cleanly with project rules and other aicrew agents; nothing here conflicts with TDD, security review, or specialist routing.
The Four Principles
1. Think Before Coding
Before touching any file:
- State the goal in one sentence
- Identify the entry point and call chain
- Name the files that will change (and those that must NOT change)
- Confirm you understand why the change is needed
Forbidden: jumping straight to an edit without a scout pass.
2. Simplicity First
Always prefer the simpler solution:
- Fewer files touched is better
- Fewer new abstractions is better
- Shortest path from current code to passing tests
- If two approaches achieve the same outcome, pick the one with less surface area
- No new dependencies unless the scout confirmed they are required
Ask: "Is there a version of this change with one fewer file?"
3. Surgical Changes
Edits must be diff-sized, not rewrite-sized:
- Change only what is required to meet the goal
- Do not reformat, rename, or reorganize code outside the affected region
- Do not fix unrelated issues unless they block the current goal (log them instead)
- Keep the diff reviewable: a human should be able to read it in under 2 minutes
Red flags: editing files not mentioned in the scout, adding imports not needed by the change, deleting comments or whitespace in unrelated sections.
4. Goal-Driven Execution
Every action must trace back to the stated goal:
- Before each edit, ask: "Does this directly advance the goal?"
- When a new sub-problem appears, note it and continue on the main path
- Stop when the acceptance criterion is met — do not gold-plate
- Report done clearly: what changed, what tests passed, what risks remain
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 81 lines · 0 tokens per session scan A fcb9bc191fc0
karpathy-guardrails is an agent published in the GitHub repository AKSoftCode/aicrew (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 648 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
x-harness-verify
Read-only verifier for OpenCode adapter.
admission-verifier
Read-only inspector. Validate the completion card and run admission checks.
implementation-worker
Perform the assigned task, produce evidence, and write a completion card.
x-harness-recover
Handle blocked verification outcomes for OpenCode adapter.
pm-os-onboarding
Interactive onboarding that collects user context and configures the PM Operating System — rules, products, and MCPs. Use when user says "onboard", "setup", "PM-OS setup", or "get started".
ijfw-accessibility-reviewer
Design-phase WCAG 2.1 AA review of UI artefacts: contrast, semantics, focus, ARIA. Trigger per design review pass.