agentleFS
ExplorerFredaExplorerFreda/fskills/fix-precommit/SKILL.md

fix-precommit

Skill11 starsChanged 3 months agoApache-2.0View on GitHub

Run pre-commit hooks and fix any errors they report

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the pre-commit hooks and fix any errors they report.

    line 6
  2. Very specific:

    Run uv run pre-commit run --all-files and capture the output.

    line 9
  3. Distinctive:

    Read the output carefully.

    line 10
  4. Very specific:

    After fixing all issues, re-run uv run pre-commit run --all-files to verify all hooks pass.

    line 15
  5. Distinctive:

    If new errors appear in the re-run, repeat the fix-and-verify cycle until the run is fully clean.

    line 16
  6. Distinctive:

    Follow the project style: single quotes for string literals, double quotes only for docstrings.

    line 19
  7. Distinctive:

    Do not add unnecessary changes beyond what the hooks require.

    line 20
  8. Distinctive:

    Do not commit anything.

    line 21

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

Run the pre-commit hooks and fix any errors they report.

Steps:

  1. Run uv run pre-commit run --all-files and capture the output.
  2. Read the output carefully. Identify every file and error flagged.
  3. For each error, open the relevant file(s) and apply the necessary fixes:
    • Flake8 violations: fix the specific line(s) reported (line length, unused imports, whitespace, etc.)
    • Formatter changes (e.g. ruff-format, black): apply the formatting the hook expects
    • Any other hook failures: follow the specific guidance in the hook output
  4. After fixing all issues, re-run uv run pre-commit run --all-files to verify all hooks pass.
  5. If new errors appear in the re-run, repeat the fix-and-verify cycle until the run is fully clean.

Important rules while fixing:

  • Follow the project style: single quotes for string literals, double quotes only for docstrings.
  • Do not add unnecessary changes beyond what the hooks require.
  • Do not commit anything.

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.