code-quality

A set of TypeScript and JavaScript code-design techniques for making code easier to reason about and keeping invalid states out of the program.

In plain words
What is it for?
Use it when refactoring, cleaning up, hardening, or designing code and public APIs. It is for quality improvements, not for investigating a specific bug.
Why use it?
It provides targeted ways to improve code structure, type safety, matching logic, input handling, and separation between pure logic and external 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/zernie/vigiles/code-quality
Any agent
npx skills add zernie/vigiles --skill code-quality
Clone the repo
git clone --depth 1 https://github.com/zernie/vigiles

Made for: Claude Code, Codex.

Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 829 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.00103 $0.00829
Opus 5 $0.00051 $0.00415
Sonnet 5 $0.00021 $0.00166
Haiku 4.5 $0.00010 $0.00083

Measured yesterday against content hash a55389952e86, 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 yesterday.

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 · 34 lines

How it starts

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

Apply a small set of type-driven quality techniques when writing or refactoring code. Each technique has its own reference — the principle, a real before/after from this repo, and the smells to grep for. Read the reference(s) that match the code in front of you; don't apply all five blindly.

When this fires

A request to refactor / clean up / improve / harden / tighten code or an API — or when you're about to write a new module/type/public export and want it right the first time. Not a bug hunt (use /code-review).

The techniques — read the matching reference

Smell in front of you Technique Reference
a magic 0 / "" / -1; the same primitive re-validated at many sites; "x" in obj repeated Parse, don't validate references/parse-dont-validate.md
a field that's always ""; boolean-flag soup; a sentinel standing in for "absent"; an impossible combo that still compiles Make illegal states irrepresentable references/make-illegal-states-irrepresentable.md
a switch/if-chain on a union with no exhaustiveness guard Exhaustive matching references/exhaustive-matching.md
logic tangled with IO (spawn/fetch/fs); a function that's hard to test Pure functions + injected seams references/pure-functions.md
a public export with a fuzzy shape; a string that means an enum; a leaked internal helper Public-API quality references/public-api-quality.md

Read the full file on GitHub · 34 lines

Files

What ships with it

5 files 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. yesterday First seen · 34 lines · 103 tokens per session scan A a55389952e86

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository zernie/vigiles (15 stars, last pushed yesterday), licensed MIT. It adds 103 tokens to every session and 829 once invoked, about $0.0005 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

issue-triage

Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.

rtk-ai/rtk · 70 tokens

hud

Configure HUD display options (layout, presets, display elements).

Yeachan-Heo/oh-my-claudecode · 14 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

kelos

Author, debug, and operate Kelos resources (Task, Session, Workspace, AgentConfig, TaskSpawner) on Kubernetes. Use for Kelos CRDs, resource manifests, the kelos CLI, or live cluster operations. Do not use for ordinary Kelos repo code edits, tests, reviews, build/CI, or git tasks unless they involve those resources.

kelos-dev/kelos · 76 tokens

trellis-brainstorm

Guides collaborative requirements discovery before implementation. Creates task directory, seeds PRD, asks high-value questions one at a time, researches technical choices, and converges on MVP scope. Use when requirements are unclear, there are multiple valid approaches, or the user describes a new feature or complex…

mindfold-ai/Trellis · 65 tokens

mulmoterminal-keys

Bind keyboard shortcuts and fix keyboard/clipboard behaviour in MulmoTerminal. Writes keymap, which Settings cannot set at all — its Keyboard shortcuts section is read-only, listing every action bound or not plus a send row. Explains copyOnSelect, questionPaneEnabled and terminalSubmit, which have their own Settings…

receptron/mulmoterminal · 289 tokens