agentleFS
bladecoderbladecoder/narrative-skills/skills/build-distribution/SKILL.md

build-distribution

Skill0 starsChanged 7 months agoMITView on GitHub

Convert the prepared export package into reader-facing distribution formats such as HTML, EPUB, or PDF once a clean export already exists under 08_exports and the required conversion tools are available.

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 15 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to convert the clean export package into distribution formats for reading or delivery.

    line 10
  2. Distinctive:

    Use this skill when:

    line 14
  3. Very specific:

    Do not use this skill before the export package exists.

    line 21
  4. Distinctive:

    Ask questions only when the target format scope is genuinely unclear and cannot be inferred safely.

    line 32
  5. Distinctive:

    Read these when present and relevant:

    line 43
  6. Very specific:

    Write or update under 08_exports/dist/:

    line 50
  7. Distinctive:

    If the project already uses a more specific naming convention, follow it consistently.

    line 57
  8. Very specific:

    use pandoc when available.

    line 63
  9. Distinctive:

    Do not pretend a distribution was built if the backend is missing.

    line 71
  10. Very specific:

    Read story.language before producing distribution artifacts.

    line 77
  11. Distinctive:

    Keep file and folder names in English.

    line 78
  12. Distinctive:

    Keep YAML keys in English.

    line 80
  13. Very specific:

    If story.language is missing, gather it before building the distribution.

    line 81
  14. Very specific:

    Verify that 08_exports/ already contains a clean export package.

    line 85
  15. Distinctive:

    Check tool availability before starting conversion.

    line 87
  16. Distinctive:

    If a requested format cannot be produced, report it explicitly and avoid creating misleading placeholder binaries.

    line 95
  17. Distinctive:

    After running the skill, provide:

    line 120
  18. Distinctive:

    no source export files were modified unnecessarily.

    line 135
  19. Distinctive:

    Do not build directly from raw draft chapters if a prepared export package exists.

    line 139
  20. Very specific:

    Do not overwrite 08_exports/manuscript_export.md during distribution.

    line 140
  21. Distinctive:

    Do not claim a format was produced when the converter is missing.

    line 141
  22. Distinctive:

    Do not bundle internal review artifacts into the reader-facing distribution.

    line 142

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Build Distribution

Overview

Use this skill to convert the clean export package into distribution formats for reading or delivery. It should take the prepared export artifacts under 08_exports/, generate one or more requested output formats, and keep the distribution outputs isolated from the source export files.

When To Use

Use this skill when:

  • prepare-export has already produced a clean export package;
  • the user wants reader-facing formats such as HTML, EPUB, or PDF;
  • the manuscript needs a deliverable format beyond Markdown;
  • the project is ready for packaging or external distribution.

Do not use this skill before the export package exists. Build the export first with prepare-export.

Required Inputs

Gather or infer these inputs:

  • story.yaml metadata;
  • current export package under 08_exports/;
  • requested target formats;
  • available conversion tools in the environment.

Ask questions only when the target format scope is genuinely unclear and cannot be inferred safely.

Files To Read

Always read:

  • story.yaml
  • 08_exports/manuscript_export.md
  • 08_exports/export_package.md
  • 08_exports/export_manifest.yaml

Read these when present and relevant:

  • 02_story/logline.md
  • 02_story/synopsis.md

Files To Write

Write or update under 08_exports/dist/:

  • manuscript_export.html when HTML is requested
  • manuscript_export.epub when EPUB is requested
  • manuscript_export.pdf when PDF is requested
  • distribution_manifest.yaml

If the project already uses a more specific naming convention, follow it consistently.

Tooling Rules

Preferred backend:

  • use pandoc when available.

Format support expectations:

  • HTML: use pandoc when available; if pandoc is unavailable, stop and report the missing dependency rather than producing a misleading low-fidelity fake conversion.
  • EPUB: requires pandoc; if absent, stop and report the missing dependency.
  • PDF: requires pandoc plus an available PDF engine supported by the environment; if unavailable, stop and report the missing dependency chain clearly.

Do not pretend a distribution was built if the backend is missing.

Language Rules

This skill depends on story.yaml as the source of truth for project metadata.

  • Read story.language before producing distribution artifacts.
  • Keep file and folder names in English.
  • Preserve the manuscript content language exactly as exported.
  • Keep YAML keys in English.
  • If story.language is missing, gather it before building the distribution.

Procedure

  1. Verify that 08_exports/ already contains a clean export package.
  2. Detect which target formats were requested or implied.
  3. Check tool availability before starting conversion.
  4. Build outputs into 08_exports/dist/ only, leaving the source export package untouched.
  5. Generate distribution_manifest.yaml recording:
    • formats requested;
    • formats produced;
    • source export files used;
    • tool backend used;
    • blocked formats and reasons, if any.
  6. If a requested format cannot be produced, report it explicitly and avoid creating misleading placeholder binaries.

Output Requirements

distribution_manifest.yaml should capture at minimum:

  • title
  • language
  • source_export
  • requested_formats
  • produced_formats
  • backend
  • blocked_formats
  • notes

The distribution stage should make it easy to answer:

  • what source export was used;
  • which formats were requested;
  • which formats were actually built;
  • what toolchain produced them;
  • why any requested format was skipped.

Output

After running the skill, provide:

  • a short summary of the distribution build;
  • which formats were produced;
  • which formats were blocked, if any;
  • what files were written under 08_exports/dist/.

Definition Of Done

This skill is done when:

  • the requested build was attempted against the prepared export package;
  • successful outputs exist under 08_exports/dist/;
  • blocked formats are explicitly documented rather than silently skipped;
  • the distribution manifest records the result clearly;
  • no source export files were modified unnecessarily.

Restrictions

  • Do not build directly from raw draft chapters if a prepared export package exists.
  • Do not overwrite 08_exports/manuscript_export.md during distribution.
  • Do not claim a format was produced when the converter is missing.
  • Do not bundle internal review artifacts into the reader-facing distribution.

Example Invocation

Use $build-distribution to convert the current export package into HTML and EPUB, and produce PDF too if the required backend is available.

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.