agentleFS
baoyuboooobaoyuboooo/simple-agent-skills/skills/simple-code/SKILL.md

simple-code

Skill0 starsChanged 5 months agoMITView on GitHub

Use when simplifying code that should become more direct, easier to follow, and lower in unnecessary complexity or abstraction without changing required behavior or contracts.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. ofweb/skills★ 1same name
    2. maggiejz/claude-skills★ 0same name

    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 repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

47 rules. About 0 are common, 44 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈44

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If reliable judgment is not possible, ask a human instead of guessing.

    line 12
  2. Distinctive:

    Do not auto-trigger this skill on broad requests such as:

    line 26
  3. Distinctive:

    Default to suggestions only.

    line 43
  4. Distinctive:

    Do not directly modify the code unless the user explicitly asks for execution with wording such as:

    line 45
  5. Distinctive:

    If a request mixes simplification with non-simplification work, keep this skill scoped to the simplification portion only.

    line 57
  6. Distinctive:

    If the request can be split cleanly, simplify the relevant part and leave the non-simplification part to another workflow or human decision.

    line 59
  7. Distinctive:

    If the request cannot be split safely, ask the human to separate the simplification task from the rest.

    line 60
  8. Distinctive:

    If explicit invocation is used for non-simplification work such as implementing a new feature, do not treat that as valid just because the …

    line 61
  9. Distinctive:

    Check nearby code, call sites, tests, and project conventions when available.

    line 68
  10. Distinctive:

    Do not simplify code whose behavior or responsibility is unclear.

    line 71
  11. Distinctive:

    Do not change public contracts.

    line 77
  12. Distinctive:

    Do not change data meaning.

    line 78
  13. Distinctive:

    Do not change exception semantics.

    line 79
  14. Distinctive:

    Do not change persistence, transaction, concurrency, or external integration semantics unless explicitly requested.

    line 80
  15. Distinctive:

    If behavior cannot be verified, say so.

    line 82
  16. Distinctive:

    Prefer the simplest simplification path that makes the current code easier to follow without expanding scope.

    line 86
  17. Distinctive:

    Use direct control flow before patterns.

    line 88
  18. Distinctive:

    Use concrete code before generic frameworks.

    line 89
  19. Distinctive:

    Use existing functions before new utilities.

    line 90
  20. Distinctive:

    Prefer the standard library, existing project utilities, and existing dependencies before adding a new dependency.

    line 91
  21. Distinctive:

    Use framework features in the simplest conventional way.

    line 92
  22. Distinctive:

    Use one clear method before multiple artificial layers.

    line 93
  23. Distinctive:

    Follow existing project conventions before this skill's preferences.

    line 94
  24. Distinctive:

    Do not optimize for hypothetical future requirements.

    line 95
  25. Distinctive:

    Use design principles only when they reduce current complexity.

    line 99
  26. Distinctive:

    Keep responsibilities clear, but do not split code into extra classes unless the split makes current behavior or current design easier to …

    line 101
  27. Distinctive:

    Keep an abstraction only when it has a clear current use, reduces real duplication, protects a real boundary, or matches existing project …

    line 118
  28. Distinctive:

    Do not remove an abstraction until its responsibility, callers, and variation points are understood.

    line 120
  29. Distinctive:

    Do not over-simplify by inlining useful names, merging unrelated logic, or removing abstractions that improve testability, boundary …

    line 122
  30. Distinctive:

    Keep the change scoped and tied to the current task.

    line 126
  31. Distinctive:

    Every change must trace back to the current task.

    line 128
  32. Distinctive:

    Do not refactor unrelated modules.

    line 130
  33. Distinctive:

    Prefer small, reviewable changes.

    line 131
  34. Distinctive:

    Leave a note when a larger cleanup is useful but out of scope.

    line 132
  35. Distinctive:

    If behavior, contract, or structure constraints are unclear, default to the smallest safe local change.

    line 133
  36. Distinctive:

    When code issues are found, provide simplification suggestions by default rather than editing immediately.

    line 137
  37. Distinctive:

    Keep the suggestions scoped to the current requirement.

    line 139
  38. Distinctive:

    When editing is explicitly requested, apply the smallest change that reduces complexity while still satisfying the current requirement.

    line 141
  39. Distinctive:

    Ask for human input when behavior, contracts, data meaning, acceptance criteria, verification requirements, or the correct behavior, …

    line 143
  40. Distinctive:

    Do not present the change as safe when the intended behavior cannot be verified.

    line 144
  41. Very specific:

    Use simple ordered lists for output items: 1.

    line 170
  42. Distinctive:

    Do not include empty sections.

    line 171
  43. Distinctive:

    Do not include reasoning-process narration.

    line 172
  44. Distinctive:

    Keep output scoped to code simplification only.

    line 173
  45. Distinctive:

    Keep the response bounded to the completed task.

    line 174
  46. Very specific:

    Use ## 🧪 Verification to state what was checked, what was confirmed, and how required behavior, contracts, data meaning, and exception …

    line 175
  47. Very specific:

    Use ## ❓ Open Questions for unresolved decisions, missing inputs, or unverified code paths that still need human confirmation.

    line 176

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Simple Code

