/ratchet-code:static-code-analysisfrom ratchet-code
Use when creating a new repository, adding a language or toolchain to one, or auditing which static checks a repository is missing. Choose and wire up static code analysis for a repository - which linters, formatters, type checks, dead-code, dependency, workflow, secret, and infrastructure checks to add, with the settings to start from.
Ships in ratchet-code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Pick the checks a repository needs from what it contains, then wire them so they fail the build.
Read every applicable AGENTS.md first. Repository-local policy owns tool versions, thresholds,
runner labels, and exceptions, and overrides these defaults.
A new repository has zero findings, so every check starts at its strictest setting for free. Adding the same check later means a cleanup or a baseline file. Add each check when the thing it inspects first appears, not when it first causes a problem.
| Check | Tool | Start from |
|---|---|---|
| Formatting | the language formatter | Check mode in CI (--check), never a rewrite. Covers Markdown, JSON, YAML. |
| Workflow syntax | actionlint | Every push that touches .github/workflows. It runs shellcheck on Bash and sh run: steps only when shellcheck is installed, so install it in that job. |
| Workflow security | zizmor | --min-severity high --min-confidence high. Add with the first workflow that holds a secret or a write permission. |
| Committed secrets | gitleaks | Default rules, on every push and over history once. Allowlist one finding by fingerprint, or a path together with the rule, with a reason. Never a whole path. |
| File size | the linter's own rule | 200 lines per source file, 500 per test file. Keep tests in separate files. |
| File complexity | scc --by-file | Fail any source file whose complexity is over 50. Exclude tests and fixtures. One tool covers every language, unlike a per-function linter rule. |
| Licenses | the package manager's license list | Deny strong copyleft (GPL, AGPL, SSPL) and unknown licenses; fail closed on an expression it cannot parse. Allow an exception per package, with a reason. |
| Known vulnerabilities | osv-scanner | Scan every lockfile. The dependency bot's alerts do not fail a build; this does. |
The baseline is not the whole answer for any language. Before choosing, read the reference for each thing the repository contains; each lists the tools, the trigger for each, and the settings to start from.
When review catches the same mistake twice, encode it. Pick the narrowest owner that can express it, in this order:
no-restricted-imports.ast-grep, for a shape inside one file.Write accepted and rejected fixtures before the rule. Keep every suppression and allowlist narrow, give it a reason, and delete it when the reason is gone.
lint command that runs them all.
CI runs the same commands a developer runs.oxlint and oxfmt.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jongleberry/ratchet-stack --plugin ratchet-code12 skills in this plugin
/interface-feedbackUse when writing or reviewing interface code that shows an action button, a toast or error message, or a form's submit, including a review of such a diff. Show only the actions the server allows this viewer and why one is blocked, render errors by code with their details, and check a submit's preconditions so it never succeeds partly in silence./lint-rule-authoringUse when writing or reviewing the code of a lint rule, analyzer, or codemod that walks a syntax tree, such as an ESLint or oxlint rule, a Clippy lint, or a custom AST check, including a request to "write a rule that bans X". Covers finding the rule's subject by what a name is bound to, reporting a name it cannot trace, and the fixtures that prove both./