{"title":"Fedwiki To Skill","story":[{"type":"markdown","id":"c0d9dcf35bf20bbc","text":"The **fedwiki-to-skill** skill converts a federated wiki page (page-json) into a Claude Code `SKILL.md` file. Author a skill as an ordinary wiki page, then export it to `~/.claude/skills/{slug}/SKILL.md` where Claude Code can load and invoke it. It is the inverse direction of [[Fedwiki DocumentPlugin Skill]] — here the page itself *becomes* the skill."},{"type":"markdown","id":"27d2748ecdca8d3d","text":"## How It Works\n\nA fedwiki page has a `title` and a `story` array of items, each with a `type` and a `text`. The converter maps each item type to markdown:\n\n- `markdown` → kept as-is (already markdown)\n- `paragraph` → plain text paragraph\n- `code` → fenced code block\n- `html` → wrapped HTML block\n- `reference`, `roster`, `assets` → omitted (navigation/structure, not instructions)\n\nThe page `title` derives the skill **name** (lowercase, hyphenated slug), used for the `name:` frontmatter field and the top `# Heading` of the body."},{"type":"markdown","id":"5b9411682b783fbb","text":"## Skill Frontmatter\n\nEvery `SKILL.md` opens with YAML frontmatter. The `description` is the critical field — Claude Code uses it to decide *when* to auto-invoke the skill, so it must name the trigger phrases.\n\n```markdown\n---\nname: skill-name\ndescription: One or two sentences describing WHEN to trigger — include the user phrases that should activate it.\n---\n```\n\nPull the description from the first `paragraph` or `markdown` item if it reads like a purpose statement; otherwise ask the user to supply one."},{"type":"markdown","id":"0b232de4a8edde4d","text":"## Output Location\n\nPersonal skills (available in all projects):\n```\n~/.claude/skills/{skill-name}/SKILL.md\n```\n\nProject skills (current project only):\n```\n.claude/skills/{skill-name}/SKILL.md\n```\n\nDefault to `~/.claude/skills/` unless the user specifies otherwise."},{"type":"markdown","id":"8a128b52c3b4d466","text":"## Conversion Steps\n\n1. **Read the source** — a page-json path, or a slug + domain located under `~/Music/Guides/Private/{domain}/pages/{slug}` (local) or `~/Nextcloud/fedwiki/{domain}/pages/{slug}` (public).\n2. **Extract** the `title` and `story`.\n3. **Build frontmatter** — `name` from the slug, `description` from the first descriptive item (ask if unclear).\n4. **Convert story items** following the mapping above, with a blank line between items.\n5. **Write** to `~/.claude/skills/{slug}/SKILL.md`, creating the directory if needed.\n6. **Confirm** — show the output path and the first lines of the generated file."},{"type":"markdown","id":"8c7292b41b4ac813","text":"## What to Watch Out For\n\n- **`reference` items are navigation** — omit unless the user wants them kept as \"see also\" notes.\n- **`assets` and `roster` items** — always omit; they are structural wiki UI elements.\n- **Escaped characters** — fedwiki `text` fields may carry escaped newlines or quotes; unescape them when writing markdown.\n- **Wikilinks `[[Page Name]]`** — won't resolve inside a skill; convert to plain text or backticked names.\n- **Long pages** — many items make a large skill; consider splitting into focused skills.\n- **Missing description** — prompt the user before writing if no clear purpose statement exists.\n- **Existing skill** — if the target `SKILL.md` already exists, show a diff and ask before overwriting."},{"type":"markdown","id":"46968dde08d2fc53","text":"# Assets"},{"type":"assets","id":"986228008104225b","text":"fedwiki-to-skill"},{"type":"markdown","id":"001184fef250f4f8","text":"## Related Skills\n\n- [[Fedwiki Page Skill]] — create the page-json this skill consumes\n- [[Fedwiki DocumentPlugin Skill]] — document a plugin instead of exporting a skill\n- [[Fedwiki CreatePlugin Skill]] — scaffold a new fedwiki plugin"}],"journal":[{"type":"create","item":{"title":"Fedwiki To Skill","story":[{"type":"markdown","id":"c0d9dcf35bf20bbc","text":"The **fedwiki-to-skill** skill converts a federated wiki page (page-json) into a Claude Code `SKILL.md` file. Author a skill as an ordinary wiki page, then export it to `~/.claude/skills/{slug}/SKILL.md` where Claude Code can load and invoke it. It is the inverse direction of [[Fedwiki DocumentPlugin Skill]] — here the page itself *becomes* the skill."},{"type":"markdown","id":"27d2748ecdca8d3d","text":"## How It Works\n\nA fedwiki page has a `title` and a `story` array of items, each with a `type` and a `text`. The converter maps each item type to markdown:\n\n- `markdown` → kept as-is (already markdown)\n- `paragraph` → plain text paragraph\n- `code` → fenced code block\n- `html` → wrapped HTML block\n- `reference`, `roster`, `assets` → omitted (navigation/structure, not instructions)\n\nThe page `title` derives the skill **name** (lowercase, hyphenated slug), used for the `name:` frontmatter field and the top `# Heading` of the body."},{"type":"markdown","id":"5b9411682b783fbb","text":"## Skill Frontmatter\n\nEvery `SKILL.md` opens with YAML frontmatter. The `description` is the critical field — Claude Code uses it to decide *when* to auto-invoke the skill, so it must name the trigger phrases.\n\n```markdown\n---\nname: skill-name\ndescription: One or two sentences describing WHEN to trigger — include the user phrases that should activate it.\n---\n```\n\nPull the description from the first `paragraph` or `markdown` item if it reads like a purpose statement; otherwise ask the user to supply one."},{"type":"markdown","id":"0b232de4a8edde4d","text":"## Output Location\n\nPersonal skills (available in all projects):\n```\n~/.claude/skills/{skill-name}/SKILL.md\n```\n\nProject skills (current project only):\n```\n.claude/skills/{skill-name}/SKILL.md\n```\n\nDefault to `~/.claude/skills/` unless the user specifies otherwise."},{"type":"markdown","id":"8a128b52c3b4d466","text":"## Conversion Steps\n\n1. **Read the source** — a page-json path, or a slug + domain located under `~/Music/Guides/Private/{domain}/pages/{slug}` (local) or `~/Nextcloud/fedwiki/{domain}/pages/{slug}` (public).\n2. **Extract** the `title` and `story`.\n3. **Build frontmatter** — `name` from the slug, `description` from the first descriptive item (ask if unclear).\n4. **Convert story items** following the mapping above, with a blank line between items.\n5. **Write** to `~/.claude/skills/{slug}/SKILL.md`, creating the directory if needed.\n6. **Confirm** — show the output path and the first lines of the generated file."},{"type":"markdown","id":"8c7292b41b4ac813","text":"## What to Watch Out For\n\n- **`reference` items are navigation** — omit unless the user wants them kept as \"see also\" notes.\n- **`assets` and `roster` items** — always omit; they are structural wiki UI elements.\n- **Escaped characters** — fedwiki `text` fields may carry escaped newlines or quotes; unescape them when writing markdown.\n- **Wikilinks `[[Page Name]]`** — won't resolve inside a skill; convert to plain text or backticked names.\n- **Long pages** — many items make a large skill; consider splitting into focused skills.\n- **Missing description** — prompt the user before writing if no clear purpose statement exists.\n- **Existing skill** — if the target `SKILL.md` already exists, show a diff and ask before overwriting."},{"type":"markdown","id":"001184fef250f4f8","text":"## Related Skills\n\n- [[Fedwiki Page Skill]] — create the page-json this skill consumes\n- [[Fedwiki DocumentPlugin Skill]] — document a plugin instead of exporting a skill\n- [[Fedwiki CreatePlugin Skill]] — scaffold a new fedwiki plugin"}]},"date":1781332834900,"certificate":"from marvin"},{"type":"add","id":"46968dde08d2fc53","item":{"type":"markdown","id":"46968dde08d2fc53","text":"# Assets"},"date":1782590716839,"certificate":"from marvin","after":"8c7292b41b4ac813"},{"type":"add","id":"986228008104225b","item":{"type":"assets","id":"986228008104225b","text":"fedwiki-to-skill"},"after":"46968dde08d2fc53","date":1782590716839,"certificate":"from marvin"}]}