/claude-engineering-skills:investigatefrom Claude Engineering Skills
Settle a factual claim about this repo with a measurement, not a recollection. Use when a number, a date, or a current state is asserted and needs checking: verify a figure in a doc or plan, establish when a change actually landed, reproduce a past measurement, or confirm whether something is really enabled/disabled/enforced. Forces a cross-check by a second INDEPENDENT method and a positive control, because a zero result and a broken instrument look identical. Pick by INPUT: a CLAIM to test comes here ("the cache cut cost 40%", "that landed in July"); a TOPIC to survey goes to /explain --history ("have we touched rate limiting?"). "Why is it this way" is /explain. Triggers on: "verify that", "is that number right", "is this still true", "when did we actually", "did that change land", "reproduce the measurement", "check whether X is really", "confirm the claim", "/investigate". Full command syntax: see the Usage section in this skill.
Ships in Claude Engineering Skills. 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.
Worktree preflight — in a linked git worktree the gitignored tooling tree
scripts/.claude-skills/is absent (git worktree adddoes not populate it), so every command below that uses it dies onMODULE_NOT_FOUND. Runnpm run skills:hydratefirst; if no such script exists,references/worktree-preflight.mdholds the entry to add (ask the user first: it editspackage.json). Keys are not copied: put them in~/.audit-loop.env, which every worktree reads.
Usage:
/investigate "<claim or question>" — verify one claim
/investigate "<claim>" --brief — emit a brief for a sub-agent/session
For claims with a truth value an instrument can settle. Two investigations on 2026-08-03 returned correct answers despite the method prescribed for them being wrong — the answers were right by luck. This skill exists so the next one is right on purpose.
Scope firewall: include a step only if it changes what you measure. "Why
is this code shaped this way" is /explain — recorded rationale, not
measurement. "Is the plan implemented" is /ux-lock verify. "Is the code
correct" is /audit-code.
Both 2026-08-03 briefs named a specific command. In both cases the named command fails silently on the exact question being asked — it returns a confident, well-formed, wrong answer rather than an error.
| Prescribed | Why it fails silently |
|---|---|
docker image inspect --format '{{.Size}}' | Under the containerd snapshotter this returns content size, not the disk usage figure the claim cited. They differ by 3.6x. Following the brief would have produced a rigorously-derived false contradiction. |
git log -S 'python3 make g++' | The commit removed the string from a RUN line and re-added it verbatim in a comment. Net occurrence count unchanged, so -S reports nothing. A reader reproducing the stated method would conclude the change never happened. |
Both over-specified how and under-specified what quantity is in question.
The pickaxe case is live in this repo.
scripts/explain-history.mjsrangit log --all -S <topic>as its content search. Measured on 2026-08-04:-S 'runJsonLinesAsyncStrict'→ 18 commits;-Gon the same symbol → 35. Seventeen commits that touched lines containing the symbol were invisible to the tool this repo ships for answering "have we touched this before?" Pass C (-G,source: git-touched) was added the same day.
Write down what is actually in question — the measurement, event or object —
and how you know that is the one the source meant. Do not assume the obvious
reading. .Size and disk usage are both "the image size"; only one is the
claim's figure.
If the brief you were handed names a command, treat that as a hint about intent, not an instruction. Say which quantity you concluded it meant, and why.
Also settle which question: verifying a historical claim and assessing current state are different. "Does the July figure reproduce at that commit" and "does the number still hold for what is deployed today" have different answers. Say which one you are answering, and if you think the other is the one that matters, say so.
State the method you chose and why. Then:
For "when did this change" questions, /explain --history "<topic>" is the
repo's cross-source instrument (git subject-grep + -S + -G, arch-memory,
plans, brainstorm ledger) — use it rather than a hand-rolled git log, and
treat its four sources as candidate cross-checks. For "is this stated gate
actually enforced" questions, npm run gates:check reads the gate-contract.json
binding directly. Neither removes the obligations below.
docs/runbooks/pre-ship-empirical-verify.md).Capture, don't summarise. A transcript showing only the successful commands is a reconstruction. Include failures and retries, in the order issued. Name any evidence file using the actual capture date, determined at run time — not a date copied from the brief.
Reproducing a number does not test the sentence it sits in. A recorded "22.5% image-size reduction" reproduced perfectly while its stated cause was false: the parent commit already had the property being credited, and the real mechanism accounted for 92% of the delta. A pass that checks figures and not attributions clears both.
So whenever the claim names a cause — "X made it faster / smaller / safer":
Report two verdicts, never one: figure: reproduced | refuted and
attribution: confirmed | refuted | untested. Fusing them is the artefact that
misleads — and untested is a legitimate result to report.
The chronological trap is the sibling, in both directions: do not infer causation from proximity (Step 3), and check the order actually holds — in the same engagement a campaign credited with enabling a migration began ninety minutes after that migration merged.
→ references/verification-discipline.md §4.
measured / derived / expected, and carry the fields
its kind requires — for measured, the exact command, the working context,
the immutable revision, the observation time; for derived, its sources and
formula; for expected, its basis and an explicit note that it is not a
measurement. A label with no evidence behind it is the same shape as a green
with no check. A documented test count once sat stale by 2.3x on count and
6.7x on wall clock, and nothing in the row said when it had last been true.file:line you cite to the commit you read it at — path:120 (a4ec98da). Cite append-newest-first files (status.md, changelogs) by
section header, never by line. A path is durable; a path plus a line is a
snapshot. Five of nine bad claims in one verified document were correct when
written and decayed afterwards. → references/verification-discipline.md §1-2.Recommend a position and justify it. Any options you list are illustrative, not exhaustive. If the honest answer is a split — drop one half of the claim, keep the other — say so. In one of the two source investigations the true answer was exactly that split, and a closed menu did not contain it.
The 2026-08-03 briefs got one half right and one half wrong, and the halves are independent. Both belong in any brief you write:
Incentive design — this worked, keep doing it. Removing the reward for a pleasing answer, by pre-authorising the unpleasing one and naming the specific cheat paths:
A failed reproduction is a legitimate and reportable result. I would rather narrow the claim than defend an inflated one. Do not adjust the figures to match a fresh build. Do not substitute a different commit or patch the old file to make it build.
Generic instructions to "be rigorous" do nothing; naming this task's specific corruption does.
Method prescription — this failed, and it is the harder one to see. The incentive failures are visible: you can read a brief and notice it is leading the witness. A wrong instrument is invisible from the brief — it looks like rigour. It only surfaces when someone knows the tool's semantics, and the whole point of delegating was that they might not.
This skill's canonical flow is above. The files below cover specialised situations — read them only when the trigger applies.
| File | Summary | Read when |
|---|---|---|
references/brief-skeleton.md | Copy-paste brief template for delegating an investigation to a sub-agent or fresh session. | Invoked with --brief, OR the user is writing instructions for another agent/session to run the investigation. |
references/verification-discipline.md | Verification discipline — pinned citations, figure provenance, two-direction proof, attribution, consumer-side checks. | Step 2.5 — the claim names a cause and the attribution needs testing, OR Step 3 — writing figures or file:line citations into a durable document. |
references/worktree-preflight.md | Worktree preflight remedy — the skills:hydrate npm script to add when a linked worktree lacks the tooling tree. | A command dies with MODULE_NOT_FOUND in a linked worktree AND this repo has no skills:hydrate script. |
What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/ai-context-managementManage AGENTS.md and CLAUDE.md alignment across a repo so Claude, Copilot,
Cursor, Windsurf, and other AI agents share the same project context.
Detects drift, reconciles manually-introduced divergence, and migrates legacy
CLAUDE.md-canonical repos to AGENTS.md-canonical.
Triggers on: "audit AGENTS.md", "check context drift", "AGENTS.md vs CLAUDE.md",
"fix context drift", "migrate to AGENTS.md",
"context sync", "what tools read which file", "ai-context-management".
Usage: /ai-context-management audit — Score drift + report findings
Usage: /ai-context-management reconcile — Apply patches to fix drift
Usage: /ai-context-management migrate — Flip legacy repo to AGENTS.md canonical
/audit-codeIteratively audit code against a plan with GPT + an independent final gate (Gemini, else Claude).
5-pass parallel static analysis (structure, wiring, backend, frontend,
sustainability), R2+ ledger-driven suppression, debt capture for
out-of-scope findings, max 6 rounds with 2-stable-rounds convergence.
Invoke this for ANY code-correctness review, even a small pasted snippet
or diff — don't just review it yourself directly; a single read-through
is not a substitute for the multi-pass GPT + final-gate adjudication this skill
performs, and skipping it means the review didn't actually happen.
Triggers on: "audit my code", "audit my changes", "audit my PR",
"check the implementation", "review my code", "audit code", "/audit-code",
"audit this", "verify the implementation".
Usage: /audit-code <plan-file> — Audit code against plan (--scope diff default)
Usage: /audit-code <plan-file> --scope plan — Audit only files mentioned in the plan
Usage: /audit-code <plan-file> --scope full — Full repo audit
Other plugins' skills for the same job
Generated from the plugin's indexed repository (lbstrydom/claude-engineering-skills) — no native marketplace selected
npx claudepluginhub p/lbstrydom-claude-engineering-skills