quarry-policy
Skill112 starsChanged 37 days agoApache-2.0View on GitHub
Use when writing, explaining, compiling, or testing Quarry rules for LLM conversations and tool use.
In this repository2 other files it gives its agents.
- code-review-advancedSkill
- detection-rulesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 2 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use the plugin's installed language catalog.
- Very specific: line 11
Call quarry_reference with action: search and a short description of the behavior.
- Very specific: line 12
Call quarry_reference with action: get for the relevant item and example IDs.
- Very specific: line 17
Write one complete rule, including its rule name and condition block.
- Very specific: line 18
Call quarry_compile. Fix every error before presenting or scanning the rule.
- Very specific: line 19
Call quarry_scan with one explicit conversation or an ordered conversations batch when behavior must be demonstrated.
- Very specific: line 22
Add parentheses when a condition mixes boolean, flow, comparison, or text operators.
- Very specific: line 44
Treat a rejected_spellings row as an example to follow, never as text to paste.
- Distinctive: line 80
Treat scan status as part of the result:
- Very specific: line 82
Use matched only when completion_state is complete.
- Very specific: line 83
Do not treat invalid or incomplete as a clean non-match.
- Very specific: line 84
Read taxonomy labels from matches[].metadata.
- Very specific: line 86
Use documented fields such as call.name, call.response.result, and call.arguments.<application_key>.
- Very specific: line 90
Use only examples returned by quarry_reference.
- Very specific: line 92
Treat parameters: as the rule signature.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Quarry policy workflow
Use the plugin's installed language catalog. Do not guess syntax or copy language details from these instructions.
- Call
quarry_referencewithaction: searchand a short description of the behavior. - Call
quarry_referencewithaction: getfor 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. Checkmissing_idsandfiltered_idsbefore searching again: afiltered_idsentry means the ID was right and your ownkindsfilter excluded it, so widen or drop the filter rather than looking for another ID. - Write one complete rule, including its
rulename andconditionblock. - Call
quarry_compile. Fix every error before presenting or scanning the rule. - Call
quarry_scanwith one explicitconversationor an orderedconversationsbatch when behavior must be demonstrated. Pass one sharedparametersmap 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:
- Use
matchedonly whencompletion_stateiscomplete. - Do not treat
invalidorincompleteas a clean non-match. - Read taxonomy labels from
matches[].metadata. Quarry copies rule metadata; it does not infer a taxonomy. - Use documented fields such as
call.name,call.response.result, andcall.arguments.<application_key>. Compilation rejects unknown documented object fields. - Report missing model, text, or prober configuration from the returned diagnostics. Do not add credentials or backend settings to tool arguments.
- Use only examples returned by
quarry_reference; those examples were checked with the installed Quarry version. - Treat
parameters:as the rule signature. Supply every declared value and no undeclared values. Unmarked declarations are supplied per scan; addpolicyonly for a value fixed on the compiled policy.numberaccepts finite JSON numbers but not booleans or strings;textaccepts strings. Text is represented only byredacted: truein parameter evidence, never by its raw value. - For a batch, the rule compiles once, the shared parameter map applies to every conversation, and
resultspreserves input order. Read each item'scompletion_stateindependently.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

