code-quality

A code-review and quality-checking guide for Rust, TypeScript, Python, shell, and mixed codebases. It covers linting, formatting, maintainability, complexity, warnings, and coding rules.

In plain words
What is it for?
Use it to review changes, configure linters and formatters, check complexity, clean up warnings, and apply quality gates in a project.
Why use it?
It gives agents a consistent way to find code problems and report their severity before they become harder to fix.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/firstp1ck/pi-coding-agent-forge/code-quality
Any agent
npx skills add Firstp1ck/pi-coding-agent-forge --skill code-quality
Clone the repo
git clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forge

Made for: Claude Code, Codex.

Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,832 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00049 $0.01832
Opus 5 $0.00024 $0.00916
Sonnet 5 $0.00010 $0.00366
Haiku 4.5 $0.00005 $0.00183

Measured 2d ago against content hash acc38c1adc9c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-quality scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to code-quality — 25 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

pi-skill-code-quality/skills/code-quality/SKILL.md · 245 lines

How it starts

The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Quality

Structured code review and quality enforcement across the user's tech stacks. Checklists, linting strategies, and metrics to keep codebases healthy.

Quick Start

Run a Code Quality Check

  1. Run static analysis: Linters, type checkers, formatters
  2. Review against checklist: Language-specific items below
  3. Check complexity metrics: Cyclomatic < 25, data flow < 25
  4. Report findings: Structured output with severity and recommendations

Linting Configurations

Rust — Clippy Config

the user's standard clippy configuration (in Cargo.toml or .clippy.toml):

[lints.clippy]
cognitive_complexity = "warn"
pedantic = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
unwrap_used = "deny"

Standard commands:

cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo check
cargo test -- --test-threads=1

Key rules to enforce:

  • No .unwrap() in non-test code (use ? or .expect("reason"))
  • All public items have rustdoc (#[warn(missing_docs)])
  • #[must_use] on functions that return values that should be checked
  • When using #[allow(...)], always add a comment explaining why
  • If no good explanation exists for #[allow(...)], fix the issue instead

TypeScript — ESLint + Strict Mode

Recommended tsconfig.json strictness:

{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "exactOptionalPropertyTypes": true
  }
}

Key rules to enforce:

  • No any — use unknown and type guards instead
  • No // @ts-ignore — fix the type issue or use // @ts-expect-error with explanation
  • Prefer const over let, never use var
  • Use discriminated unions for state modeling
  • Explicit return types on exported functions

Python — Ruff + Mypy

Recommended pyproject.toml:

[tool.ruff]
target-version = "py312"
line-length = 88

[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "ANN", "B", "A", "C4", "DTZ", "ISC", "PIE", "PT", "RET", "SIM", "TCH", "ARG", "PTH", "ERA"]

[tool.mypy]
strict = true
warn_return_any = true
warn_unreachable = true

Read the full file on GitHub · 245 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 245 lines · 49 tokens per session scan A acc38c1adc9c

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository Firstp1ck/pi-coding-agent-forge (74 stars, last pushed 2d ago), licensed MIT. It adds 49 tokens to every session and 1,832 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to code-quality, differing in 25 lines, and is treated as a copy.