am-command-code-simplify
Skill27 starsChanged 2 months agoMITView on GitHub
Simplify code for clarity and maintainability — reduce complexity without changing behavior
In this repository167 other files it gives its agents.
- AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-agent-targetSkill
- add-global-mode-targetSkill
- am-agent-code-debuggerSkill
- am-agent-code-documenterSkill
- am-agent-code-refactorSkill
- am-agent-code-reviewerSkill
- am-agent-code-security-auditorSkill
- am-agent-code-standards-enforcerSkill
- am-agent-security-auditorSkill
- am-agent-test-engineerSkill
- am-agent-test-runnerSkill
- am-agent-typescript-developerSkill
- am-command-buildSkill
- am-command-commitSkill
- am-command-planningSkill
- am-command-planSkill
- am-command-ponytail-auditSkill
- am-command-ponytail-debtSkill
- am-command-ponytail-gainSkill
- am-command-ponytail-helpSkill
- am-command-ponytail-reviewSkill
- am-command-ponytailSkill
- am-command-reviewSkill
- am-command-shipSkill
- am-command-specSkill
- am-command-testSkill
- api-and-interface-designSkill
- browser-testing-with-devtoolsSkill
- changelog-generatorSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-reviewerSkill
- code-simplificationSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- docs-and-examplesSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- frontend-ui-engineeringSkill
- git-workflow-and-versioningSkill
- grillingSkill
- grill-meSkill
- handoffSkill
- homebrew-packagingSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- lessonsSkill
- library-testingSkill
- package-release-engineeringSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- ponytail-auditSkill
- ponytail-debtSkill
- ponytail-gainSkill
- ponytail-helpSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 12
Read CLAUDE.md and study project conventions
- Distinctive: line 23
Verify all tests pass, the build succeeds, and the diff is clean
- Very specific: line 25
If tests fail after a simplification, revert that change and reconsider.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Invoke the agent-skills:code-simplification skill.
Simplify recently changed code (or the specified scope) while preserving exact behavior:
- Read CLAUDE.md and study project conventions
- Identify the target code — recent changes unless a broader scope is specified
- Understand the code's purpose, callers, edge cases, and test coverage before touching it
- Scan for simplification opportunities:
- Deep nesting → guard clauses or extracted helpers
- Long functions → split by responsibility
- Nested ternaries → if/else or switch
- Generic names → descriptive names
- Duplicated logic → shared functions
- Dead code → remove after confirming
- Apply each simplification incrementally — run tests after each change
- Verify all tests pass, the build succeeds, and the diff is clean
If tests fail after a simplification, revert that change and reconsider. Use code-review-and-quality to review the result.
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.