Make code easier to read, test, debug, and maintain. Do not make it clever, shorter, or more abstract for its own sake.

Simplification must not override user-stated goals, scope, and constraints, or required behavior, contracts, rules, or established boundaries.

If reliable judgment is not possible, ask a human instead of guessing.

Trigger Boundary

Auto-trigger this skill only when the request shows explicit simplification intent.

Examples of valid intent:

  • simplify
  • reduce complexity
  • remove redundancy
  • reduce abstraction
  • make this more direct

Do not auto-trigger this skill on broad requests such as:

  • optimize
  • adjust
  • review
  • rewrite
  • design
  • organize

optimize only counts when paired with explicit simplification intent.

Explicit direct invocation such as $simple-code remains valid even when the request does not include auto-trigger wording.

Explicit invocation does not widen this skill into general implementation, feature work, or open-ended refactoring. The request must still be a simplification task.

Default Action

Default to suggestions only.

Do not directly modify the code unless the user explicitly asks for execution with wording such as:

  • auto-simplify
  • apply the suggestions
  • directly modify

These are representative examples, not a closed whitelist.

Explicit execution wording only enables modification within a simplification task. It does not convert this skill into a general coding or implementation skill.

Mixed-Intent Requests

If a request mixes simplification with non-simplification work, keep this skill scoped to the simplification portion only.

  • If the request can be split cleanly, simplify the relevant part and leave the non-simplification part to another workflow or human decision.
  • If the request cannot be split safely, ask the human to separate the simplification task from the rest.
  • If explicit invocation is used for non-simplification work such as implementing a new feature, do not treat that as valid just because the skill name was invoked.

1. Think Before Coding

Understand the requirement, behavior, and boundaries before simplifying code.

  • Identify the current requirement and expected behavior.
  • Check nearby code, call sites, tests, and project conventions when available.
  • Identify public contracts, data meaning, exception semantics, and system boundaries before changing code.
  • Identify the simplification goal and what should become more direct or less complex.
  • Do not simplify code whose behavior or responsibility is unclear.

2. Preserve Behavior Where Behavior Exists

For existing code, behavior preservation is the first rule.

  • Do not change public contracts.
  • Do not change data meaning.
  • Do not change exception semantics.
  • Do not change persistence, transaction, concurrency, or external integration semantics unless explicitly requested.
  • Respect existing project structure and conventions by default, unless the task clearly calls for changing them.
  • If behavior cannot be verified, say so.

3. Simplest Direct Design

