agentleFS
omidnwomidnw/my-skills/skills/code-quality/SKILL.md

code-quality

Skill0 starsChanged 9 days agoMITView on GitHub

Run the project's existing formatter, linter, and type-checker after non-trivial source-code changes and before declaring the coding task complete. Use when source files were added or meaningfully edited, or when the user asks to lint, format, type-check, verify changes, or check code quality. Detect and respect the project's installed tools; never install tools or run the application. Skip for documentation-only changes, trivial text/comment edits, and projects with no applicable quality tools.

  • Installs packages

77 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use spring-boot, logging-patterns 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.
  • ffsshhttiikkSkill

    spring-boot

    Spring Boot framework and Java enterprise patterns

    Also in 3 projects that use this

  • DIL8654Skill

    logging-patterns

    Keep logs structured, correlated, low-noise, and safe for production support. Use when adding operational logging, reviewing observability, or improving diagnostics in .NET services.

    Also in 3 projects that use this

  • mstuder-slalomSkill

    jpa-patterns

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    Also in 3 projects that use this

  • ffsshhttiikkSkill

    design-patterns

    Practical application and coding skills for Design Patterns

    Also in 4 projects that use this

  • glommerSkill

    pr-workflow

    General guidelines for Commits, formatting, CI, dependencies, security

    Also in 4 projects that use this

  • vm0-aiSkill

    cli-design

    Design patterns and conventions for the Okou CLI user experience

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 71 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these steps in order.

    line 29
  2. Distinctive:

    Look at the project root for the real source of truth — never assume.

    line 33
  3. Distinctive:

    After detecting the language, read the matching reference for the exact, project-respecting commands:

    line 44
  4. Distinctive:

    Only read the reference you actually need.

    line 50
  5. Very specific:

    Prefer the project's own script aliases (npm run lint, npm run typecheck) when they exist, because they encode the project's intended …

    line 56
  6. Distinctive:

    After each run, read the tool output carefully.

    line 60

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

Skill: code-quality

Automatically run a project's installed formatters, linters, and type-checkers against changed files, then report and fix issues — without running the application itself. Acts as a built-in quality gate so type errors, lint violations, and formatting drift are caught before a change is declared done.

When to trigger

Trigger this skill automatically after non-trivial source-code edits (skip documentation-only changes and trivial comment tweaks) in any project that has formatters/linters/type-checkers installed, before reporting "done" or "fixed". Also trigger on explicit requests like:

  • "check the project" / "lint this" / "type check" / "format the code"
  • "run quality checks" / "is it clean?"
  • "verify my changes" / "what did I break?"

The goal: never claim a change is complete while lint or type errors still exist on the touched files. Detection is mandatory before running anything — do not assume a tool exists just because the project is in a given language.

Core workflow

Follow these steps in order. The whole loop is: detect → run → read → fix → re-run.

1. Detect language and installed tools

Look at the project root for the real source of truth — never assume. Quick checklist:

  • package.json → Node.js. Read it to see which of these are in devDependencies/scripts: prettier, eslint, typescript (or tsc). Also check for config files: .prettierrc*, eslint.config.*, .eslintrc*, tsconfig*.json.
  • pyproject.toml / setup.cfg / requirements*.txt → Python. Look for black, ruff, mypy, isort, flake8.
  • go.mod → Go (gofmt, go vet).
  • Cargo.toml → Rust (cargo fmt, cargo clippy).

For details on detection and edge cases, read references/detection.md.

2. Route to the language module

After detecting the language, read the matching reference for the exact, project-respecting commands:

  • Node.js → references/nodejs.md
  • Python → references/python.md
  • (Other languages: follow the same pattern — prefer the project's own npm/pip/scripts over global commands.)

Only read the reference you actually need; don't load all of them.

3. Run checks on the changed files

Critical rule: scope formatters/linters to your changes where supported and respect project-level typecheck requirements. Whole-program diagnostics must also be checked for regressions in dependent callers; do not filter away evidence or assume every untouched-file error is pre-existing.

Prefer the project's own script aliases (npm run lint, npm run typecheck) when they exist, because they encode the project's intended config. Fall back to direct tool invocation only when no such script exists.

4. Read the output and distinguish your errors

After each run, read the tool output carefully. Separate:

  • Errors introduced by this change, including failures in dependent callers → fix them. A diagnostic outside the changed file is not automatically pre-existing; trace it to the changed contract or compare a baseline.
  • Confirmed pre-existing unrelated errors → do not fix them. Note them once and retain the command's real failure status; do not label a failing whole-project check as passed because filtered output looks clean.

5. Fix loop (re-run until clean)

Apply fixes, then re-run the same check on the same files. Loop a maximum of ~3 times. If an error won't clear (e.g. requires a config decision or a deliberate API change), stop and surface it to the user instead of looping forever or "fixing" it with a hack.

6. Report

Report concisely:

  • What was run and on which files.
  • What was fixed (auto-format, lint rule, type error).
  • Anything that remains open and why (pre-existing, needs user decision).

Hard rules

  • Read script contents before running them: check commands may format files, generate outputs, start services or install dependencies. Use the repository's installed binaries/runner and package manager; bare npx can download a missing package. Verify local availability, then use a direct local binary or supported no-install invocation.
  • A dependency/config declaration is a detection clue, not proof that an executable is installed. Missing one tool does not prevent running other available relevant checks; report the missing check separately.
  • Static checks complement behavior tests; they do not prove runtime correctness. For behavior changes use the project testing skill or behavioral-testing; for failed tests use test-failure-triage.
  • Never run the application (no npm start, node server.js, python main.py that boots the app). This skill is static checks only.
  • Never install new dev tools (no npm install -D ..., no pip install ...) to "make it work" — that changes the project's dependency surface. If one tool is missing, report that check as unavailable and continue other applicable installed checks.
  • Don't modify lint/format config to silence a violation. Fix the code, not the rule.
  • Don't touch files you didn't edit to "clean things up" — that's scope creep.
  • Respect the project's existing config and ignore patterns; don't override .eslintignore, .prettierignore, tsconfig.exclude, etc.

When the project has no tools installed

If none of prettier/eslint/tsc/etc. are present (no config files, no devDependencies entries, no scripts), do not run anything. Tell the user plainly: "No formatters, linters, or type-checkers detected for this project — nothing to run." Suggest (but do not install) common options if they ask.

Validation

  • Record each actual command, scope and exit status; list missing/skipped tools as not run rather than passed.
  • Re-read the final diff after autofixes to ensure unrelated user changes were not reformatted.
  • Whole-program failures remain failures even when unrelated; attribution to pre-existing issues has baseline or source evidence. Static success does not claim runtime correctness.

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.