code-simplification
Skill2 starsChanged 40 days agoMITView on GitHub
Use when code is harder to understand than it needs to be. Guides incremental simplification that preserves behavior exactly, following project conventions and Kotlin idioms.
83 other projects use a version of this.
Adopted by
Most recently taken up by
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
- dmoreq/agent-grimoiretheir own version, first seen Nov 8, 2026
- Mehul72/skillstheir own version, first seen Nov 8, 2026
- Anish59312/skillstheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- gopalparashar421/agent-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use architecture-decision-records, ci-cd and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GSA-TTSSkillarchitecture-decision-records
Load when a user wants architecture decision records (ADRs) drafted from requirements or a design discussion, asks which decisions need an ADR, or wants an ADR draft reviewed for one-sided trade-offs, weak alternatives or missing requirement links. Not for setting up a project's whole documentation system (project-documentation-system).
Also in 4 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 3 projects that use this
OpenAISkillsecurity-best-practices
Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.
Also in 3 projects that use this
GitHubSkillconventional-commit
Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.
Also in 3 projects that use this
silvainfmSkillmarketing-ideas
When the user needs marketing ideas, inspiration, or strategies for their SaaS or software product. Also use when the user asks for 'marketing ideas,' 'growth ideas,' 'how to market,' 'marketing strategies,' 'marketing tactics,' 'ways to promote,' or 'ideas to grow.' This skill provides 140 proven marketing approaches organized by category.
Also in 4 projects that use this
IgorGanapolskySkillgraphify
Query the local Graphify-Labs AST knowledge graph for ThumbGate architecture questions (what connects X to Y, explain a symbol, PreToolUse/gates/adapters). Slash: /graphify.
Also in 5 projects that use this
Other versions83 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 83
- addyosmani/agent-skills★ 114ksame name
- sanity-io/sanity★ 6.4ksame name
- luxury-yacht/app★ 446same name
- shashankswe2020-ux/whoop-mcp★ 174same name
- sammcj/agentic-coding★ 169same name
- HybridAIOne/hybridclaw★ 159same name
- muratgur/ordinus★ 111same name
- tranhieutt/software_development_department★ 71same name
- lgbarn/shipyard★ 66same name
- c-kick/hnl-agent-skills★ 56same name
73 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- android-accessibilitySkill
- android-architectureSkill
- android-background-workSkill
- android-data-persistenceSkill
- android-device-testingSkill
- android-e2e-verificationSkill
- android-ui-engineeringSkill
- api-and-interface-designSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- observability-and-instrumentationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 77 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
After a feature is working and tested (simplify, don't rewrite)
- Very specific: line 66
Run ./gradlew test — verify tests pass
- Distinctive: line 67
If tests fail, revert immediately and investigate
“Common” is measured: kept by at least 6 in 10 of the 77 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 |
Step 3: Apply Incrementally
- One change at a time:
- Make a single simplification
- Run
./gradlew test— verify tests pass - If tests fail, revert immediately and investigate
- Commit the change
- Repeat
- Common Kotlin simplifications:
// Before: nested null checks
fun getDisplayName(user: User?): String {
if (user != null) {
if (user.displayName != null) {
return user.displayName
} else {
return user.email
}
} else {
return "Anonymous"
}
}
// After: idiomatic Kotlin
fun getDisplayName(user: User?): String =
user?.displayName ?: user?.email ?: "Anonymous"// Before: when with boolean conditions
fun categorize(score: Int): String {
if (score >= 90) return "Excellent"
else if (score >= 70) return "Good"
else if (score >= 50) return "Average"
else return "Poor"
}
// After: when expression
fun categorize(score: Int): String = when {
score >= 90 -> "Excellent"
score >= 70 -> "Good"
score >= 50 -> "Average"
else -> "Poor"
}Step 4: Verify
- Run the full check:
./gradlew test— all tests pass./gradlew lint— no new warnings./gradlew assembleDebug— builds successfully
- Review the diff — does it only change form, not behavior?
- Read the simplified code fresh — is it actually clearer?
Common Rationalizations
| Shortcut | Why It Fails |
| "I'll simplify and add features at the same time" | Mixed changes are impossible to review and risky to revert. |
| "This clever one-liner is simpler" | If it takes 30 seconds to parse, it's not simpler. |
| "I'll refactor the whole file while I'm here" | Scope creep. Simplify what was asked, nothing more. |
| "The tests are passing, so my refactor is safe" | Tests may not cover the behavior you changed. Check coverage first. |
Red Flags
- Behavior changed during "simplification"
- Tests skipped or disabled
- Simplification mixed with feature changes
- New abstractions introduced for single-use code
- Code made "shorter" but harder to read
/* simplify-ignore */blocks modified
Verification
- All existing tests pass (
./gradlew test) - Build succeeds (
./gradlew assembleDebug) - No lint regressions (
./gradlew lint) - Diff changes form only — not behavior
- Each simplification committed separately
- Code is genuinely easier to understand (not just shorter)
/* simplify-ignore */blocks untouched
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

