From khala
Translate between Markdown and KCL. Use when the user asks to "translate md to kcl", "convert this markdown to KCL", "turn this .kcl into markdown", "md → kcl", "kcl → md", or provides a `<name>.md` / `<name>.kcl` file and wants the other format produced with the same filename stem.
How this skill is triggered — by the user, by Claude, or both
Slash command
/khala:kcl-translateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill converts between plain Markdown and KCL (Khala Context Language) while **preserving the filename stem**. `notes.md` → `notes.kcl`; `session.kcl` → `session.md`.
This skill converts between plain Markdown and KCL (Khala Context Language) while preserving the filename stem. notes.md → notes.kcl; session.kcl → session.md.
Read ${CLAUDE_PLUGIN_ROOT}/specs/KCL-BOOTSTRAP-v0.1.md first. You cannot translate correctly without the full symbol table, frame catalogue, and tier semantics.
Fallback: specs/KCL-BOOTSTRAP-v0.1.md relative to CWD.
Infer the direction from the input file's extension:
| Source extension | Direction | Output extension |
|---|---|---|
.md | md → kcl | .kcl |
.kcl | kcl → md | .md |
Output path = same directory, same stem, swapped extension. Examples:
/home/u/specs/KCL-SPEC-v0.1.md → /home/u/specs/KCL-SPEC-v0.1.kcl./notes/session.kcl → ./notes/session.mdIf the user gave an ambiguous input (a raw code block, no filename), ask them for a target stem before writing.
Strategy: the Markdown is the source of truth; KCL is the compressed restatement. Do not drop information — move it into the right tier.
§META{...}.§FACT✓[...] if authoritative, §CLAIM~[...] if unverified.(name, type, description) becomes [ROW|name:..., type:..., desc:"..."]. Repeat per row; don't flatten into prose.§ROLE, §STYLE, §ALWAYS, §NEVER, §PREFER.§ONTO{types:{...}} when they're reusable, or a dedicated [GRAMMAR|...] frame when they're document-local.§NL["..."]. Use sparingly; condense first.## Security → group frames under [SECURITY|...]). Do not emit headings as frames themselves — KCL has no heading primitive.Emit the standard header in order: §KCL_V0.1 → §META → §TRUST → §ONTO? → §TOOLS? → §USE* → body. Use ASCII | inside frames.
Strategy: expand the compressed form into readable prose while preserving every frame's information. The Markdown need not be terse — readability > compression in this direction.
§META → YAML frontmatter or a "Metadata" section at the top.§TRUST, §ONTO, §TOOLS → render as labeled markdown tables (each has a natural table shape: marker→meaning, alias→expansion, tool→signature).**TAG.** slot1 is X, slot2 is Y.) or a bullet list, whichever reads better for the frame's tag. Keep the TAG as a bold lead-in so the structure survives.Δ[...]) → render as a narrated change list ("Change to #ref: key went from old to new; added ⊕key:val; removed ⊖key."). Apply them to the referenced frame if inlining makes the doc clearer.§HISTORY → a "History" section. Summaries become paragraph summaries; full turns become blockquotes with the actor prefix.§CHECKPOINT → a horizontal rule + "## Checkpoint" heading; render the body as a full snapshot.§NL["..."] → pass through as plain prose, unquoted.@...) → a short "Directives" section listing them with their meanings.Write tool. Path = computed in Step 2.md → kcl should typically compress 3–8×; kcl → md typically expands 3–8×). Under 5 lines.md → kcl → md cycle would preserve every normative claim.§NL["..."] note or a > Note: blockquote flagging what was compressed.? (uncertain), not ✓.§NL["..."] contents as KCL. They are opaque prose; carry them verbatim.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub orochi-network/khala --plugin khala