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 skills/shennawardana23/skillme/code-simplificationnpx skills add shennawardana23/skillme --skill code-simplificationgit clone --depth 1 https://github.com/shennawardana23/skillmeWrote 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/shennawardana23/skillme/code-simplification)<a href="https://agentmods.dev/skills/shennawardana23/skillme/code-simplification"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/code-simplification.svg" alt="Measured on agentmods" 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 | $0.00074 | $0.01671 |
| Opus 5 | $0.00037 | $0.00835 |
| Sonnet 5 | $0.00015 | $0.00334 |
| Haiku 4.5 | $0.00007 | $0.00167 |
Grade A, and why
code-simplification 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 4d 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 — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Simplification
Simplify code by reducing complexity while preserving exact behavior. The goal is not fewer lines — it's code a new team member would understand faster than the original. Every change must pass that test.
When NOT to use: the code is already clean; you don't yet understand what it does (comprehend first); it's performance-critical and the simpler version would be measurably slower; you're about to rewrite the module entirely (don't polish throwaway code).
The five principles
- Preserve behavior exactly. Same output for every input, same error behavior, same side effects and ordering, all existing tests pass unmodified. If you're not sure a change preserves behavior, don't make it.
- Follow project conventions. Simplification means matching the codebase's existing style for imports, error handling, naming, and type annotation depth — not imposing outside preferences. Simplification that breaks project consistency is churn, not simplification.
- Prefer clarity over cleverness. Explicit code beats compact code whenever the compact version needs a mental pause to parse — e.g. replace a dense nested ternary chain with a small function of
ifreturns; replace a chainedreducedoing inline mutation with a namedMapbuilt in a loop. - Maintain balance — don't over-simplify. Watch for: inlining away a helper that gave a concept a name; merging two simple functions into one complex one; removing an abstraction that exists for extensibility or testability, not complexity; optimizing for line count instead of comprehension.
- Scope to what changed. Default to simplifying recently modified code. Don't drive-by refactor unrelated code unless asked — it creates diff noise and regression risk.
Process
Step 1 — understand before touching (Chesterton's Fence)
Before changing or removing anything, answer: what is this code's responsibility? What calls it, what does it call? What are its edge cases and error paths? Why might it have been written this way — performance, a platform constraint, history? Check git blame for the original context. If you can't answer these, read more before simplifying.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 115 lines · 74 tokens per session scan A 477b90982118
code-simplification is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 7d ago), licensed Apache-2.0. It adds 74 tokens to every session and 1,671 once invoked, about $0.0004 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-31.
Other skills, from other repositories
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment.
receiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation.
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code.
skill-creator
Create, improve, evaluate, benchmark skills. Use when authoring a new skill, updating an existing one, running evals, or optimizing a skill's description for triggering. Don't use for invoking skills, writing prose, or scaffolding Python projects.
skill-index-updater
Add GitHub skill repos to the ASM index: clone, audit, eval, regenerate index, rebuild catalog, open PR. Use when given GitHub URLs to onboard. Don't use for authoring (skill-creator), improving (skill-auto-improver), or install (asm install).
hello-world
A minimal test skill that greets the user and demonstrates the ASM publish workflow.