agentsclimarketplace

Distill

Skill jazz1x/galmuri/skills/distill

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

Install
npx -y skills add jazz1x/galmuri --skill distill

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 6 commands, including `mkdir -p .galmuri/tmp` and 5 more.

SKILL.md

5.0 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

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.

What ships with it: 9 files

24.8 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.