skills/code-quality/SKILL.md
Set up formatting, linting, import sorting, type checking, and pre-commit hooks when scaffolding or starting a new project. Use this skill whenever creating a new project, initializing a repo, scaffolding an app, or when the user asks to add linting/formatting to an existing project. Triggers on: "new project", "scaffold", "init", "set up linting", "add formatter", "add pre-commit hooks", "configure biome", "configure ruff". The goal is to establish code quality tooling from day one so issues are caught incrementally, not in a painful bulk-fix later.
npx skillsauth add rarestg/rarestg-skills code-qualityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When starting or scaffolding any project, set up formatting, linting, import sorting, type checking, and pre-commit hooks before writing application code. This prevents the painful scenario of adding these tools later and facing thousands of lines of formatting changes in a single commit.
Determine the project type from existing files or the scaffolding context:
| Signal | Ecosystem |
|--------|-----------|
| pyproject.toml, setup.py, requirements.txt, .py files | Python |
| package.json, tsconfig.json, .ts/.js/.tsx files | JavaScript/TypeScript |
| Both present | Monorepo — configure each ecosystem separately |
Also check for existing quality tooling configs (.eslintrc, .prettierrc, biome.json, [tool.black] or [tool.ruff] in pyproject.toml, .pre-commit-config.yaml, lefthook.yml). If present, preserve them — only migrate to different tools if the user explicitly requests it (see Guardrails).
After detecting the ecosystem, follow the appropriate guide:
Every project must expose these five commands (via package.json scripts or Makefile):
| Command | What it does |
|---------|-------------|
| format | Auto-format and sort imports |
| lint | Lint without writing (report only) |
| typecheck | Run type checker (tsc --noEmit, mypy, or pyright) |
| check | All non-writing checks: lint + typecheck + unused-code detection |
| check:fix | Run autofixers (format + lint fix), then run check |
Pre-commit hooks should run check:fix so that commits are always clean.
If a project already has code but no quality tooling:
chore: apply initial formattingchore: fix initial lint issues// biome-ignore, # noqa: XX) with comments explaining why — never bulk-suppress to make errors disappear.Before considering the setup done, verify:
I rules or Biome's organizeImports)format, lint, typecheck, check, check:fixpre-commit run --all-files or npx lefthook run pre-commit)tools
Break large code changes into small, stacked pull requests using vanilla git and the gh CLI. Auto-trigger when implementing a feature or change that spans multiple logical steps, touches several files, or will exceed ~200 changed lines. Also trigger on "stack PRs", "break this into smaller PRs", "stacked diffs", or "create a PR stack". Do NOT trigger for single-file fixes, small bug fixes, or changes under ~200 lines that are a single logical unit.
development
Export a PR's clean inline review comments, CodeRabbit outside-diff comments, and CodeRabbit nitpicks into local files, then triage review feedback through a stack-aware orchestrator workflow with durable reply drafts for follow-up PRs. Use when given a GitHub pull request URL and asked to work through review comments without relying on noisy raw API blobs.
development
Create, rewrite, or maintain a repository's AGENTS.md as a short dispatcher for coding agents. Use when asked to write an AGENTS.md from scratch, update stale agent instructions, shrink a bloated AGENTS.md, add repo guidance for AI/coding agents, or document where agents should find source-of-truth docs, invariants, validation commands, and workflow rules. Triggers on: "create AGENTS.md", "write an agents file", "update AGENTS.md", "maintain AGENTS.md", "fix our agent instructions", "make this repo easier for Codex/Claude/agents", "rewrite this bloated AGENTS.md".
development
Run reusable Graphify-led architecture analysis for codebases using semantic graphs, optional subagent extraction, graph synthesis, source-search validation, graph-shape review, and follow-up refactor planning. Use when asked to analyze repo architecture, god nodes, surprising edges, topology, module boundaries, or graph-derived cleanup/refactor opportunities.