dotfiles: Skill for Claude Code

.claude/skills/code-quality/SKILL.md

code-quality is a skill for Claude Code from ahonn/dotfiles. It costs 20 tokens per session (443 once invoked), scanned A, original, MIT.

A set of standards for making code easier to read and maintain. It covers complexity, modular design, code smells, and comments.

In plain words
What is it for?
Use it while writing or reviewing code, or when cleaning up comments and simplifying the structure of a codebase.
Why use it?
It helps prevent small shortcuts from creating tangled code that is difficult to change or understand later.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is ahonn/dotfiles's own configuration. It tells Claude Code how to work on dotfiles itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dotfiles configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ahonn/dotfiles. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ahonn/dotfiles/master/.claude/skills/code-quality/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ahonn/dotfiles

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/ahonn/dotfiles/code-quality/github.svg)](https://agentmods.dev/skills/ahonn/dotfiles/code-quality)
Your own site
<a href="https://agentmods.dev/skills/ahonn/dotfiles/code-quality"><img src="https://agentmods.dev/badge/skills/ahonn/dotfiles/code-quality/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-quality

Your own site · 80×15
<a href="https://agentmods.dev/skills/ahonn/dotfiles/code-quality"><img src="https://agentmods.dev/badge/skills/ahonn/dotfiles/code-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 443 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.1 $0.00020 $0.00443
Opus 5.5 $0.00008 $0.00177
Sonnet 5.5 $0.00004 $0.00089
Haiku 4.5 $0.00002 $0.00044

Measured 20d ago against content hash 8b51e6af2a97, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 20d 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.

.claude/skills/code-quality/SKILL.md · 44 lines

How it starts

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

Code Quality and Comment Cleanup

Meet the requested behavior and correctness constraints first. Within those constraints, prefer readability and maintainability over speculative optimization or shorter code.

Maintainability Review

Look for problems with a concrete cost to callers or future changes:

  • Change amplification: one behavior requires coordinated edits across unrelated modules.
  • Cognitive load: callers must know implementation details to use an interface correctly.
  • Hidden coupling: dependencies or shared state make the effects of a change hard to locate.
  • Redundant or speculative abstractions: indirection adds concepts without hiding useful complexity.

Explain the affected behavior or maintenance cost before recommending a refactor. Preserve useful existing patterns and idiomatic language conventions. Offer alternatives only when their tradeoffs matter; do not treat every code smell as a defect or permission to rewrite adjacent code.

For interface design decisions, the codebase-design skill provides more detailed criteria when available.

Error Handling

  • Prefer representations that make invalid states difficult to create.
  • Recover at a layer that can restore the operation's contract; propagate failures when recovery is unavailable.
  • Preserve diagnostic context when translating errors. Do not hide a failure behind an apparent success.
  • Choose fatal handling only for a demonstrated unrecoverable invariant and in line with the runtime and project's conventions.

Comments

Keep explanations of intent, tradeoffs, contracts, non-obvious behavior, and constraints that the code cannot express clearly. Update comments made stale by the change.

Remove redundant narration where naming and structure already communicate the behavior. Preserve licenses, tooling directives, required documentation, and historical context that still explains a constraint.

When invoked for comment cleanup on a file:

  1. Read enough surrounding code to understand the comments' purpose.
  2. Edit misleading or redundant comments and retain useful rationale.
  3. Keep runtime behavior unchanged. Suggest larger naming or structural improvements separately unless the user also requested them.

Read the full file on GitHub · 44 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. 20d ago Changed · -42 lines · -36 tokens per session 8b51e6af2a97
  2. 1mo ago First seen · 86 lines · 56 tokens per session scan A 9923365fe550

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository ahonn/dotfiles (63 stars, last pushed 6d ago), licensed MIT. It adds 20 tokens to every session and 443 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

pr-review

Intelligent PR code review with dynamic agent allocation based on change types. Analyzes PR changes and generates targeted review tasks.

magic3007/dotfiles · 28 tokens

analyze-pr

Analyze a GitHub/GitLab Pull Request by fetching its diff, reading its web description, and generating a comprehensive document. Use when the user provides a PR link and wants to understand what changes the PR introduces, or asks to review/analyze/summarize a pull request.

magic3007/dotfiles · 60 tokens

assess-quality

Foundational quality framework: the five questions (readable, easy to start, expands without bloat, consistent, intentional) every other dev skill is judged against, plus the dual-audience and workshop principles. Use when onboarding to a project, defining a quality bar, setting an assessment checklist, or arbitrating…

urmzd/dotfiles · 120 tokens

merge-ready

Drive an existing pull request to a mergeable state: get CI green, resolve merge conflicts with the base branch, address and resolve review comments, trigger required bot reviews/approvals (e.g. commenting '@claude review'), link associated issues, and clean up the PR title and description. Ends with a readiness…

urmzd/dotfiles · 208 tokens

check-project

Validate project structure against scaffold conventions -- check for required files, CI consistency, documentation completeness, sub-package/workspace members, and optional directory usage, reporting PASS/WARN/FAIL with fix suggestions. Use to audit an existing project or verify a scaffold was applied correctly. Do…

urmzd/dotfiles · 82 tokens

review-diff

Standardized review of the CURRENT working-tree changes -- staged, unstaged, and untracked -- against an explicit five-dimension rubric (correctness, security, tests, scope-creep, conventions). Emits a prioritized findings list, each with file:line, severity, and a suggested fix. Read-only: it reviews and reports, it…

urmzd/dotfiles · 170 tokens