agentleFS
jazz1xjazz1x/galmuri/skills/distill/SKILL.md

distill

Skill3 starsChanged 7 months agoMITView on GitHub

Core engine. Essence reduction + first-principles decomposition + Socratic validation. Invoked by adapters or directly. No persistence (adapters own that). Triggers: "distill", "핵심만", "본질", "distill engine"

39 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use overdrive, arrange and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • nikafastovets-langSkill

    overdrive

    Push interfaces past conventional limits with technically ambitious implementations. Whether that's a shader, a 60fps virtual table, spring physics on a dialog, or scroll-driven reveals — make users ask "how did they do that?

    Also in 12 projects that use this

  • nikafastovets-langSkill

    arrange

    Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy to create intentional compositions.

    Also in 6 projects that use this

  • QredenceSkill

    layout

    Diagnose or improve layout in selected Figma frames, screens, components, or Figma Make prototypes by clarifying reading order, grouping, hierarchy, spacing rhythm, density, adaptation, and content extremes. Use when UI feels crowded, flat, misaligned, hard to scan, structurally unclear, or unstable across sizes.

    Also in 5 projects that use this

  • tdiminoSkill

    shape

    Plan the UX and UI for a feature before writing code. Run a structured discovery interview, then produce a design brief (.design-context.md) that guides implementation. Establishes design direction, constraints, and strategy before any code is written. Triggers on plan the design, design brief, shape the UX, before we build, design discovery.

    Also in 6 projects that use this

  • MicrosoftSkill

    impeccable

    Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.

    Also in 6 projects that use this

  • termdockSkill

    recall

    Retrieves cross-session memories about past decisions, lessons, and patterns. Use when user asks about prior work, past decisions, or mentions a feature. Triggers include check memory, what did we decide, how did we solve.

    Also in 4 projects that use this

  • +1 more from nikafastovets-lang

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 36 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No persistence here — the adapter receives EngineOutput and decides whether to persist.

    line 120

“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “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

galmuri:distill — Core Engine

Prerequisites

  • scripts/preflight.sh passes (jq, bats, bash required).
  • scripts/parse-ratio.sh and scripts/validate-essence.sh are executable.

Flags

FlagRequiredDescription
--mode reduce|constructYes (when called directly)reduce = essence reduction, construct = structural expansion
--ratio 0.05–0.5No (used in reduce mode)Natural-language values accepted — parsed by parse-ratio.sh
--audience {target}NoIf omitted, the adapter handles it via HITL
--weak-decompositionNoAllow Weak D/E/V/R decomposition
--input {path}NoFile path instead of stdin

Step 1: Input Capture [bash]

Persist source text to .galmuri/tmp/source-{slug}.txt and reset the retry counter (clears leftovers from prior sessions). If --mode is specified, skip Step 2 and jump to Step 3.

mkdir -p .galmuri/tmp
SLUG=$(echo "$INPUT" | head -c 40 | tr -cs '[:alnum:]' '-' | tr '[:upper:]' '[:lower:]')
cat > ".galmuri/tmp/source-${SLUG}.txt"
rm -f ".galmuri/tmp/retry-count.${SLUG}"

Step 2: Mode Selection [bash + HITL]

Skipped when --mode is explicit. Otherwise: count tokens, suggest a mode (< 80 → construct, ≥ 80 → reduce), confirm via HITL — "Proceed with reduce or construct? e.g. reduce (summarize), construct (structural expansion)."

TOKEN_JSON=$(bash scripts/count-tokens.sh ".galmuri/tmp/source-${SLUG}.txt")
TOKEN_COUNT=$(printf '%s' "$TOKEN_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['tokens'])")
[ "$TOKEN_COUNT" -lt 80 ] \
  && echo "[distill] short input (${TOKEN_COUNT} tokens) → construct mode recommended" \
  || echo "[distill] long input (${TOKEN_COUNT} tokens) → reduce mode recommended"

Step 3: Apply the 3 Methods [LLM]

Apply the three method references in order:

#MethodReferenceOutput
1Essence reductionreferences/prompt.mdeach claim → one-line subject-verb essence
2First-principles decompositionreferences/decomposition.md4 D/E/V/R questions (Weak mode under --weak-decomposition)
3Socratic validationreferences/socratic_probe.md3-axis probe → failed units → dropped[]

Retry contract (deterministic): (A) produce candidate essence_units → (B) schema-check via bash scripts/validate-essence.sh → (C) in reduce mode, re-apply if |actual_ratio − target_ratio| > 0.05 (max 2 retries; past that, fall through to Step 5 HITL).

COUNT_FILE=".galmuri/tmp/retry-count.${SLUG}"
CURRENT=$(cat "$COUNT_FILE" 2>/dev/null || echo 0)
echo $((CURRENT + 1)) > "$COUNT_FILE"

Step 4: Ratio Validation [bash] (reduce mode only)

Final adjudication after the Step 3 LLM loop. If |drift| > 0.05 persists: re-enter Step 3 when retry-count < 2, else fall through to Step 5 HITL.

bash scripts/validate-essence.sh < output.json
bash scripts/count-tokens.sh output.json

Step 5: Output [bash]

validate-essence.sh pass is mandatory → emit EngineOutput JSON. Fail → exit 1 + HITL ([a]ccept / [r]e-target / [c]ancel). Either branch cleans up the retry counter before exit.

bash scripts/validate-essence.sh < final-output.json || {
  echo "[distill] validation failed"   # HITL: [a]ccept / [r]e-target / [c]ancel
  exit 1
}
cat final-output.json
rm -f ".galmuri/tmp/retry-count.${SLUG}"

Output Schema

EngineOutput JSON (matches essence-schema.json):

{
  "units": [...],
  "mode": "reduce|construct",
  "ratio": 0.2,
  "dropped": [...],
  "source_ref": ".galmuri/tmp/source-{slug}.txt"
}

No persistence here — the adapter receives EngineOutput and decides whether to persist.

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.