code-quality

A set of rules for writing and changing code safely, with emphasis on explicit errors, checked assumptions, and correct handling of edge cases. It also uses each project’s own instructions.

In plain words
What is it for?
Use it before modifying code to guide implementation and review of error paths, invariants, boundary values, empty input, retries, and dependency failures.
Why use it?
It helps prevent silent wrong results, ignored failures, unsafe fallbacks, and code that does not handle unusual input or interrupted operations.

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/vanillagreencom/kendex/code-quality
Any agent
npx skills add vanillagreencom/kendex --skill code-quality
Clone the repo
git clone --depth 1 https://github.com/vanillagreencom/kendex

Made for: Claude Code, Codex.

Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,390 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00010 $0.01390
Opus 5 $0.00005 $0.00695
Sonnet 5 $0.00002 $0.00278
Haiku 4.5 $0.00001 $0.00139

Measured 2d ago against content hash 9ba816e101f5, 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.

.agents/skills/code-quality/SKILL.md · 79 lines

How it starts

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

Code Quality

Problem with this skill? Run kendex report — it files to the owning repo automatically. Do not hand-file.

Repo-specific standards live in each repo's ## Project Instructions section below and add to these rules.

Core Principle

A loud failure beats a silent wrong answer. Handle every error, check invariants, and never continue in a state the code does not understand.

Correctness

  • No workarounds or quick hacks. If the correct fix is larger than expected, say so.
  • Never fail open. A dependency failure (command, file, network, parse) must not leave the caller in a passing or default state: no validator degrading to "no findings", no probe failure read as "not applicable", no unchecked $(mktemp).
  • A branch that "shouldn't happen" is never an empty or silently-ignored else: assert it, return an explicit internal error, or mark it unreachable — with a message naming the violated invariant. Use plain conditionals only when both branches are expected paths.
  • An error path must name the actual cause, not a neighbouring dependency.
  • Handle edge cases: empty input, boundary values, junk prefixes/suffixes, interrupted-then-retried flows.

Prove Your Guards

A new or modified check, guard, assertion, or test ships with a must-fail control: plant the defect it catches (a red-first run or a temporary mutation) and see it go red before its green counts. A guard that pattern-matches source text also gets controls for shapes that satisfy the match without the property: comments, string and template-literal interiors, nested occurrences, alternate quoting, a braceless statement. Reject assertions loose enough to match a skip note, fixtures that never reach the guarded bound, and harness code that keeps alive what the implementation should.

  • A scripted text substitution asserts its match, or it is not an edit. Assert the pattern's occurrence count and that the file changed, or use an edit tool that errors on no match. Neither assertion holds on a symlink, which sed -i replaces with a new file while its target stands: resolve the path first, or refuse a symlink.
  • A floor alone is not a control. Derive the expected set from the artifact under test (the flag's own regex, the function's own body), never from a second list in a test file. Floor it, with a message naming the extractor as broken rather than the subject as sparse. Under-inclusion needs the floor plus a required member; over-inclusion needs a forbidden member. State which direction stays open.

Read the full file on GitHub · 79 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 79 lines · 10 tokens per session scan A 9ba816e101f5

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository vanillagreencom/kendex (65 stars, last pushed 2d ago), licensed MIT. It adds 10 tokens to every session and 1,390 once invoked, about $0.0001 per session on Opus 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-08-30.

Related

Other skills, from other repositories

surf

Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling, page inspection, network/CPU emulation, DevTools streaming, or AI queries via ChatGPT/Gemini/Perplexity/Grok/AI Studio.

w-winter/dot314 · 60 tokens

prose-review

Review prose written for others -- user-facing docs, prompts for other LLMs, inline comments, docstrings, and other-facing messages -- for local jargon leakage, orphaned references, missing grounding, and audience or genre misfit.

w-winter/dot314 · 50 tokens

text-search

Search indexed text corpora with qmd. For indexed content, prefer qmd over grep.

w-winter/dot314 · 22 tokens

repoprompt-tool-guidance-refresh

Refresh RepoPrompt tool guidance when the CLI/MCP surface changes. Tracks RepoPrompt CE (rpce-cli, the maintained target) across versions, and can diff the frozen Classic CLI (rp-cli) against CE. Uses /.pi/agent/skills/repoprompt-tool-guidance-refresh/scripts/track-rp-version.sh to capture/diff --help and -l (tool…

w-winter/dot314 · 115 tokens

xcodebuildmcp

Build/test Xcode projects via the XcodeBuildMCP MCP server using a local CLI wrapper for pi (no MCP support). Use when the user mentions Xcode, xcodebuild, iOS builds/tests, or XcodeBuildMCP.

w-winter/dot314 · 56 tokens

agent-browser

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

w-winter/dot314 · 51 tokens