/quarry:detection-rulesfrom quarry
Builds and validates production Quarry detection rules for threat categories. Guides through constitution writing, labeling, calibration, and prefilter design.
Ships in quarry. 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.
Use this skill when the task is a production rule for a threat category (a taxonomy profile, a signature family), not a one-off rule. Such a rule inspects a few surfaces. On each surface an RE2 prefilter selects the new items, and one judge-model call on the same string flags an item above a threshold calibrated to a target false-positive rate. Every number that justifies the rule is measured on held-out data and recomputed by someone other than its designer.
Write and check rule syntax with the quarry-policy workflow
(../quarry-policy/SKILL.md): quarry_reference, quarry_compile, and
quarry_scan.
Work in this order. Each step names what it produces and the gate it must pass.
int(sha256(key), 16) mod 3, where the key
is the surface and the canonical input text, so the same input falls in one split everywhere.
Record the split before any scoring. Choose on dev, decide on accept, and report once on test.1/0 contract. Score every item in the form the serving path uses. See
references/judge.md.0.50 (0.1% FPR). Verify flagged benign items with the
labeler, and refit without the real attacks it confirms. Refit on the final prefilter's
population once the prefilter and policy are final, and recheck prefilter recall. See
references/calibration.md.quarry_compile against the Quarry version that will run the rule, and prove the scope with
quarry_scan. See
references/rule-shape.md.Hold to these outcomes throughout, whatever the host supports:
example.com,
198.51.100.x, <PAYLOAD>).Run design steps (prefilter, policy tuning) from a written task spec. The spec holds paths, targets, data rules, and an acceptance gate. Split it into a Design part and a Check part, and give them to different people or agents. Forbid commits in the spec, and review every diff an agent leaves.
references/pitfalls.md lists failures met while building rules this way; read it before step 3.
references/calibration.md (opens in a new tab)references/constitution.md (opens in a new tab)references/data.md (opens in a new tab)references/judge.md (opens in a new tab)references/measurement.md (opens in a new tab)references/pitfalls.md (opens in a new tab)references/prefilter.md (opens in a new tab)references/rule-shape.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cisco-ai-defense/project-quarry --plugin quarry2 skills in this plugin
Other plugins' skills for the same job