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/guillemroca/agent-skills-android/code-simplificationnpx skills add GuillemRoca/agent-skills-android --skill code-simplificationgit clone --depth 1 https://github.com/GuillemRoca/agent-skills-androidWhat 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.00035 | $0.01181 |
| Opus 5 | $0.00017 | $0.00590 |
| Sonnet 5 | $0.00007 | $0.00236 |
| Haiku 4.5 | $0.00003 | $0.00118 |
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 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 — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Simplification
Overview
Simplicity is about comprehension speed, not line count. Simple code is code another developer can read and understand quickly. This skill guides incremental simplification — making code easier to understand without changing what it does.
When to Use
- Code is harder to understand than its logic warrants
- Functions exceed ~40 lines or have deep nesting
- After a feature is working and tested (simplify, don't rewrite)
- During code review when readability is flagged
Don't simplify when:
- Code is already clean and conventional
- You don't fully understand what the code does (Chesterton's Fence)
- The code is performance-critical and structured for speed
- A rewrite is already planned
Core Principles
- Preserve Behavior Exactly — simplification changes form, not function
- Follow Project Conventions — match existing patterns, don't introduce new styles
- Prefer Clarity Over Cleverness — readable beats concise
- Maintain Balance — don't over-abstract or under-abstract
- Scope Appropriately — simplify what was asked, nothing more
Core Process
Step 1: Understand (Chesterton's Fence)
- Read the code and its tests — understand what it does and why
- Check git blame — understand the history of complex sections
- Identify the author's intent — is complexity intentional (performance, platform workaround)?
- Respect
/* simplify-ignore-start */blocks — skip annotated sections
Step 2: Identify Opportunities
- Scan for these patterns:
| Pattern | Kotlin Simplification |
|---|---|
| Deep nesting | Early returns / when expressions |
| Long functions | Extract well-named private functions |
| Complex conditionals | when expression or sealed class |
| Nullable chains | ?.let { }, ?:, safe calls |
| Manual null checks | requireNotNull(), checkNotNull() |
| Mutable state | val over var, immutable collections |
| Callback nesting | Coroutines / Flow |
| Builder patterns | Kotlin DSL or apply/also |
| Type casting chains | is smart casts, sealed hierarchies |
| Manual resource management | use { } or withContext |
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 · 146 lines · 35 tokens per session scan A d23af6633f15
code-simplification is a skill published in the GitHub repository GuillemRoca/agent-skills-android (2 stars, last pushed 2mo ago), licensed MIT. It adds 35 tokens to every session and 1,181 once invoked, about $0.0002 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
spec-kitty-charter-doctrine
Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter"…
spec-kitty-bulk-edit-classification
Recognize when a mission is a bulk edit and drive the occurrence-classification guardrail on the user's behalf. Triggers: user says any variant of "rename X to Y", "change the terminology", "migrate all occurrences", "replace across the codebase", "the X feature is now the Y feature", "sed everywhere", or any request…
spec-kitty-spdd-reasons
Drive REASONS Canvas authoring and review for Spec Kitty missions that opted in to Structured-Prompt-Driven Development (SPDD) via charter selection. Triggers: "use SPDD", "use REASONS", "generate a REASONS canvas", "apply structured prompt driven development", "make this mission SPDD". Does NOT handle: enforcing SPDD…
spec-kitty-runtime-review
Review runtime-owned outputs using the Spec Kitty review workflow surface, then direct approval or rejection with structured feedback. Triggers: "review this work package", "check runtime output", "approve this step", "review WP", "is this WP ready to approve", "check this implementation". Does NOT handle: setup-only…
spec-kitty
Standalone Spec Kitty governance invocation: run Spec Kitty when the user indicates they want Spec Kitty involved, load governance context, open an Op, do the work under that context, and close the Op with the real outcome. Documents dispatch, profiles list, invocations list, and profile-invocation complete. Triggers…
spk-mission-types
Explain Spec Kitty mission types, step contracts, action indices, and when to choose each mission workflow.