agentleFS
cisco-ai-defensecisco-ai-defense/project-quarry/skills/quarry-policy/SKILL.md

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.

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
  1. Distinctive:

    Use the plugin's installed language catalog.

    line 8
  2. Very specific:

    Call quarry_reference with action: search and a short description of the behavior.

    line 11
  3. Very specific:

    Call quarry_reference with action: get for the relevant item and example IDs.

    line 12
  4. Very specific:

    Write one complete rule, including its rule name and condition block.

    line 17
  5. Very specific:

    Call quarry_compile. Fix every error before presenting or scanning the rule.

    line 18
  6. Very specific:

    Call quarry_scan with one explicit conversation or an ordered conversations batch when behavior must be demonstrated.

    line 19
  7. Very specific:

    Add parentheses when a condition mixes boolean, flow, comparison, or text operators.

    line 22
  8. Very specific:

    Treat a rejected_spellings row as an example to follow, never as text to paste.

    line 44
  9. Distinctive:

    Treat scan status as part of the result:

    line 80
  10. Very specific:

    Use matched only when completion_state is complete.

    line 82
  11. Very specific:

    Do not treat invalid or incomplete as a clean non-match.

    line 83
  12. Very specific:

    Read taxonomy labels from matches[].metadata.

    line 84
  13. Very specific:

    Use documented fields such as call.name, call.response.result, and call.arguments.<application_key>.

    line 86
  14. Very specific:

    Use only examples returned by quarry_reference.

    line 90
  15. Very specific:

    Treat parameters: as the rule signature.

    line 92

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Quarry policy workflow

Use the plugin's installed language catalog. Do not guess syntax or copy language details from these instructions.

  1. Call quarry_reference with action: search and a short description of the behavior.
  2. Call 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.
  3. Write one complete rule, including its rule name and condition block.
  4. Call quarry_compile. Fix every error before presenting or scanning the rule.
  5. Call 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:

  • Use matched only when completion_state is complete.
  • Do not treat invalid or incomplete as 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, and call.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; 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.
  • For a batch, the rule compiles once, the shared parameter map applies to every conversation, and results preserves input order. Read each item's completion_state independently.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.