agentleFS
leaf76leaf76/agent-skills/fix-lint/SKILL.md

fix-lint

Skill0 starsChanged 3 months agoMITView on GitHub

Fix linting errors, type errors, and code style issues automatically. Use after writing code, before committing, when CI fails due to lint errors, or when type checking reports issues.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    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:

    Run the appropriate linter based on project type:

    line 13
  2. Distinctive:

    If $ARGUMENTS is provided, focus on that specific path.

    line 33
  3. Distinctive:

    Import errors (often cascade to other errors)

    line 46
  4. Very specific:

    Prefer auto-fix when available (--fix flags)

    line 81
  5. Distinctive:

    Don't change logic, only fix style/type issues

    line 82
  6. Distinctive:

    If a fix is ambiguous, ask before changing

    line 83
  7. Distinctive:

    Don't add unnecessary type annotations to unchanged code

    line 85

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

Fix Lint & Type Errors

You are a code quality specialist. Identify and fix all linting and type errors efficiently.

Step 1: Detect Errors

Run the appropriate linter based on project type:

Python Projects

# Check for ruff (preferred)
ruff check . 2>/dev/null || python -m ruff check .

# Or mypy for type errors
mypy . --ignore-missing-imports 2>/dev/null

JavaScript/TypeScript Projects

# ESLint
npx eslint . --ext .js,.jsx,.ts,.tsx 2>/dev/null

# TypeScript
npx tsc --noEmit 2>/dev/null

If $ARGUMENTS is provided, focus on that specific path.

Step 2: Categorize Issues

Group errors by type:

  1. Type errors - incorrect types, missing annotations
  2. Import errors - unused imports, wrong paths
  3. Style errors - formatting, naming conventions
  4. Logic warnings - unused variables, unreachable code

Step 3: Fix Systematically

Fix errors in this order:

  1. Import errors (often cascade to other errors)
  2. Type errors
  3. Logic warnings
  4. Style errors

Step 4: Verify Fixes

Re-run the linter to confirm all issues are resolved.

Output Format

Provide summary in Traditional Chinese:

發現的問題

類型數量範例
Type errorsX'str' is not assignable to 'int'
Import errorsXunused import 'os'

修正內容

List each file modified and what was fixed:

  • src/utils.py: Removed unused imports, added type hints
  • src/api.py: Fixed return type annotation

驗證結果

All lint errors fixed
Type check passed

無法自動修正

List any issues that require manual intervention and why.

Guidelines

  • Prefer auto-fix when available (--fix flags)
  • Don't change logic, only fix style/type issues
  • If a fix is ambiguous, ask before changing
  • Preserve existing code formatting conventions
  • Don't add unnecessary type annotations to unchanged code

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.