/quarry:quarry-policyfrom quarry
Writes, explains, compiles, and tests Quarry policy rules for LLM conversations and tool use. Guides through reference lookups, compilation, and scanning.
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.
None: SKILL.md is the whole skill.
Use the plugin's installed language catalog. Do not guess syntax or copy language details from these instructions.
quarry_reference with action: search and a short description of the behavior.quarry_reference with action: get for the relevant item and example IDs. Ask for as
many as the request's ID limit allows per call (the tool schema gives the maximum), splitting
a longer list across calls. Check missing_ids and filtered_ids before searching again: a
filtered_ids entry means the ID was right and your own kinds filter excluded it, so widen
or drop the filter rather than looking for another ID.rule name and condition block.quarry_compile. Fix every error before presenting or scanning the rule.quarry_scan with one explicit conversation or an ordered conversations batch when
behavior must be demonstrated. Pass one shared parameters map when the rule declares inputs.Add parentheses when a condition mixes boolean, flow, comparison, or text operators. The
operator_precedence table says how they bind. It arrives with action: index; on any other
action, pass include_precedence: true to read it, and only once — it never changes.
A reference record lists only the keys that apply to it. A missing key means "not applicable",
so read the keys that are there and do not infer a value for one that is absent. action: get
names each tested example and whether each of its checks is meant to match; add
verbosity: "full" when the conversation a check scans is what you need to see.
The reference index lists configured models under model_aliases; pass include_models: true
to read them with another action. Do this once instead of repeating every description across
searches and gets. Read runtime_config_version before using an alias: version 2 operations are
methods to write after model("alias")., while version 1 operations are compatibility function
names. Choose the alias whose optional description fits the requested judgment and compile the
rule to verify that its adapter serves the operation.
Quarry deliberately rejects several spellings that look plausible, such as messages() for the
messages surface or first(tool_calls) for tool_calls[0]. Call quarry_reference with
action: rejected to read the full table before writing a rule, and read the rejected_spellings,
operator_keyword, or suggestions details on an unknown_function diagnostic instead of guessing
another spelling.
Treat a rejected_spellings row as an example to follow, never as text to paste. Its
documented_form and documented_replacement are spelled with whatever arguments the table
documents, so apply the pattern to the rule at hand and keep its own operands: given
first(tool_calls) → tool_calls[0], a rule that wrote first(messages) becomes
messages[0]. Pasting the documented replacement would change what the rule detects.
For example, begin this request with reference search:
{
"action": "search",
"query": "file read followed by HTTP request within three events"
}
Then retrieve the full records the search identifies:
{
"action": "get",
"ids": [
"function:called_tool",
"construct:flow-after-within",
"example:flow-operators"
]
}
Apply the returned syntax to the application's exact tool names:
rule "File data sent"
condition:
called_tool("http_request") after(within: 3) called_tool("read_file")
Treat scan status as part of the result:
matched only when completion_state is complete.invalid or incomplete as a clean non-match.matches[].metadata. Quarry copies rule metadata; it does not infer a
taxonomy.call.name, call.response.result, and
call.arguments.<application_key>. Compilation rejects unknown documented object fields.quarry_reference; those examples were checked with the installed
Quarry version.parameters: as the rule signature. Supply every declared value and no undeclared values.
Unmarked declarations are supplied per scan; add policy only for a value fixed on the compiled
policy. number accepts finite JSON numbers but not booleans or strings; text accepts strings.
Text is represented only by redacted: true in parameter evidence, never by its raw value.results preserves input order. Read each item's completion_state independently.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