agentleFS
eeaeea/eea.agent.skills/skills/quality-fixes/SKILL.md

quality-fixes

Skill7 starsChanged 6 months agoMITView on GitHub

Diagnose and repair failing lint, typing, test, Docker, and Jenkins quality gates until the repository passes the same commands CI will run.

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 18 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    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:

    Use this skill when a repository already fails lint, typing, tests, Docker verification, or Jenkins quality gates and you need to repair it …

    line 15
  2. Distinctive:

    Use this skill when:

    line 19
  3. Distinctive:

    Run the failing commands exactly as the repository or Jenkins would run them.

    line 31
  4. Distinctive:

    Stop only when the real blocking commands pass.

    line 40
  5. Distinctive:

    Do not claim the repository is fixed just because auto-fix changed files.

    line 52
  6. Distinctive:

    If Jenkins exists, treat its command path as canonical.

    line 89
  7. Distinctive:

    When repairing AI-generated code:

    line 101
  8. Distinctive:

    prefer minimal edits that preserve the intended behavior

    line 102
  9. Distinctive:

    remove obvious mechanical drift first

    line 103
  10. Distinctive:

    do not hide failing logic behind formatter-only cleanup

    line 104
  11. Distinctive:

    if the underlying generated structure is poor, rewrite the smallest coherent unit instead of stacking fragile patches

    line 105
  12. Very specific:

    If Ruff uses heavy D docstring rules:

    line 109
  13. Very specific:

    do not assume ruff --fix can resolve the failures

    line 110
  14. Distinctive:

    consider phased hard-gating if the repo has large historical debt, but do not weaken checks silently

    line 113
  15. Distinctive:

    When using this skill, provide:

    line 117
  16. Very specific:

    Use this skill when the jenkins-pipeline skill or code-quality skill detects that a repository already fails its current quality checks …

    line 137
  17. Distinctive:

    verify against the actual repository commands, not generalized substitutes

    line 142
  18. Distinctive:

    prefer the same Docker-based command path Jenkins will use when available

    line 143
  19. Distinctive:

    keep fixes small and auditable

    line 144
  20. Distinctive:

    do not mark work complete until the failing Jenkins-quality commands pass

    line 145
  21. Distinctive:

    When this skill is used before introducing or updating a Jenkinsfile, the objective is to reduce the chance that the first push-triggered …

    line 149

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

Quality Fixes

Use this skill when a repository already fails lint, typing, tests, Docker verification, or Jenkins quality gates and you need to repair it until the real blocking commands pass.

When to use

Use this skill when:

  • a repo fails Ruff, Black, ESLint, mypy, tsc, pytest, Playwright, Cypress, or similar checks
  • a Docker-based Dockerfile.test verification path fails
  • a Jenkins pipeline already exists and the code does not pass it
  • the Jenkins skill preflight finds existing failures before creating a new Jenkinsfile

Primary goal

Repair the code and supporting configuration until the same commands used by Jenkins or CI pass, while keeping changes as small and explainable as possible.

Required workflow

  1. Run the failing commands exactly as the repository or Jenkins would run them.
  2. Capture the real failures, not guessed failures.
  3. Classify them into:
    • safe auto-fixable issues
    • direct code repair issues
    • environment / dependency / Docker path issues
  4. Apply safe auto-fixes first.
  5. Repair remaining code or config problems directly.
  6. Rerun the same commands.
  7. Stop only when the real blocking commands pass.

Safe auto-fix first

Try mechanical rewrites before manual code edits when they are safe:

  • ruff check --fix
  • ruff format
  • black
  • isort
  • prettier --write
  • eslint --fix for safe repository-approved rules

Do not claim the repository is fixed just because auto-fix changed files. Always rerun the failing commands.

Repair categories

1. Lint/config debt

Examples:

  • import ordering
  • formatting drift
  • docstring policy failures
  • unused imports
  • line length issues

2. Type-check failures

Examples:

  • missing annotations required by repo policy
  • bad return types
  • incorrect optional handling
  • missing stubs or import configuration

3. Test failures

Examples:

  • broken business logic
  • invalid fixtures
  • outdated assertions
  • file path assumptions
  • API behavior mismatches

4. Docker/CI path failures

Examples:

  • broken Dockerfile.test
  • inconsistent dependency definitions
  • package manager conflicts
  • missing binaries in the test image
  • report paths that Jenkins expects but code does not produce

Jenkins repair policy

If Jenkins exists, treat its command path as canonical.

Always determine:

  • which commands run in Code linting
  • which commands run in Unit test
  • which commands run in Integration test
  • whether the repo is verified through Dockerfile.test

A repair is incomplete until those same commands pass.

AI-generated code guidance

When repairing AI-generated code:

  • prefer minimal edits that preserve the intended behavior
  • remove obvious mechanical drift first
  • do not hide failing logic behind formatter-only cleanup
  • if the underlying generated structure is poor, rewrite the smallest coherent unit instead of stacking fragile patches

Ruff-specific guidance

If Ruff uses heavy D docstring rules:

  • do not assume ruff --fix can resolve the failures
  • distinguish mechanical failures from policy-heavy documentation debt
  • repair new or touched code fully where practical
  • consider phased hard-gating if the repo has large historical debt, but do not weaken checks silently

Output requirements

When using this skill, provide:

  1. the exact commands that were failing
  2. what was auto-fixed
  3. what was repaired manually
  4. the final verification commands that now pass
  5. any remaining risk or follow-up debt

Reference

See references/fix-loop.md for the recommended diagnosis → repair → rerun loop.


<!-- BEGIN EEA-OVERRIDES -->

EEA-Specific Overrides

<!-- EEA-Overrides-Version: 1.0 --><!-- Last-Sync: 2026-07-29 -->

EEA routing

Use this skill when the jenkins-pipeline skill or code-quality skill detects that a repository already fails its current quality checks before a new Jenkinsfile is finalized.

EEA repair expectations

For EEA repositories:

  • verify against the actual repository commands, not generalized substitutes
  • prefer the same Docker-based command path Jenkins will use when available
  • keep fixes small and auditable
  • do not mark work complete until the failing Jenkins-quality commands pass

EEA first-push goal

When this skill is used before introducing or updating a Jenkinsfile, the objective is to reduce the chance that the first push-triggered Jenkins run fails because of pre-existing, already-known code-quality issues.

<!-- END EEA-OVERRIDES --><!-- Merged Build: upstream SKILL.md + EEA-OVERRIDES.md --><!-- Auto-generated by scripts/build.sh - DO NOT EDIT DIRECTLY --><!-- Source: https://github.com/eea/eea.agent.skills -->

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.