code-simplification
Skill1 starsChanged 27 days agoMITView on GitHub
Simplifies code while preserving behavior. Use when code works but is harder to read or maintain than it should be. Use when complexity has accumulated and needs reduction.
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 constraint-driven-development, architecture-decision-records and 8 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.
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 16 projects that use this
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
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 repository66 other files it gives its agents.
- add-ai-chatSkill
- add-buildpadSkill
- add-commentsSkill
- add-cronSkill
- add-external-oauthSkill
- add-filesSkill
- add-i18nSkill
- add-mcp-serverSkill
- add-microappSkill
- add-microfrontendSkill
- add-microfrontend-zonesSkill
- add-mobile-appSkill
- add-multitenancySkill
- add-usersSkill
- add-workflowsSkill
- amplify-env-varsSkill
- authentication-proxySkill
- buildpad-debugSkill
- buildpad-discoverySkill
- buildpad-implSkill
- buildpad-referenceSkill
- buildpad-reviewSkill
- buildpad-spec-batchSkill
- buildpad-spec-designSkill
- buildpad-spec-initSkill
- buildpad-spec-quickSkill
- buildpad-spec-requirementsSkill
- buildpad-spec-statusSkill
- buildpad-spec-tasksSkill
- buildpad-steering-customSkill
- buildpad-steeringSkill
- buildpad-validate-designSkill
- buildpad-validate-gapSkill
- buildpad-validate-implSkill
- buildpad-verify-completionSkill
- context-engineeringSkill
- create-api-routeSkill
- create-collectionSkill
- create-componentSkill
- create-cronSkill
- create-featureSkill
- create-form-builderSkill
- create-migrationSkill
- create-projectSkill
- create-rbacSkill
- create-serviceSkill
- create-testsSkill
- create-workflowSkill
- daas-platformSkill
- debugging-and-error-recoverySkill
- generate-docsSkill
- git-workflow-and-versioningSkill
- grant-module-accessSkill
- hooks-extensionsSkill
- idea-refineSkill
- incremental-implementationSkill
- manage-scopeSkill
- migrate-to-engineSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 77 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
After a feature is complete and tests pass, before moving to the next phase
- Distinctive: line 19
When NOT to use: Don't simplify code you don't understand yet.
- Distinctive: line 25
Before changing anything that seems unnecessary, understand why it exists:
- Distinctive: line 37
If a function exceeds ~500 lines, it's almost certainly doing too much.
- Distinctive: line 41
Every abstraction has a cost.
- Distinctive: line 131
Ensure tests pass: before making any changes
- Distinctive: line 135
Run tests: after each change
“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
Reduce complexity while preserving exact behavior. Simplification is not refactoring for its own sake — it's removing accidental complexity that makes code harder to understand, test, and maintain. The goal is clarity, not cleverness.
When to Use
- Code works but is harder to read or maintain than it should be
- A function or module has grown too complex
- After a feature is complete and tests pass, before moving to the next phase
- During Phase 5 (Polish) of DaaS development
When NOT to use: Don't simplify code you don't understand yet. Don't simplify during active feature development (finish the feature first).
Core Principles
Chesterton's Fence
Before changing anything that seems unnecessary, understand why it exists:
See code that looks wrong or unnecessary
├── Understand why it was written this way
│ ├── Has a good reason → Document the reason, leave it
│ └── Has no good reason → Safe to simplify
└── Don't understand → Research before changingRule of 500
If a function exceeds ~500 lines, it's almost certainly doing too much. But extract only when the extracted piece has a clear, independent purpose.
Complexity Budget
Every abstraction has a cost. Before adding one, ask:
- Does this abstraction serve at least 3 use cases?
- Is the complexity it adds less than the complexity it removes?
- Could this be done with a simple function instead?
Simplification Patterns
Remove Dead Code
// Before: Accumulated unused code
function processTask(task: Task) {
// const legacyFormat = convertToLegacy(task); // Removed in v2
const result = validate(task);
// if (USE_OLD_PIPELINE) { ... } // Feature flag removed
return result;
}
// After: Only live code
function processTask(task: Task) {
return validate(task);
}Flatten Nested Logic
// Before: Deeply nested
function getStatus(task: Task) {
if (task) {
if (task.completed) {
if (task.archived) {
return 'archived';
} else {
return 'completed';
}
} else {
return 'pending';
}
}
return 'unknown';
}
// After: Early returns
function getStatus(task: Task) {
if (!task) return 'unknown';
if (task.archived) return 'archived';
if (task.completed) return 'completed';
return 'pending';
}Replace Clever Code
// Before: Clever but unclear
const x = ~~(Math.random() * 100);
const y = arr.reduce((a, b) => (a[b] = (a[b] || 0) + 1, a), {});
// After: Clear intent
const x = Math.floor(Math.random() * 100);
const counts: Record<string, number> = {};
for (const item of arr) {
counts[item] = (counts[item] ?? 0) + 1;
}Inline Over-Abstractions
// Before: Abstraction for one use
class TaskStatusManager {
getStatus(task: Task) { return task.status; }
setStatus(task: Task, s: string) { task.status = s; }
}
// After: Direct and clear
task.status = 'completed';DaaS-Specific Simplifications
- Replace custom filter UI with
FilterPanelcomponent - Replace custom table + pagination with
CollectionList - Replace manual permission checks with
CollectionForm/CollectionListbuilt-in RBAC - Replace custom form validation with DaaS extension hooks
- Replace custom audit trail with DaaS built-in activity logging
Process
- Ensure tests pass before making any changes
- Identify complexity — what's hard to understand or maintain?
- Understand why — Chesterton's Fence check
- Make one change at a time
- Run tests after each change
- Commit each simplification separately
- Never mix simplification with behavior changes
Common Rationalizations
| Rationalization | Reality |
| "It might be needed later" | YAGNI. Remove it. If needed later, git has it. |
| "It's working, don't touch it" | Working but unreadable code costs every time someone reads it. |
| "The abstraction makes it flexible" | Unused flexibility is complexity. Simplify to what's actually used. |
| "I'll just quickly refactor this too" | Simplification is its own commit. Don't mix with feature work. |
Red Flags
- Abstractions with only one implementation
- Functions longer than 50 lines that do multiple things
- Deep nesting (more than 3 levels)
- Comments explaining what the code does (instead of the code being self-explanatory)
- Unused imports, variables, or functions
- Feature flags for features that shipped months ago
Verification
After simplification:
- All existing tests still pass (behavior unchanged)
- Build succeeds
- No dead code remains
- Each simplification is a separate commit
- The "why" is documented for anything that looks unnecessary but was kept
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.

