/shipwright:environments-scan runs instead · from shipwright
Scans a GitHub repo for environment readiness gaps: lockfile, pinned tool versions, preview environment, structured logging, error tracking, tracing/metrics, and staged/canary deploy. Writes findings to docs/patrols/environments.md. Report only, no code changes.
This skill never runs in Claude Code
It ships in shipwright at skills/, but /shipwright:environments-scan (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Scan one repo for the gaps behind the readiness catalogue's environments checks
(docs/readiness.md), write the open items to
docs/patrols/environments.md, and hand the structured findings to /environments-fix. This
skill makes no code changes to the scanned code.
Run by the environments system cron, one task per repo, as
/shipwright:environments-scan --repo {repo} then /shipwright:environments-fix --repo {repo}
(the system-cron contract: docs/task-store.md, "System-cron contract").
--repo org/repo is required. If it is missing, print the following and stop without
scanning repos/ or doing any other work:
Usage: /shipwright:environments-scan --repo org/repo [--summary] [--dry-run]
--summary — print the summary only; skip the docs file and the handoff--dry-run — run the full scan, but write no commit, no PR and no run recordFind the repo's clone by matching each repos/*/ origin remote against org/repo (clone it
if none matches) and work in a worktree, never in the clone itself. Follow the docs-PR flow of
/shipwright:entropy-scan Step 0 with the branch prefix docs/environments-patrol-
(open-PR supersession check first; reuse an earlier-day PR's branch). Note git rev-parse HEAD.
bun run "${CLAUDE_PLUGIN_ROOT}/scripts/cron-run-recorder.ts" prior \
--cron environments --repo {org}/{repo}
latest is used only to word the summary, never to skip the scan. If the recorder errors, log
it and continue with no prior state.
List this repo's active tasks (status=pending, in_progress, pr_open, blocked; limit=1000;
follow nextCursor until null) and write [{id, status}] to /tmp/environments-active.json.
bun "${CLAUDE_PLUGIN_ROOT}/scripts/environments-scan.ts" scan --repo {org}/{repo} \
--root . --active-tasks /tmp/environments-active.json --out /tmp/environments-result.json
Detection is deterministic file inspection (no network), reusing the toolchain detection's
lockfile and manifest recognition (references/toolchain-patterns.md). The output carries
findings, the candidate doc, materiallyChanged, violations, planned tasks and
metrics. The checks are:
Write the findings and planned tasks to .environments-patrol/findings.json in the worktree
(local scratch for /environments-fix, never committed).
Skip under --summary. Write doc from Step 3 to a temp file and validate it:
bun "${CLAUDE_PLUGIN_ROOT}/scripts/check-patrol-docs.ts" /tmp/environments-candidate.md docs/patrols/environments.md
The doc is current open items only: at most 150 lines, no count tables, no run history, no resolved items, no timestamps. All numbers go in the run record.
materiallyChanged: leave the file untouched, commit nothing, open no PR.materiallyChanged, not --dry-run: copy the candidate over the file, commit
docs: environments patrol ({YYYYMMDD}), push, and open (or update) the docs PR with the
shipwright label, as in /shipwright:entropy-scan Step 4.3.--dry-run: print whether a PR would open; write nothing.On failure, record a failed run (below) before stopping.
Cap the output at 3-5 lines: ENVIRONMENTS SCAN COMPLETE — {org/repo}: {N} open items, the
routes (auto/review/plan), and the docs PR url or unchanged. Next: /environments-fix.
/environments-fix records the single success run. This skill records only a failed run,
never under --dry-run:
echo '{"outcome": "failed", "metrics": {"error": 1}}' > /tmp/environments-result.json
bun run "${CLAUDE_PLUGIN_ROOT}/scripts/cron-run-recorder.ts" record --cron environments \
--repo {org}/{repo} --commit {sha} --result /tmp/environments-result.json
--repo is required. Never scan repos/ as a list or infer the repo from the cwd.docs/patrols/environments.md, via the docs PR./environments-fix..environments-patrol/ is scratch and never committed.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub app-vitals/shipwright --plugin shipwright27 skills in this plugin
/agent-readinessScore one repo against the agent-readiness catalogue (docs/readiness.md) with the deterministic scorer, post one ReadinessSnapshot and record one run. Requires --repo org/repo. No model judgment, no task creation, no repo files./canary-executionCross-cutting contract for the test-readiness pipeline. Defines how canary-eligible test code runs in two modes — `local` (boot dependencies inline, hit localhost) and `canary` (skip the boot, hit a deployed `TEST_TARGET_URL`) — via a dedicated entry point separate from the local smoke runner. Specifies eligibility rules (read-only or self-cleaning, smoke/E2E only, critical/high tier only, zero DB-dependent tests) and the deploy-gate budget (<60s wall time). Referenced by the inventory, system-design, migration, and roadmap skills.
/duplication-fixRead a repo's ready_to_propose duplication patterns from the task store (PatrolFinding) and queue them as routed task-store tasks (auto, review or plan), one task per pattern, each carrying a strangler-fig (build -> coexist -> eliminate) execution plan. Requires --repo org/repo and duplication-scan to have run first./duplication-scanDiscover emerging duplicate/similar code patterns in one repo via judgment-driven comparison, track them across runs in the task store's PatrolFinding ledger, and list only stabilized open patterns in docs/patrols/duplication.md. Requires --repo org/repo. Report only — no code changes./entropy-fixRead the entropy-scan handoff for one repo and route PR-worthy violations as task-store tasks (auto / review / plan), one task per rule. Requires --repo org/repo and /entropy-scan to have run first./entropy-scanScan one repo for principle deviations and write docs/patrols/entropy.md. Requires --repo org/repo. Report only — no code changes.Other plugins' skills for the same job