/foreman-qa:foreman-code-qualityfrom foreman-qa
Enforces Foreman code quality gates: docs-check (markdownlint, codespell, lychee, vendor-invocation drift, shdoc comment coverage), shellcheck, file modes, safe scripted edits, and the TypeScript/Effect Iron Rule.
Ships in foreman-qa. 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.
Gates and repeat failures that turn CI red after a change looks done. Run these
yourself before git add, not after a green-looking diff.
skills/foreman/scripts/docs-check.sh runs five checks in order:
**/*.md.codespellrc)--online for live links)agents/, .agents/,
.claude/agents/, .codex/agents/ for raw grok/codex/claude/agy
invocations that must come from scripts/adapters/VENDOR.sh insteadExit codes are fail-closed:
| Code | Meaning |
|---|---|
| 0 | All checks pass |
| 1 | Findings in one or more checks |
| 2 | A required tool is missing from PATH (gate refuses to skip) |
VENDORED paths are skipped by markdown, lychee, and comment-coverage
sweeps: skills/scrapling, skills/graphify, skills/superpowers,
docs/research, sandbox, .harness, FOREMAN_REPORT.md and .json,
node_modules. Do not put new first-party shell under those paths expecting
the gate to check it.
Every shell function (bare or function-prefixed name followed by
parentheses) must be immediately preceded by a comment block that contains an
@description line (# @description ...). Blank lines between the header and
the function are skipped; any other line breaks the association.
@description. Missing it fails even if
the function is otherwise well commented.@arg, @stdout, @exitcode, @set, @return are shdoc conventions to
add as applicable; the gate does not require them.main() exemption.*.sh outside VENDORED, .claude, and
openspec/changes/archive also needs a top-of-file purpose comment within
the first 6 lines, excluding the shebang.This fails late: a helper added at the end of a change without a header. Run
skills/foreman/scripts/docs-check.sh yourself before committing.
Compliant header shape (from docs-check.sh):
# @description Record one tool result.
# @arg $1 tool key
# @arg $2 status pass|fail|missing
# @arg $3 finding count
record() { T_STATUS[$1]="$2"; T_FINDINGS[$1]="${3:-0}"; return 0; }
Full shell detail: Shell conventions.
Short rules; full text and examples in Shell conventions.
# shellcheck disable=SC2016 on the line above with a why-comment.
A disable on the line before a function scopes to that function only; for
the whole file, place the directive at the top before any code.mv/rename over the original. Never open a tracked file for writing
directly — a redirect truncates first; a failed write has already emptied
the file.git add and commit on a
verification step that returns nonzero before staging (set -e or
explicit exit 1). Logging "verification failed" and committing anyway
has pushed corruption.100755; sourced .bash
libraries and .bats files are 100644. Check the index with
git ls-files -s PATHS and bats tests/line-endings.bats, not only the
working tree..gitattributes sets text=auto eol=lf plus explicit eol=lf for
*.sh/*.bash/*.bats; CRLF carve-outs only for *.bat/*.cmd/*.ps1.
Read the header of tests/line-endings.bats for what it asserts.$GITHUB_PATH writes only take effect on the
next step; export PATH=... explicitly in the same step for
anything that step itself needs. A "missing" tool on a hosted runner
can be a PATH gap rather than an absent package. Full detail:
Shell conventions.The index is a snapshot at git add time, not a live view of the working
tree. Edits after git add are not in the next commit unless you re-add.
git add -A or git add PATH again.git status --porcelain must return empty. Nonempty means
the working tree still differs from HEAD.A commit in this repository once captured pre-edit contents because the fix
landed after git add and before git commit.
Short rules; full text in TypeScript conventions. Canonical sources: CLAUDE.md, AGENTS.md, design.
Effect.try / Effect.either at the boundary is correct.skills/foreman/runtime/dist/ and
skills/foreman/runtime/manifest.json are generated. Never hand-edit.
After TS source changes that feed a bundle: run the package build script,
commit source + regenerated dist/manifest together, prove
git diff --exit-code on dist is clean.components/council/packages/; new TS work goes in
the appropriate package src/.Satisfy markdownlint-cli2 per repo root .markdownlint-cli2.jsonc:
Write terse declarative prose. Do not invent rules not given here or measured in the repo. If unsure of a fact, write "check X" rather than asserting a guess.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub charleshoskinson/foreman --plugin foreman-qa5 skills in this plugin
/foreman-afkUse before and during any unattended (AFK) run - how to pace work, what a backstop is for, and the failure that cost a night/foreman-qaUse before claiming any Foreman work is done, verified, or passing - the evidence rules that separate a measured result from a plausible claim./foreman-qa-maintenanceUse at the end of a Foreman iteration or release to fold what was learned back into the foreman-qa plugin so it does not go stale./foreman-testingUse when running, extending, or debugging the Foreman bats suite - covers the gate mutex, baseline and skip-budget ratchets, positive controls, and bats assertion semantics.Other plugins' skills for the same job