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

code-quality

Skill0 starsChanged 3 months agoMITView on GitHub

Run a project's installed formatters, linters, and type-checkers against the files you actually changed, then fix and re-run — a static quality gate before a change is declared done. Trigger automatically after editing source files, or when the user asks to lint, type-check, format, or verify changes.

  • Installs packages

38 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use spring-boot, design-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.
  • MindrallySkill

    spring-boot

    Expert guidance for Spring Boot application development with best practices for RESTful APIs, testing, security, and deployment

    Also in 3 projects that use this

  • ratacatSkill

    design-patterns

    Use when designing software architecture, refactoring code structure, solving recurring design problems, or when code exhibits symptoms like tight coupling, rigid hierarchies, scattered responsibilities, or difficult-to-test components. Also use when choosing between architectural approaches or reviewing code for structural improvements.

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    python

    Python 3.13 with uv package manager via mise. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `python` work when listed in TEAM.yaml or explicitly requested.

    Also in 3 projects that use this

  • 0xSeroSkill

    security

    Also in 4 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 3 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    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 37 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 22
  2. Distinctive:

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

    line 26
  3. Distinctive:

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

    line 37
  4. Distinctive:

    Only read the reference you actually need.

    line 43
  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 49
  6. Distinctive:

    After each run, read the tool output carefully.

    line 53

“Common” is measured: kept by at least 6 in 10 of the 37 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 editing source files 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" / "make sure it builds" / "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 checks to the files you actually touched. Running eslint . or tsc on a huge repo is slow and floods the output with pre-existing errors you didn't cause. Pass explicit file paths to formatters/linters. Type-checkers that are whole-program (like tsc --noEmit) run at project scope by necessity — that's fine, but filter the output to the files/areas you changed when deciding what's "yours" to fix.

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 you introduced or can fix → fix them.
  • Pre-existing errors on untouched files → do not fix. Just note them once ("N pre-existing warnings elsewhere, not from this change"). Scope creep here wastes time and inflates diffs.

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

  • 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 a tool is missing, say so and stop.
  • 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.

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.