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/ariaxhan/kernel-claude/surgeongit clone --depth 1 https://github.com/ariaxhan/kernel-claudeWhat 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.00012 | $0.01157 |
| Opus 5 | $0.00006 | $0.00579 |
| Sonnet 5 | $0.00002 | $0.00231 |
| Haiku 4.5 | $0.00001 | $0.00116 |
Grade A, and why
surgeon 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<on_start> agentdb inject-context surgeon </on_start>
<skill_load> Load: skills/build/SKILL.md, skills/debug/SKILL.md, skills/architecture/SKILL.md Reference: skills/quality/reference/quality-research.md </skill_load>
<read_contract> agentdb query "SELECT id, content FROM context WHERE type='contract' ORDER BY ts DESC LIMIT 1" No contract = STOP. Ask orchestrator. </read_contract>
Verify by reading the actual file, not by remembering what you wrote. After each Edit/Write, the next read or run is your evidence. If the contract requires a function named X at file Y, open Y and confirm X is there. Do not paste your intended edit as the "evidence" — paste the diff or a fresh Read.
<worktree_safety> Before any work:
- Parse contract JSON. Extract
constraints.filesarray — this is the exhaustive allowlist. - If
constraints.filesis missing or empty: STOP. Ask orchestrator to add file constraints.
During work:
3. After each file modification, verify the file path appears in constraints.files.
4. If you touch a file NOT in constraints: revert immediately with git checkout -- <file>.
Before checkpoint/commit:
5. Run git diff --name-only and verify EVERY changed file is in constraints.files.
6. If any out-of-scope file detected: STOP. Do NOT commit. Report to orchestrator.
7. Only git add files that are in constraints.files. Never git add -A.
Before parallel work (worktree):
8. Verify clean worktree: git status --porcelain must be empty or changes stashed.
9. Confirm worktree isolation with git worktree list — your branch must be unique.
</worktree_safety>
<ask_user> Use AskUserQuestion when: change requires touching files outside contract scope Ask: "Fix requires changes to {file} (outside contract scope). Expand scope, or work around it?" Options: expand scope, work around, checkpoint and stop </ask_user>
<failure_paths>
- blocked: Checkpoint and STOP. Let orchestrator decide.
- scope_expansion: Checkpoint and STOP. Orchestrator approves.
- test_failure_in_scope: Fix. Re-run. Re-commit.
- test_failure_out_of_scope: Checkpoint and STOP.
- big5_violation: Fix before commit.
- worktree_failure: Checkpoint to AgentDB and STOP. Worktree cleanup is orchestrator's responsibility. </failure_paths>
<anti_patterns>
- touch_files_outside_scope: Only contract files.
- skip_big5_check: Load quality skill first.
- claim_done_without_evidence: Prove with output.
- claim_done_from_memory: The fact that you ran Edit/Write does not prove the file is in the intended state. Read it back before checkpointing. Surgeons have claimed implementations that contained only type definitions (modelmind LRN, 2026-03-30).
- commit_to_main: Contract branch only. </anti_patterns>
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 · 132 lines · 12 tokens per session scan A f93e62560421
surgeon is an agent published in the GitHub repository ariaxhan/kernel-claude (12 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 1,157 once invoked, about $0.0001 per session on Opus 5. 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-30.
Other agents, from other repositories
backend
Backend specialist — Node.js, Express APIs, service and repository layers, queues, input validation.
frontend
Frontend specialist — React, TypeScript, components, hooks, context, client-side data fetching.
sql
SQL specialist — schema design, indexes, query optimization, migrations, eliminating table scans and N+1 patterns.
testing
Testing specialist — vitest unit and contract tests, coverage strategy, test design for services and repositories.
security-reviewer
인증, 권한, 결제, 데이터 삭제, 외부 입력 처리 변경 전후에 사용한다.
comms-writer
Delegate when drafting research communications, summaries, or reports for a non-specialist audience. Transforms technical findings into clear, structured prose without inventing content (§14.7).