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.
git clone --depth 1 https://github.com/ariaxhan/kernel-claudeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/ariaxhan/kernel-claude/surgeon)<a href="https://agentmods.dev/agents/ariaxhan/kernel-claude/surgeon"><img src="https://agentmods.dev/badge/agents/ariaxhan/kernel-claude/surgeon/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/ariaxhan/kernel-claude/surgeon"><img src="https://agentmods.dev/badge/agents/ariaxhan/kernel-claude/surgeon.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00012 | $0.01085 |
| Opus 5.5 | $0.00005 | $0.00434 |
| Sonnet 5.5 | $0.00002 | $0.00217 |
| Haiku 4.5 | $0.00001 | $0.00109 |
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 2mo 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 — 128 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.
<scope_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.
Parallel work shares the live checkout: other lanes' dirty files are not yours. Never stash, revert or stage them; never create a worktree to avoid them. </scope_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. </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>
<on_end> agentdb write-end '{"agent":"surgeon","contract":"ID","files":[...],"commits":[...],"big5":"pass"}' Surface to GitHub: if github-oss/production profile and issue exists, post completion summary as issue comment and close issue. </on_end>
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.
- 2mo ago Changed · -4 lines 8385364cbf03
- 3mo ago First seen · 132 lines · 12 tokens per session scan A f93e62560421
surgeon is an agent published in the GitHub repository ariaxhan/kernel-claude (16 stars, last pushed yesterday), licensed MIT. It adds 12 tokens to every session and 1,085 once invoked, about $0.0000 per session on Opus 5.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.
surgeon compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| surgeonariaxhan/kernel-claude | Agent | 16 | yesterday | MIT | A | 12 | Claude Code |
| sky-guideBeppeTemp/cartographer | Agent | 74 | yesterday | Apache-2.0 | A | 13 | Claude Code |
| delegatorArasz/ai-raccoon | Agent | 7 | today | MIT | A | 28 | Claude Code |
| frontendvukkt/token-warden | Agent | 13 | 1mo ago | MIT | A | 21 | Claude Code |
| mechanicLH8PPL/core-memory-kit | Agent | 8 | 2mo ago | MIT | A | 62 | Claude Code |
| checklist-workerLogicLabsAI/ultramemory-mcp | Agent | 1 | 4mo ago | Apache-2.0 | A | 66 | Claude Code |
| playwright-test-generatormicrosoft/playwright | Agent | 102k | today | Apache-2.0 | A | 151 | Claude Code |