agentleFS
hassan-mohiddinhassan-mohiddin/freeflow/skills/simplify-code/SKILL.md

simplify-code

Skill3 starsChanged 5 months agoMITView on GitHub

Use when working code should become easier to understand or change without altering accepted behavior, including removing duplication, indirection, dead abstractions, or confusing control flow.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use weekly-review-planning, blocked-page-recovery and 10 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.
  • aivrarSkill

    weekly-review-planning

    Weekly reset: commitments, stalled work, next-week plan.

    Also in 7 projects that use this

  • aivrarSkill

    blocked-page-recovery

    Recover blocked/paywalled/WAF'd pages via fallbacks.

    Also in 7 projects that use this

  • john-data-chenSkill

    teams-meeting-pipeline

    Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.

    Also in 8 projects that use this

  • kevinnftSkill

    python-debugpy

    Debug Python: pdb REPL + debugpy remote (DAP).

    Also in 10 projects that use this

  • kevinnftSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 6 projects that use this

  • braxtonROSE4Skill

    p5js

    Production pipeline for interactive and generative visual art using p5.js. Creates browser-based sketches, generative art, data visualizations, interactive experiences, 3D scenes, audio-reactive visuals, and motion graphics — exported as HTML, PNG, GIF, MP4, or SVG. Covers: 2D/3D rendering, noise and particle systems, flow fields, shaders (GLSL), pixel manipulation, kinetic typography, WebGL scenes, audio analysis, mouse/keyboard interaction, and headless high-res export. Use when users request: p5.js sketches, creative coding, generative art, interactive visualizations, canvas animations, browser-based visual art, data viz, shader effects, or any p5.js project.

    Also in 11 projects that use this

  • +5 more from aivrar

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 16 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 16

    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
  1. Distinctive:

    Remove one named source of complexity while preserving accepted behavior.

    line 8
  2. Distinctive:

    If expected behavior is unclear or should change, return to Workflow.

    line 21
  3. Distinctive:

    Read Simplification Patterns before selecting or materially changing the transformation.

    line 27
  4. Distinctive:

    Run focused behavior and failure checks.

    line 50
  5. Distinctive:

    Keep the supported result or return a failed transformation for correction or covered rollback.

    line 53
  6. Distinctive:

    Do not combine feature work, bug fixes, new edge-case behavior, public contract changes, broad modernization, or unrelated cleanup with the …

    line 57
  7. Distinctive:

    Use Verify Work to determine what the observations establish.

    line 61
  8. Distinctive:

    If an implementation-detail check fails while caller behavior appears unchanged, establish whether the detail is contractual, the check is …

    line 63
  9. Distinctive:

    Test sequencing alone is not assurance.

    line 65
  10. Distinctive:

    Before removing code, establish its purpose and current consumers through relevant source, runtime registration, configuration, generated …

    line 69
  11. Distinctive:

    Do not remove compatibility, fallback, platform, migration, audit, or recovery behavior merely because it looks redundant.

    line 71
  12. Distinctive:

    Ask whether there are fewer concepts to coordinate, clearer ownership, fewer related edit locations, visible failure semantics, a smaller …

    line 77
  13. Distinctive:

    If the result is shorter but harder to understand, test, or change, complexity was relocated rather than reduced.

    line 79
  14. Distinctive:

    Stop and return the changed boundary when unchanged behavior is unsupported, public/failure semantics changed, a material resource tradeoff …

    line 81
  15. Distinctive:

    When the named complexity is removed and the behavior boundary is supported, return to the current owner for applicable self-review and …

    line 83
  16. Distinctive:

    Do not close the Slice, begin further cleanup, or claim broader modernization from this result.

    line 85

“Common” is measured: kept by at least 6 in 10 of the 19 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.

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

Simplify Code

Remove one named source of complexity while preserving accepted behavior. Judge simplicity by the concepts and coordination a reader must hold—not line, file, or abstraction count alone.

This method supplies a behavior-preserving transformation under the current owner. It does not define behavior, authorize redesign, select or close a Slice, or turn nearby cleanup into accepted work.

Establish What Must Stay True

