Borrowing it
Nothing to install: this file belongs to radimsem/mithril. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/radimsem/mithril/main/.claude/skills/code-simplifier/SKILL.mdgit clone --depth 1 https://github.com/radimsem/mithrilWrote 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/radimsem/mithril/code-simplifier)<a href="https://agentmods.dev/skills/radimsem/mithril/code-simplifier"><img src="https://agentmods.dev/badge/skills/radimsem/mithril/code-simplifier/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/radimsem/mithril/code-simplifier"><img src="https://agentmods.dev/badge/skills/radimsem/mithril/code-simplifier.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.00044 | $0.01218 |
| Opus 5.5 | $0.00018 | $0.00487 |
| Sonnet 5.5 | $0.00009 | $0.00244 |
| Haiku 4.5 | $0.00004 | $0.00122 |
Grade A, and why
code-simplifier 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 — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Code Simplifier
Proactive pattern guide for writing simple, idiomatic Rust. Apply these patterns whenever writing or modifying Rust code — not only when asked to simplify.
Project rules: These patterns align with .claude/rules/rust-patterns.md. When in doubt, re-read the rules file.
1. Iterator Chains Over Manual Loops
Use iterator chains for transformation logic. Reserve for loops only when the body needs early error returns with ?.
// WRONG
let mut names = Vec::new();
for tool in tools {
if tool.is_available() {
names.push(tool.name().to_owned());
}
}
// RIGHT
let names: Vec<String> = tools
.iter()
.filter(|t| t.is_available())
.map(|t| t.name().to_owned())
.collect();
When to keep a loop: The body calls fallible operations with ?:
// Loop is correct here — early return on error
for entry in entries {
let meta = entry.metadata().context("failed to read metadata")?;
process(&meta).await?;
}
2. Option/Result Chaining
Flatten nested match/if let on Option/Result into chained combinators or ?.
// WRONG — nested match pyramid
match config.project.as_ref() {
Some(project) => match project.settings.as_ref() {
Some(settings) => match settings.get("key") {
Some(val) => Some(val.to_owned()),
None => None,
},
None => None,
},
None => None,
}
// RIGHT — ? operator for Option propagation
config
.project
.as_ref()?
.settings
.as_ref()?
.get("key")
.map(|v| v.to_owned())
Combinator quick reference:
| Pattern | Use when |
|---|---|
? |
Propagate None/Err to caller |
.map() |
Transform inner value |
.and_then() |
Chain operations that return Option/Result |
.unwrap_or_default() |
Fallback to Default impl |
.unwrap_or_else(|| ...) |
Fallback with computation |
3. Early Returns
Guard against invalid/empty states at the top. Avoid deep nesting for the main logic.
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 First seen · 177 lines · 44 tokens per session scan A 3566ebf6a3f3
code-simplifier is a skill published in the GitHub repository radimsem/mithril (15 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,218 once invoked, about $0.0002 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.
Other skills, from other repositories
rust-check
Run cargo check on the current Rust project to find compile errors.
contributor-onboarding
Help a new contributor get productive on this checkout - inspect sync state against main, build, run the repository's exact verification gate, and produce a local what's-new digest. Never fetches, pulls, or modifies a dirty tree on its own. Explicit-only.
codew-release-qa-sweep
Use before claiming Codewhale release work is done: run the full gate sweep and list the manual QA targets.
gh-file-issue
Use when filing a new Codewhale GitHub issue: turn a bug or idea into a well-formed, actionable issue with repro, acceptance criteria, labels, and milestone.
gh-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.
fleet-manager
Use when managing, triaging, restarting, escalating, or summarizing Codewhale fleet runs and workers.