#601

Global Rank · of 601 Skills

code-quality AI Agent Skill

View Source: rarestg/rarestg-skills

Safe

Installation

npx skills add rarestg/rarestg-skills --skill code-quality

10

Installs

Code Quality Setup

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.

Detect the ecosystem

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).

Set up tooling

After detecting the ecosystem, follow the appropriate guide:

  • Python projects — see python.md for Ruff + pre-commit setup
  • JS/TS projects — see javascript.md for Biome + Knip + lefthook + tsc setup

Standard command contract

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.

Workflow

  1. Install and configure the tools (formatter, linter, type checker)
  2. Add pre-commit hook infrastructure (lefthook or pre-commit)
  3. Run the full suite once to establish a clean baseline
  4. Fix any initial issues so the first "real" commit starts clean
  5. Commit the configuration files as the first or second commit in the project

When working on existing projects

If a project already has code but no quality tooling:

  1. Add and configure the tools
  2. Run the formatter first — commit the formatting changes in a single dedicated commit with a message like chore: apply initial formatting
  3. Run the linter — fix issues and commit separately: chore: fix initial lint issues
  4. Wire up pre-commit hooks last so all future commits are clean

Guardrails

  • Don't replace existing mature tooling. If a project already uses ESLint/Prettier, Black, or other established tools, keep them. Only migrate to Biome/Ruff if the user explicitly asks.
  • Don't broadly disable rules to force a green baseline. Use narrow, targeted exceptions (// biome-ignore, # noqa: XX) with comments explaining why — never bulk-suppress to make errors disappear.
  • If tooling binaries aren't available, scaffold configs anyway. Write the configuration files and report the install commands the user needs to run.

Completion checklist

Before considering the setup done, verify:

  1. Formatter, linter, and type checker installed and configured for the project's ecosystem
  2. Import sorting enabled (Ruff's I rules or Biome's organizeImports)
  3. All five standard commands work: format, lint, typecheck, check, check:fix
  4. Pre-commit hooks configured and executable (pre-commit run --all-files or npx lefthook run pre-commit)
  5. Baseline autofix applied and a clean check passes with no errors

Installs

Installs 10
Global Rank #601 of 601

Security Audit

ath Safe
socket Safe
Alerts: 0
snyk Low
EU EU-Hosted Inference API

Power your AI Agents with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

How to use this skill

1

Install code-quality by running npx skills add rarestg/rarestg-skills --skill code-quality in your project directory. Run the install command above in your project directory. The skill file will be downloaded from GitHub and placed in your project.

2

No configuration needed. Your AI agent (Claude Code, Cursor, Windsurf, etc.) automatically detects installed skills and uses them as context when generating code.

3

The skill enhances your agent's understanding of code-quality, helping it follow established patterns, avoid common mistakes, and produce production-ready output.

What you get

Skills are plain-text instruction files — not executable code. They encode expert knowledge about frameworks, languages, or tools that your AI agent reads to improve its output. This means zero runtime overhead, no dependency conflicts, and full transparency: you can read and review every instruction before installing.

Compatibility

This skill works with any AI coding agent that supports the skills.sh format, including Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider, and other tools that read project-level context files. Skills are framework-agnostic at the transport level — the content inside determines which language or framework it applies to.

Data sourced from the skills.sh registry and GitHub. Install counts and security audits are updated regularly.

EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.

Customer Support