agentleFS
matteingmatteing/opal/.claude/skills/lint-and-format/SKILL.md

lint-and-format

Skill59 starsChanged 9 months agoMITView on GitHub

Runs linting and formatting checks before committing. Use this skill after writing or modifying code to ensure it passes all linters and formatters before creating a commit.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. Mark-Life/peektrace★ 4same name
    2. royalpinto007/ship-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    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:

    After writing or modifying any source file, before creating a commit.

    line 13
  2. Distinctive:

    When the user asks to fix lint or formatting issues.

    line 14
  3. Distinctive:

    When a commit or CI fails due to formatting.

    line 15
  4. Distinctive:

    After making code changes, run the relevant lint/format check commands.

    line 57
  5. Distinctive:

    If there are failures, auto-fix them using the fix variants.

    line 58
  6. Distinctive:

    If auto-fix changes files, review the diff to make sure nothing unexpected changed.

    line 59
  7. Distinctive:

    Only then proceed with staging and committing.

    line 60
  8. Very specific:

    Prefer auto-fix (mise run format, lint:fix) over manual edits when possible.

    line 65
  9. Distinctive:

    If a lint rule seems wrong for a specific case, discuss with the user before adding a suppression comment.

    line 66
  10. Distinctive:

    Do not disable or weaken lint rules without explicit approval.

    line 67

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

Lint & Format Skill

You ensure all code passes the project's linters and formatters before it gets committed. This mirrors the lefthook pre-commit hooks and CI checks so problems are caught immediately.

When to act

  • After writing or modifying any source file, before creating a commit.
  • When the user asks to fix lint or formatting issues.
  • When a commit or CI fails due to formatting.

Commands

Elixir (lib/, test/, config/)

# Check formatting (what CI runs)
mise run lint:core

# Auto-fix formatting
mise run format:core

TypeScript/JavaScript (cli/)

# ESLint check
cd cli && pnpm lint

# ESLint auto-fix
cd cli && pnpm lint:fix

# Prettier check
cd cli && pnpm format:check

# Prettier auto-fix
cd cli && pnpm format

Run everything

# Check all (what CI runs)
mise run lint

# Fix all
mise run format

Workflow

  1. After making code changes, run the relevant lint/format check commands.
  2. If there are failures, auto-fix them using the fix variants.
  3. If auto-fix changes files, review the diff to make sure nothing unexpected changed.
  4. Only then proceed with staging and committing.

Rules

  1. Never commit code that fails linting or formatting checks.
  2. Prefer auto-fix (mise run format, lint:fix) over manual edits when possible.
  3. If a lint rule seems wrong for a specific case, discuss with the user before adding a suppression comment.
  4. Do not disable or weaken lint rules without explicit approval.

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.