mechanical-enforcement
Installation
SKILL.md
Mechanical Enforcement
Rules a reviewer would otherwise have to remember belong in a linter. This skill is the curated catalogue of rules, the linters that enforce them, and the rationale for each — so a new project can be hardened without re-deriving the set.
This is a content skill, not a tool. It provides rules and snippets. For wiring those rules into git hooks, see the hk skill.
Principles
- Mechanical over social. If a rule relies on a reviewer remembering it, it will drift. Encode it in a linter, a type, or a test — never in a convention.
- Types first, lint second, tests third. Prefer
strictTypeScript / Pydantic / clippy to a custom lint rule. Reach for a lint rule when the type system can't express it. Reach for a test only when neither can. - Architectural boundaries are linter rules. Layers (domain ← infra, utilities ← server, UI ← schemas) are enforced with
no-restricted-imports/no-restricted-syntax, not trusted to vigilance. - Auto-fix where possible, gate where not. Formatters and whitespace fixers run with
fix = trueand re-stage. Correctness rules gate the commit. - Prefer opinionated presets, override minimally. Ultracite for Biome,
@commitlint/config-conventionalfor commits,next/core-web-vitalsfor Next. Only override with a comment explaining why. - The why lives with the rule. Every non-obvious override has an inline comment saying what would break if it were removed.
When to use this skill
- Setting up linting in a new project → pick linters from the table below, copy snippets from
references/, wire with thehkskill. - Hardening an existing project → audit against the rules catalogue, add the missing ones.
Related skills
More from connorads/dotfiles
web-animation-design
>
449firecrawl
|
286dependency-updater
Smart dependency management for any language. Auto-detects project type, applies safe updates automatically, prompts for major versions, diagnoses and fixes dependency issues.
247payload-cms
>
236hetzner-server
Create and manage Hetzner Cloud servers. Use when creating VPS/cloud servers, managing Hetzner infrastructure, or setting up dev/remote servers. Requires hcloud CLI.
212holistic-ux
>
98