Skip to content
Back to skills

Doc

ASecurity

Document adapter. Calls the distill engine, formats the result as markdown, and saves it to a file. Inherits the prior distill save flow. Triggers: "문서로", "정리해서 저장", "doc", "기록으로", "shrink", "줄여줘", "압축"

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
documentationbash

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add jazz1x/galmuri --skill doc --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doc?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doc
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jazz1x-doc/badge)](https://www.skillsdirectory.com/skills/jazz1x-doc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: doc
description: >
  Document adapter. Calls the distill engine, formats the result as markdown, and saves it to a file. Inherits the prior distill save flow.
  Triggers: "문서로", "정리해서 저장", "doc", "기록으로", "shrink", "줄여줘", "압축"
version: 0.0.4
ssl:
  scheduling:
    anti_triggers:
      - "When the user wants a 3–5 line message — use pitch"
      - "When the user wants inline output without a saved file — use explain"
  structural:
    scenes: [Alias detection + Audience, Engine Invoke, Render, Save, Asset record]
    resumable: false
    branches:
      - "shrink alias + source_tokens ≥ 80 AND inferred ratio > 0.1 → doc handles it"
      - "shrink alias + source_tokens < 80 → delegate to explain"
      - "shrink alias + inferred ratio ≤ 0.1 (one-line / TL;DR signal) → delegate to pitch"
      - "Save HITL: y → file + asset record; n → stdout only; edit-slug → rename then create"
  logical:
    tools: [Skill, Write, Bash]
    side_effects:
      reads: ["{input}", ".galmuri/tmp/source-{slug}.txt"]
      writes: ["docs/galmuri-doc-{slug}.md", ".galmuri/assets/*.jsonl"]
      deletes: []
      network: []
    idempotent: false
    rollback: "If the PostToolUse hook fails, recover by running scripts/record-asset.sh manually (see Step 5)."
---

# galmuri:doc — Document adapter

## Prerequisites
- `scripts/preflight.sh` passes.
- `skills/distill/` engine is installed.
- `scripts/record-asset.sh` is executable.

## Step 1: Alias detection + Audience

When triggered via `shrink` / `줄여줘` / `압축`:
```bash
if [ ! -f ".galmuri/tmp/.warned-shrink" ]; then
  echo "[deprecated] the 'shrink' trigger is routed to a context-based adapter. Scheduled for removal in a future release." >&2
  touch ".galmuri/tmp/.warned-shrink"
fi
# source_tokens ≥ 80 AND ratio > 0.1 → doc runs; otherwise → delegate to another adapter
```

> "Who is this document for? (e.g. the whole team, future-me, an external reviewer)"
- Ask if audience is missing.

## Step 2: Engine Invoke
- Call `distill --mode reduce --ratio 0.3 --audience {X}`.
- Receive the EngineOutput JSON.

## Step 3: Render
- EngineOutput.units → markdown body:
  - Section title = first unit's `claim`.
  - Each unit's `essence` + `evidence` becomes the body copy.
  - `dropped[]` becomes a "## Omitted items" section.

## Step 4: Save
Default path: `docs/galmuri-doc-{slug}.md`
> "Save to `docs/galmuri-doc-{slug}.md`? (y/n/edit-slug)"
- `y` → create the file, then proceed to Step 5.
- `n` → stdout only.
- `edit-slug` → rename, then create.

## Step 5: Asset record

The PostToolUse hook (`hooks/shims/asset-record.sh`) runs **automatically** when the Write tool creates `docs/galmuri-doc-{slug}.md`. You do **not** need to invoke `record-asset.sh` manually.

If for any reason the hook did not run (e.g., direct CLI invocation without hooks), call it manually:
```bash
bash scripts/record-asset.sh --type doc --tags "doc,{slug}" \
  --source-ref ".galmuri/tmp/source-{slug}.txt" --output "docs/galmuri-doc-{slug}.md"
```

## Output Schema
A markdown file (`docs/galmuri-doc-{slug}.md`) + an asset record.

Files in this skill

  • SKILL.jp.md3.4 KB
  • SKILL.ko.md3.1 KB
  • SKILL.md3.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.