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 skills add KonghaYao/peri --skill codemodegit clone --depth 1 https://github.com/KonghaYao/periWrote 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/skills/konghayao/peri/codemode)<a href="https://agentmods.dev/skills/konghayao/peri/codemode"><img src="https://agentmods.dev/badge/skills/konghayao/peri/codemode/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/skills/konghayao/peri/codemode"><img src="https://agentmods.dev/badge/skills/konghayao/peri/codemode.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.00064 | $0.01590 |
| Opus 5.5 | $0.00026 | $0.00636 |
| Sonnet 5.5 | $0.00013 | $0.00318 |
| Haiku 4.5 | $0.00006 | $0.00159 |
Grade A, and why
codemode 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 7d 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 — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codemode: Deterministic Tool Pipelines
Use the Workflow tool through ToolSearch and ToolInvoke. The run executes a
JavaScript script; tool(name, args) calls a real MCP tool through the host, and
agent(prompt) delegates judgment to an LLM agent. Prefer tool() for work a
deterministic program can express: reads, greps, shell commands, web fetches, and
custom MCP tools. Prefer agent() when a step needs interpretation or decisions.
Do not use codemode for a single tool call that you can run directly, and do not
replace a required multi-agent workflow (ultracode) with a tool-only script.
Script shape
export const meta = { name: 'audit', description: 'Collect and compare files' }
// `Glob` returns text: one path per line, `No files found.`, or a listing
// followed by an unnumbered `[Output truncated: ...]` note.
const listing = await tool('Glob', { pattern: 'src/**/*.rs' })
if (listing.trim() === 'No files found.') return { count: 0, verdict: 'no files matched' }
if (listing.split('\n').some(line => line.startsWith('[Output truncated:'))) {
throw new Error('Glob hit the result limit; rerun with a narrower pattern')
}
const targets = listing.split('\n').filter(Boolean)
const results = await parallel(targets.map(file => async () => {
try {
const text = await tool('Read', { file_path: file })
const lines = text.split('\n')
// `Read` content lines are numbered; status lines are not. Match only the
// latter so a file containing the same literal is still counted.
if (lines[0] === '[EMPTY FILE]') return { file, lines: 0 }
if (lines.some(line => line.startsWith('[Output truncated:'))) return { file, truncated: true }
return { file, lines: lines.length }
} catch (error) {
// Keep the typed failure code instead of letting parallel() drop it.
if (!error.code) throw error
return { file, error: error.code }
}
}))
const counts = results.filter(result => result && !result.error)
const unread = results
.map((result, index) =>
result && !result.error ? null : { file: targets[index], error: result?.error ?? 'unexpected_error' },
)
.filter(Boolean)
const verdict = await agent(
`Rank the largest files and flag anomalies. ` +
`Line counts: ${JSON.stringify(counts)}. Unread files: ${JSON.stringify(unread)}`,
{ label: 'rank' },
)
return { verdict, counts, unread }
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.
- 7d ago First seen · 139 lines · 64 tokens per session scan A cc4d066a85bd
codemode is a skill published in the GitHub repository KonghaYao/peri (273 stars, last pushed today), licensed Apache-2.0. It adds 64 tokens to every session and 1,590 once invoked, about $0.0003 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-11-23.
codemode compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| codemodeKonghaYao/peri | Skill | 273 | today | Apache-2.0 | A | 64 | Claude Code, Codex |
| babysit-propeninterpreter/openinterpreter | Skill | 69k | yesterday | Apache-2.0 | A | 114 | Codex |
| plugin-creatoropeninterpreter/openinterpreter | Skill | 69k | yesterday | Apache-2.0 | A | 86 | Codex |
| codex-pr-bodyopeninterpreter/openinterpreter | Skill | 69k | yesterday | Apache-2.0 | A | 17 | Codex |
| remote-testsopeninterpreter/openinterpreter | Skill | 69k | yesterday | Apache-2.0 | A | 12 | Codex |
| update-v8-versionopeninterpreter/openinterpreter | Skill | 69k | yesterday | Apache-2.0 | A | 86 | Codex |
| qa-testingopeninterpreter/openinterpreter | Skill | 69k | yesterday | Apache-2.0 | A | 77 | Claude Code, Codex |