MCPInstall

distill

Use when agent instruction files (AGENTS.md, rules/) need analysis, trimming, or restructuring. Orchestrates /imperatives → /policy-algebra → /visualize into a distillation pipeline.

Installs
300
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/camacho/ai-skills --skill distill
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads distill automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

/distill

Distill agent instruction files into structured imperatives, compose with policy algebra, and visualize the rule system. Three-stage pipeline.

Usage

/distill                                    # full pipeline on default files
/distill ai-workspace/rules/*.md            # specific targets
/distill --stage imperatives                # run only extraction
/distill --stage compose                    # run only policy algebra (requires prior extraction)
/distill --stage visualize                  # run only visualization (requires prior composition)

Pipeline

  ┌─────────────┐     ┌──────────────┐     ┌─────────────┐
  │ /imperatives │────▶│/policy-algebra│────▶│ /visualize  │
  │  extract     │     │  compose     │     │  render     │
  └─────────────┘     └──────────────┘     └─────────────┘
        │                    │                    │
    JSONL file         Starlark block      Mermaid diagrams

Stage 1 — Extract (/imperatives)

  1. Invoke /imperatives with the target files (or defaults: ai-workspace/rules/*.md + AGENTS.md).
  2. Save output to ai-workspace/research/<name>-imperatives.jsonl.
  3. Present the summary (count, level breakdown, scope breakdown).

Ask the user: "Review the extraction before composing? (y/continue)"

  • If yes: present the JSONL for review, wait for feedback, re-extract if needed.
  • If continue: proceed to Stage 2.

Stage 2 — Compose (/policy-algebra)

  1. Project the JSONL to natural-language bullets: <level>[ NOT] <subject> <predicate>[ when <when>] — one bullet per imperative.
  2. Invoke /policy-algebra with the projected bullets.
  3. Save the Starlark composition to ai-workspace/research/<name>-policy.md.
  4. Present the surfaced structure (decision functions, branching points).

Stage 3 — Visualize (/visualize)

  1. For each major decision function in the Starlark output, invoke /visualize.
  2. Content shape is typically graph (decision trees) → Mermaid flowcharts.
  3. Append diagrams to the policy doc.

Naming

The <name> slug defaults to the current date + "distill" (e.g., 2026-05-04-distill). Override with --name <slug>.

Output

All artifacts land in ai-workspace/research/:

  • <name>-imperatives.jsonl — structured extraction
  • <name>-policy.md — Starlark composition + diagrams

Failure modes

ConditionBehavior
/imperatives finds zero imperativesReport and stop. No point composing empty input.
/policy-algebra unavailableSkip Stage 2, warn. Stage 3 can still visualize the JSONL directly.
User interrupts between stagesArtifacts from completed stages are preserved. Resume with --stage.

When to use

  • AGENTS.md or rules/ grew past a size threshold and needs trimming
  • Before a major restructuring of agent instruction files
  • To audit what rules actually exist vs what you think exists
  • As input to a plan that modifies the rule system

FAQ

What does the distill skill do?

Use when agent instruction files (AGENTS.md, rules/) need analysis, trimming, or restructuring. Orchestrates /imperatives → /policy-algebra → /visualize into a distillation pipeline.

How do I install distill?

Run npx skills add https://github.com/camacho/ai-skills --skill distill in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/distill/ (personal) or .claude/skills/distill/ (project).

Which AI agents can use distill?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is distill safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains distill?

It is published by camacho in camacho/ai-skills. It has 300 recorded installs.

More from camacho/ai-skills

View all →

archive

camacho/ai-skills

Fills Outcomes & Learnings in a plan file and renames it to .done.md.

bail

camacho/ai-skills

Reflects, updates GitHub Issue, closes PR if open, cleans up worktree/branch.

capture

camacho/ai-skills

Creates a draft GitHub Issue with triage label from natural language description.

669 installs

plan-review

camacho/ai-skills

Auto-assembles review panel using deterministic rules, dispatches agents against plan file, collects verdicts.

orient

camacho/ai-skills

Fetches issue context, auto-detects task type, maps to branch prefix, presents brief.

reflect

camacho/ai-skills

Use after merging a branch or completing a task to consolidate learnings into memory layers, close out issues, and verify the phase gate.

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs