agentleFS
xsovad06xsovad06/sova/.agents/skills/sova-simplify/SKILL.md

sova-simplify

Skill3 starsChanged 5 days agoApache-2.0View on GitHub

Review changed code for reuse, quality, and efficiency, then fix any issues found.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    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:

    If a simplification is risky, skip it.

    line 51
  2. Distinctive:

    If no simplifications are needed, state that explicitly.

    line 55
  3. Distinctive:

    If changes were made, summarize:

    line 57
  4. Distinctive:

    Do NOT reformat code that was not changed in this branch.

    line 70
  5. Distinctive:

    Do NOT add docstrings, comments, or type annotations to unchanged code.

    line 71
  6. Distinctive:

    Do NOT create abstractions for fewer than 3 occurrences.

    line 72
  7. Distinctive:

    Do NOT add error handling for scenarios that cannot happen.

    line 73
  8. Distinctive:

    NEVER use emojis in any output.

    line 75

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

Simplify

Review all changed code for opportunities to reduce complexity, eliminate duplication, and improve quality.

Scope: the arguments provided when this skill is invoked

Instructions

Step 1: Get the Diff Scope

Compare against the fork point with the remote base (three dots), not a local main: two dots against a stale or moved base also lists the base's own newer commits as if this branch made them.

BASE=$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's#^origin/##')
BASE=${BASE:-main}
git fetch --quiet origin "$BASE"
git diff "origin/$BASE"...HEAD --stat
git diff --cached --stat
git diff --stat

Step 2: Review Each Changed File

For each changed file, read the entire file and check:

  • Code reuse: does new code duplicate existing utilities or helpers? Search the codebase for similar patterns.
  • Over-engineering: unnecessary abstractions, premature generalization, excessive configurability for one-time operations.
  • Dead code: unused imports, unreachable branches, commented-out code.
  • Redundancy: repeated logic that could be a shared helper (only if 3+ occurrences).
  • Complexity: can any function be simplified without losing clarity?
  • Efficiency: redundant computations, repeated file reads, duplicate API calls.
  • Naming: unclear variable or function names that could be more descriptive.

Step 3: Apply Simplifications

Apply each simplification directly. After changes, verify tests still pass, skipping only when an identical check already passed earlier in this autonomous pipeline cycle for this exact worktree state (a no-op outside the autonomous pipeline: sova checks should-skip only ever reports a skip there). Here that can only happen when no simplification was applied, since any edit changes the state the skip is keyed to:

if sova checks should-skip "make check"; then
  echo "Full check already passed for this worktree state earlier in the pipeline cycle; skipping re-run."
else
  make check && { sova checks record "make check" --passed || true; }
fi

If a simplification is risky, skip it. Only apply safe, clear improvements.

Step 4: Summary

If no simplifications are needed, state that explicitly.

If changes were made, summarize:

## Simplification Summary

**Changes applied**: N
- [brief description of each change]

**Tests**: passing

Rules

  • Do NOT reformat code that was not changed in this branch.
  • Do NOT add docstrings, comments, or type annotations to unchanged code.
  • Do NOT create abstractions for fewer than 3 occurrences.
  • Do NOT add error handling for scenarios that cannot happen.
  • Three similar lines of code is better than a premature abstraction.
  • NEVER use emojis in any output.

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.