Skill

book-to-skill

Turn a book, PDF, or long article into a skill draft with reference chapters and a glossary. Use when converting long-form source material into a reviewable draft rather than a finished skill.

Category
optional
Version
1.0.0
License
MIT
Status
active
Length
73 lines
Source
skills/optional/book-to-skill/SKILL.md

Install and discovery

npx --yes --package @youcisla/agent-foundry agent-foundry-install

After the installer runs, this record is available as book-to-skill. See the docs for harness roots and verification steps.

Contents

Book to Skill

Extracts a long document into chapter references, a glossary skeleton, and a minimal SKILL.md. The output is a draft. A human writes the procedure and passes the quality gates.

Procedure

What ships

skills/optional/book-to-skill/scripts/book_to_skill.py.

PDF input requires pypdf (pip install pypdf). Markdown, text, and URLs use the standard library. URL input fetches the document once.

Usage

python skills/optional/book-to-skill/scripts/book_to_skill.py \
  --input=book.pdf --skill-name=my-book --output-dir=plans/skills/drafts/my-book
python skills/optional/book-to-skill/scripts/book_to_skill.py \
  --input=chapter.md --output-dir=plans/skills/drafts/my-chapter

There is no extract subcommand: pass the flags directly. Drafts belong under the gitignored plans/skills/drafts/ tree. The script does not enforce the destination, so choose it deliberately; never point it at skills/.

What it actually produces

  • Up to 30 sections, split on Markdown H1/H2 headings or PDF page headings
  • references/ch-NN-<slug>.md for each section
  • assets/glossary.json with bolded capitalized terms (definitions empty)
  • assets/summary.json with section and term counts
  • A minimal SKILL.md containing an outline, key concepts, and reference links

It does not generate 3-7 instructions per chapter, does not validate the draft, and does not add license, author, status, or source metadata.

Human completion pass

  1. Add frontmatter: license, author, status: draft, source: local.
  2. State one trigger sentence, then a procedure with verifiable steps.
  3. Add at least two anti-patterns and at least two verification checks.
  4. Run ./.venv/Scripts/python.exe scripts/foundry-eval.py --target <draft>/SKILL.md.
  5. Promote only after the evaluator passes and a human reviews the draft.

Anti-patterns

  • Copying chapter text verbatim instead of distilling procedures.
  • Shipping the generated shell as a finished skill.
  • Converting copyrighted material without checking the license.
  • Placing drafts in skills/, where discovery and packaging will pick them up.

Verification Checklist

  • [ ] Every reference chapter is present and non-empty.
  • [ ] The glossary is reviewed and definitions are filled in or removed.
  • [ ] The draft has a single trigger, procedure, anti-patterns, and checks.
  • [ ] foundry-eval passes before the draft leaves plans/.