Before editing, identify:

  • the accepted behavior, relevant callers, and failure semantics;
  • the reliable baseline capable of detecting change;
  • the complexity or coordination to remove;
  • why the current structure exists, including compatibility, platform, performance, migration, and recovery constraints.

If expected behavior is unclear or should change, return to Workflow. If failure or current behavior is unexplained, use Diagnose Failure. Do not characterize an invented expectation.

Use existing adequate checks. When protection is missing, establish the smallest useful observation of behavior before transforming it; read Test Design before designing or materially changing the check. Characterization protects required stable behavior, not every accidental implementation detail. It is evidence for a refactor, not a mandatory test-first implementation method.

Return changes to interfaces, ownership, public state, or failure behavior through Workflow with Design for Depth as a lens. Do not disguise a material redesign as cleanup.

Read Simplification Patterns before selecting or materially changing the transformation. Read Code Practices before changing code.

Select One Coherent Transformation

Name the actual complexity:

  • confusing expression, naming, branches, or temporary state;
  • a pass-through wrapper that hides no useful decision;
  • generalized machinery with no accepted variation;
  • a scattered concept that can have one owner without changing its contract;
  • an unused, superseded, unreachable, or impossible path;
  • structural pressure requiring a separately selected boundary change.

Choose the smallest complete transformation that removes it. Keep related edits together even across files. Do not create another method activity for incidental local cleanup already contained in implementation; use Simplify Code when reducing complexity is itself the accepted result.

Fewer helpers are not better if their removal spreads lifecycle or error-handling knowledge into callers. Preserve useful information hiding and intentional constraints.

Apply And Observe

Within the existing agreement:

  1. State which concepts or coordination will disappear.
  2. Make the complete behavior-preserving change.
  3. Run focused behavior and failure checks.
  4. Inspect the real caller path and resulting code.
  5. Compare the required coordination before and after.
  6. Keep the supported result or return a failed transformation for correction or covered rollback.

Preserve inputs/outputs, side effects and ordering, errors/recovery, relevant timing and resource behavior, permissions, compatibility, and externally visible state. Follow repository conventions rather than personal style.

Do not combine feature work, bug fixes, new edge-case behavior, public contract changes, broad modernization, or unrelated cleanup with the transformation.

Interpret Checks Without Protecting Accidental Machinery

Use Verify Work to determine what the observations establish. A green suite cannot prove unchanged behavior it did not exercise. Do not rewrite a valid behavioral assertion merely to make the refactor pass.

If an implementation-detail check fails while caller behavior appears unchanged, establish whether the detail is contractual, the check is stale or over-coupled, the transformation changed relevant behavior, or the observer is inadequate. Do not infer the answer from the desired cleanup.

Test sequencing alone is not assurance. Retain or add independent checks where needed, and inspect the changed behavior rather than report only test counts.

Delete Only With Supported Absence

Before removing code, establish its purpose and current consumers through relevant source, runtime registration, configuration, generated callers, tests, history, and compatibility obligations. An empty local search does not establish the absence of external or dormant consumers.

Do not remove compatibility, fallback, platform, migration, audit, or recovery behavior merely because it looks redundant. Use Migration Work when deletion carries consumer, state, or compatibility obligations.

Preserve historical evidence; do not delete it to make a reference search clean.

Judge The Result And Stop

Ask whether there are fewer concepts to coordinate, clearer ownership, fewer related edit locations, visible failure semantics, a smaller or unchanged public interface, and tests focused on behavior rather than internal choreography.

If the result is shorter but harder to understand, test, or change, complexity was relocated rather than reduced.

Stop and return the changed boundary when unchanged behavior is unsupported, public/failure semantics changed, a material resource tradeoff is unmeasured, source truth conflicts, or each correction exposes another ownership or edge-case problem. Do not extend cleanup to preserve a failing approach.

When the named complexity is removed and the behavior boundary is supported, return to the current owner for applicable self-review and acceptance. Report the protected behavior, concepts removed, before/after evidence and limits, caller/failure-path shape, relevant comment changes, and intentionally retained complexity.

Do not close the Slice, begin further cleanup, or claim broader modernization from this result. Continue only through another covered action serving the agreed outcome.

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.