Prefer the simplest simplification path that makes the current code easier to follow without expanding scope.

  • Use direct control flow before patterns.
  • Use concrete code before generic frameworks.
  • Use existing functions before new utilities.
  • Prefer the standard library, existing project utilities, and existing dependencies before adding a new dependency.
  • Use framework features in the simplest conventional way.
  • Use one clear method before multiple artificial layers.
  • Follow existing project conventions before this skill's preferences.
  • Do not optimize for hypothetical future requirements.

Simple means easier to understand, test, debug, and change, not fewer lines.

Use design principles only when they reduce current complexity. Do not add abstractions just to satisfy a named principle.

Keep responsibilities clear, but do not split code into extra classes unless the split makes current behavior or current design easier to understand, test, or change.

4. No Unsupported Abstractions

Reject abstractions without real responsibility.

Question:

  • single-use interfaces
  • single-implementation strategies
  • unnecessary factories
  • vague managers
  • generic helpers
  • converters that only rename fields
  • layers that hide simple logic
  • extension points without a current second use case

Keep an abstraction only when it has a clear current use, reduces real duplication, protects a real boundary, or matches existing project conventions.

Do not remove an abstraction until its responsibility, callers, and variation points are understood.

Do not over-simplify by inlining useful names, merging unrelated logic, or removing abstractions that improve testability, boundary protection, or understanding.

5. Goal-Driven Surgical Changes

Keep the change scoped and tied to the current task.

  • Every change must trace back to the current task.
  • Modify only code related to the task.
  • Do not refactor unrelated modules.
  • Prefer small, reviewable changes.
  • Leave a note when a larger cleanup is useful but out of scope.
  • If behavior, contract, or structure constraints are unclear, default to the smallest safe local change.

Suggestions-First Rule

When code issues are found, provide simplification suggestions by default rather than editing immediately.

  • Keep the suggestions scoped to the current requirement.
  • Apply edits only when the user explicitly requests modification.
  • When editing is explicitly requested, apply the smallest change that reduces complexity while still satisfying the current requirement.
  • Re-check the updated code as a whole, not just the edited lines: behavior, contracts, abstraction, scope, placement, surrounding fit, and verification.
  • Ask for human input when behavior, contracts, data meaning, acceptance criteria, verification requirements, or the correct behavior, contract, or structural decision cannot be determined reliably from the available context.
  • Do not present the change as safe when the intended behavior cannot be verified.

Output Contract

Return only the relevant sections.

For suggestion mode, use:

  • ## 📌 Main Verdict
  • ## 🟥 High-Priority Suggestions
  • ## 🟨 Medium-Priority Suggestions
  • ## 🟩 Low-Priority Suggestions
  • ## ⚠️ Behavior Risks
  • ## ❓ Open Questions

For auto-modification mode, use:

  • ## 📌 Main Verdict
  • ## 🛠 Changes Made
  • ## 🛡 Preservation Notes
  • ## 🟨 Remaining Concerns
  • ## 🧪 Verification
  • ## ❓ Open Questions

Rules:

  • Use simple ordered lists for output items: 1. 2. 3.
  • Do not include empty sections.
  • Do not include reasoning-process narration.
  • Keep output scoped to code simplification only.
  • Keep the response bounded to the completed task. Do not add generic follow-up questions.
  • Use ## 🧪 Verification to state what was checked, what was confirmed, and how required behavior, contracts, data meaning, and exception semantics were protected.
  • Use ## ❓ Open Questions for unresolved decisions, missing inputs, or unverified code paths that still need human confirmation.

Final Verification

  • Existing behavior, public contracts, data meaning, and exception semantics are preserved where applicable.
  • The simplified code still satisfies the current requirement without unnecessary extra scope.
  • The implementation is more direct, clearer, and easier to test or debug without breaking required behavior, contracts, or boundaries.
  • No unsupported abstraction, layer, pattern, dependency, or speculative extension point was added.
  • Changes are scoped to the current task.
  • Verification is stated, or unverified items are explicit.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.