[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EB0P70PF3R0YDP8TSVTHKW":3,"skill-same:01M7EB0P70PF3R0YDP8TSVTHKW":227},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7EB0P70PF3R0YDP8TSVTHKW","book-to-skill",null,"Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI\u002FAZW with Calibre) into structured agent skills, extracting frameworks, mental models, principles, techniques, and anti-patterns. Use when the user wants to study a document through GitHub Copilot CLI, Amp, or Claude Code, apply an author's frameworks while working, or build a reusable knowledge base from a file.","fozagtx\u002FBuildOS-workflow","fozagtx","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160292135?v=4","01M7EAS4W39D2X3WNCCVVZ7CVZ","fawuzan","01M7EAS4WP1G4JD4KG87P6PTK6",0,"MIT","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FLICENSE.md","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: book-to-skill\ndescription: \"Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI\u002FAZW with Calibre) into structured agent skills, extracting frameworks, mental models, principles, techniques, and anti-patterns. Use when the user wants to study a document through GitHub Copilot CLI, Amp, or Claude Code, apply an author's frameworks while working, or build a reusable knowledge base from a file.\"\n---\n\n\u003C!--\nCross-agent notes (informational; ignored by host agents):\n  - Compatible skill roots: GitHub Copilot CLI (~\u002F.copilot\u002Fskills, ~\u002F.agents\u002Fskills,\n    .github\u002Fskills, .claude\u002Fskills, .agents\u002Fskills), Amp (.agents\u002Fskills,\n    ~\u002F.config\u002Fagents\u002Fskills, ~\u002F.config\u002Famp\u002Fskills), Claude Code (~\u002F.claude\u002Fskills).\n  - `allowed-tools` is intentionally omitted to stay agent-neutral: Copilot CLI uses\n    `shell`\u002FMCP-server names, Claude uses `Bash`\u002F`Read`\u002F`Write`\u002F`Glob`\u002F`Grep`, Amp\n    adds `shell_command`. The skill needs shell (to run extract.py) and file\n    read\u002Fwrite — each host will prompt for those on first use.\n  - Argument hint: \u003Cpath-to-document-folder-or-glob>... [skill-name-slug]\n-->\n\n# Book-to-Skill Converter\n\nTransform written knowledge into actionable agent skills by extracting structure — not producing summaries.\n\n## Philosophy\n\nBooks contain crystallized expertise: frameworks, principles, and techniques that took years to develop. This skill extracts that knowledge into a format GitHub Copilot CLI, Amp, Claude Code, or another compatible agent can leverage repeatedly.\n\n**Extract structure, not summaries.** A skill isn't a book report. It's a toolkit of:\n- Named frameworks (mental models with clear application)\n- Actionable principles (rules that guide decisions)\n- Techniques (step-by-step methods)\n- Anti-patterns (what to avoid and why)\n- Voice calibration (how the author thinks and communicates)\n\n**Preserve the author's precision.** Frameworks often have specific names for reasons. \"The 5 Whys\" isn't interchangeable with \"ask why multiple times.\" Capture the exact formulation.\n\n**Layer depth appropriately.** Simple books → simple skills. Complex books with 10+ frameworks → skills with reference files and on-demand chapters.\n\n---\n\n## Modes of Operation\n\nFour paths available. Route based on what the user asks:\n\n### 1. Full Conversion (Default)\n**Trigger:** User provides one or more document\u002Fdirectory\u002Fglob paths without special instructions\n**Action:** Run all steps below (Steps 0–9)\n**Output:** Complete skill with SKILL.md, chapters\u002F, glossary, patterns, cheatsheet\n\n### 2. Analyze Only\n**Trigger:** User says \"analyze\", \"just extract\", or \"I want to review before generating\"\n**Action:** Run Steps 0–3, then produce a structured extraction report (frameworks, principles, techniques found). Stop — do NOT generate skill files.\n**Output:** Analysis report for user review\n\n### 3. Generate from Prior Analysis\n**Trigger:** User has existing analysis notes or previously ran analyze-only\n**Action:** Skip Steps 0–3, use the provided analysis as input, run Steps 4–9\n**Output:** Skill files from the provided analysis\n\n### 4. Update \u002F Fold-in (Existing Skill)\n**Trigger:** User provides one or more new source paths and indicates they want to update an existing skill (either by pointing to the existing skill folder, providing a skill slug that already exists in `SKILLS_HOME`, or explicitly requesting an update).\n**Action:** Run Step 0 (out-of-scope check), Step 1 (validate inputs), Step 1.5 (identify book type), and Step 2 (extract new files). Then skip to Step 5 (identify\u002Fdetect existing skill path) and run the **Update \u002F Fold-in Workflow** to merge the new content into the existing skill files.\n**Output:** Updated existing skill with new\u002Frevised chapter summaries and merged indexes\u002Fglossaries.\n\n---\n\n## Skill Locations\n\nThis converter can run from multiple skill systems. When looking for this converter's helper script or writing the generated book skill, prefer these locations in order:\n\n1. GitHub Copilot CLI personal skills: `~\u002F.copilot\u002Fskills\u002F`\n2. Cross-agent personal skills (Copilot + Amp): `~\u002F.agents\u002Fskills\u002F`\n3. Claude Code personal skills: `~\u002F.claude\u002Fskills\u002F`\n4. Project-local Copilot skills: `.github\u002Fskills\u002F`\n5. Project-local Claude skills: `.claude\u002Fskills\u002F`\n6. Project-local Amp \u002F Copilot skills: `.agents\u002Fskills\u002F`\n7. Amp global skills: `~\u002F.config\u002Fagents\u002Fskills\u002F`\n8. Amp legacy global skills: `~\u002F.config\u002Famp\u002Fskills\u002F`\n\nFor **generated** book skills, pick a destination that the user's host agent can actually discover (see Step 5). When more than one valid root exists, ask the user once and remember the answer for the session — do not silently default.\n\n---\n\n## Step 0 — Out-of-scope check\n\nIf no arguments are provided, stop and respond:\n> \"book-to-skill requires a supported document path, folder, or glob pattern. Usage: `book-to-skill \u003Cpath-to-document-folder-or-glob>... [skill-name-slug]`\"\n\nThroughout the workflow:\n- Identify the input paths and the optional skill slug.\n- If the last argument is not a file, folder, or glob that exists or matches any files, and it looks like a skill slug (e.g. lowercase hyphens, alphanumeric), treat it as `SKILL_NAME`.\n- Treat all other arguments as the list of `INPUT_PATHS`.\n- If any input path is an existing skill directory (contains `SKILL.md` and a `chapters\u002F` sub-folder), or if `SKILL_NAME` matches an existing skill slug in `SKILLS_HOME`, flag this run as an **Update\u002FFold-in** operation (Mode 4).\n\n---\n\n## Step 1 — Validate input\n\nVerify that there is at least one supported file, directory, or glob pattern among the `INPUT_PATHS`.\nFor directories and globs, expand them to find matching supported files (`.pdf`, `.epub`, `.docx`, `.txt`, `.md`, `.markdown`, `.rst`, `.adoc`, `.html`, `.htm`, `.rtf`, `.mobi`, `.azw`, `.azw3`).\n\nIf no supported files are found, stop with a clear error message.\n\n---\n\n## Step 1.5 — Identify content type\n\nBefore extracting, ask the user:\n\n> \"What kind of content do these sources have? This helps me choose the best extraction method.\n>\n> 1. **Technical** — has code blocks, tables, formulas, diagrams (e.g. programming books, academic papers, architecture guides)\n> 2. **Text-heavy** — mostly prose, few or no tables\u002Fcode (e.g. management, productivity, narrative non-fiction)\n> 3. **Not sure** — I'll use the fast method and warn you if quality seems limited\"\n\nStore the answer as `BOOK_TYPE`:\n- Option 1 → `BOOK_TYPE=technical`\n- Option 2 → `BOOK_TYPE=text`\n- Option 3 → `BOOK_TYPE=text`\n\n**If `BOOK_TYPE=technical`**, inform the user before proceeding:\n> \"📐 Technical mode selected — using Docling for structure-aware extraction (tables, code blocks, formulas preserved as markdown). This takes ~1.5s per page, so expect a few minutes for longer sources. Starting now…\"\n\n**If `BOOK_TYPE=text`**, inform:\n> \"📄 Text mode selected — using the fastest suitable extractor for each file type. Plain text\u002FMarkdown\u002FHTML are usually ready in seconds; PDFs use pdftotext when available.\"\n\n---\n\n## Step 2 — Extract text from the source documents\n\nRun the extraction script, passing the input paths:\n\n```bash\nSCRIPT_PATH=\"\"\nfor candidate in \\\n  \"$HOME\u002F.copilot\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.agents\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.claude\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \".github\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \".claude\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \".agents\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.config\u002Fagents\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.config\u002Famp\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\"\ndo\n  if [ -f \"$candidate\" ]; then\n    SCRIPT_PATH=\"$candidate\"\n    break\n  fi\ndone\n\nif [ -z \"$SCRIPT_PATH\" ]; then\n  echo \"Could not find scripts\u002Fextract.py for book-to-skill\" >&2\n  exit 1\nfi\n\nPYTHON_BIN=\"${PYTHON_BIN:-python3}\"\nif ! command -v \"$PYTHON_BIN\" >\u002Fdev\u002Fnull 2>&1; then\n  PYTHON_BIN=\"python\"\nfi\n\n\"$PYTHON_BIN\" \"$SCRIPT_PATH\" $INPUT_PATHS --mode \u003CBOOK_TYPE> --install-missing ask\n```\n\nBefore extraction, the script checks optional Python packages needed for the detected format. If a better extractor is missing, it prompts the user with the available fallback. Non-interactive sessions default to fallback unless install mode is explicitly `yes`.\n\n**Tip — preflight the environment:** run `\"$PYTHON_BIN\" \"$SCRIPT_PATH\" --check` to print a per-format report of which extractors are installed and the exact command to install whatever is missing, without processing any file. Useful when a user reports a setup or quality problem.\n\nThis creates:\n- `\u003Ctempdir>\u002Fbook_skill_work\u002Ffull_text.txt` — combined extracted text of all sources with clear visually demarcated boundaries.\n- `\u003Ctempdir>\u002Fbook_skill_work\u002Fmetadata.json` — overall combined size, words, pages, token counts, and a detailed list of individual processed `sources`.\n\nRead `\u003Ctempdir>\u002Fbook_skill_work\u002Fmetadata.json` to inspect the results.\n\n---\n\n## Step 2.5 — Pre-flight cost estimate\n\nRead `\u003Ctempdir>\u002Fbook_skill_work\u002Fmetadata.json` and present the user with an estimate **before doing any generation**:\n\n```\n📖 Sources detected: \u003Ctotal_sources> source(s)\n\u003Clist each source filename and format from the sources metadata list>\n📄 Combined Pages\u002FSections: ~\u003CN> | Words: ~\u003CN> | Total tokens: ~\u003CN>K\n\n💰 Estimated token cost (Full Conversion \u002F Update):\n   Input  (reading + prompts): ~\u003CN>K tokens\n   Output (skill files generated\u002Fupdated):  ~\u003CN>K tokens\n   Total:                           ~\u003CN>K tokens\n\n   Reference prices (as of 2025):\n   Claude Sonnet 4.5 → ~$\u003CX> USD\n   Claude Haiku 4.5  → ~$\u003CX> USD\n\n   ⏱  Estimated time: ~\u003CN> minutes\n\n📁 Files to be generated\u002Fupdated:\n   SKILL.md + chapter files + glossary + patterns + cheatsheet\n\n➡  Proceed with Full Conversion \u002F Update? (or type \"analyze only\" to preview first)\n```\n\n**How to estimate:**\n- Input tokens ≈ `estimated_tokens` from metadata × 1.3 (prompts overhead per chapter pass)\n- Output tokens ≈ chapters × per-chapter budget + 4,000 (SKILL.md) + 4,500 (glossary + patterns + cheatsheet)\n  - Per-chapter budget midpoint by `BOOK_TYPE` (DEPTH is decided later in Step 4 and can raise it): `text` ≈ 1,000, `technical` ≈ 1,800. If the user has already indicated reference-only vs deep study, use the matching row of the Step 7 matrix.\n- Price: Sonnet input=$3\u002FMTok output=$15\u002FMTok — Haiku input=$0.80\u002FMTok output=$4\u002FMTok\n\nWait for the user to confirm before proceeding. If they say \"analyze only\", switch to Mode 2.\n\n---\n\n## Step 2.6 — REPL-style access for large books (> 50k tokens)\n\nInspired by the Recursive Language Model (RLM) paradigm: treat `full_text.txt` as a queryable corpus, not a single read. Loading the whole file into context burns budget you will need later for generation.\n\nFor books over ~50k tokens, prefer programmatic probes over `Read(full_text.txt)` without bounds:\n\n```bash\n# Size check before any Read\nwc -w \"$FULL_TEXT_PATH\"\n\n# Find chapter offsets without loading the whole file\ngrep -n -E \"^\\s*(Chapter|CHAPTER)\\s+[0-9]+\" \"$FULL_TEXT_PATH\" | head -40\n\n# Pull only the chapter you need (lines start..end inclusive)\nsed -n '\u003Cstart>,\u003Cend>p' \"$FULL_TEXT_PATH\"\n\n# Verify a framework is actually mentioned before claiming it in SKILL.md\ngrep -c -i \"westrum\\|dora\" \"$FULL_TEXT_PATH\"\n\n# Targeted Read with offset\u002Flimit avoids dumping the full file\n# Read(file_path=full_text.txt, offset=\u003Cline>, limit=\u003Clines>)\n```\n\nUse this approach for Step 3 (structure analysis), Step 7 (per-chapter summaries), and Step 8 (glossary \u002F patterns extraction). On books under 50k tokens, a single `Read` is fine.\n\nWhy this matters: a 200-page book is ~75k tokens. Re-reading it once per chapter (28 passes) costs ~2M input tokens; using grep + sed to pull only relevant slices keeps generation cost proportional to the output, not the source.\n\n---\n\n## Step 3 — Analyze book structure\n\nRead the first 8,000 characters of the extracted `full_text.txt` to identify:\n- Book **title** and **author(s)**\n- **Chapter structure** (look for \"Chapter N\", \"PART I\", numbered headings, table of contents)\n- **Core themes** and subject domain\n- Approximate number of chapters\n\nThen read the Table of Contents section if present to map all chapters.\n\n**If mode is \"Analyze Only\":** produce the extraction report now and stop. Structure:\n```\n## Extraction Report — \u003CTitle>\n\n### Author's Core Frameworks\n- **\u003CFramework Name>**: \u003Cwhat it is and when to apply>\n\n### Key Principles\n- \u003CPrinciple>: \u003Cactionable rule>\n\n### Techniques & Methods\n- \u003CTechnique>: \u003Cstep-by-step or how-to>\n\n### Anti-patterns\n- \u003CWhat to avoid>: \u003Cwhy>\n\n### Suggested Skill Name\n`{author-lastname}-{core-concept}` — e.g. `cialdini-influence`\n\n### Chapters Detected\n| # | Title | Main Frameworks |\n```\n\n---\n\n## Step 4 — Ask purpose (Full Conversion only)\n\nBefore generating, ask the user:\n\n> \"What should this skill help you do? (Pick one or more)\n> 1. Apply the author's frameworks while working\n> 2. Think with the author's mental models\n> 3. Reference specific chapters and concepts\n> 4. All of the above\"\n\nUse the answer to weight what gets highlighted in the SKILL.md Core section.\n\n**Derive `DEPTH` from the answer (no extra prompt):**\n- Answer is **only** option 3 (reference) → `DEPTH=reference` — lean, fast-lookup chapters.\n- Answer includes option 1, 2, or 4 → `DEPTH=study` — deeper chapters with more worked detail, examples, and reasoning.\n\n`DEPTH` and `BOOK_TYPE` together set the per-chapter token budget in Step 7. Do **not** ask a separate \"study vs reference\" question — it is inferred here. (In Modes 2\u002F3, where Step 4 is skipped, default `DEPTH=study`.)\n\n---\n\n## Step 5 — Determine skill name\n\nIf `SKILL_NAME` was provided, use it as the skill slug.\nOtherwise, propose two options and let the user choose:\n- **By author-concept**: `{author-lastname}-{core-concept}` (e.g. `cialdini-influence`, `meadows-systems`)\n- **By title**: lowercase hyphens from book title (e.g. `designing-data-intensive-apps`)\n\nDefault to author-concept format if the book has a strong methodological identity.\n\nChoose the destination skill root (`SKILLS_HOME`). Probe the user's filesystem for existing skill homes and pick by **the host the user is running in**:\n\n| Host agent | Personal skill root (probe in order) | Project-local root |\n|---|---|---|\n| **GitHub Copilot CLI** | `~\u002F.copilot\u002Fskills` → `~\u002F.agents\u002Fskills` | `.github\u002Fskills` → `.claude\u002Fskills` → `.agents\u002Fskills` |\n| **Amp** | `~\u002F.agents\u002Fskills` → `~\u002F.config\u002Fagents\u002Fskills` → `~\u002F.config\u002Famp\u002Fskills` | `.agents\u002Fskills` |\n| **Claude Code** | `~\u002F.claude\u002Fskills` | `.claude\u002Fskills` |\n\nSelection rules:\n1. If **exactly one** of the host's candidate roots exists on disk, use it without asking.\n2. If **none** exist (fresh machine), ask the user which root to create — present the host-appropriate options and remember the choice for the session. Do not silently pick.\n3. If the user explicitly asked for project-local output, prefer the project-local row.\n4. If you cannot identify the host, ask: \"Which agent are you running this in — GitHub Copilot CLI, Amp, or Claude Code?\"\n\nSet `SKILLS_HOME` to the selected root and check if `$SKILLS_HOME\u002F\u003Cskill_name>\u002F` already exists.\nIf it does, prompt the user to choose:\n1. **Update \u002F Fold-in** (Mode 4) — integrate new files\u002Fcontent into the existing skill components.\n2. **Overwrite** — delete and regenerate the skill from scratch.\n3. **Rename** — append `-2` or use a different custom slug.\n\nIf the user selects **Update \u002F Fold-in**, proceed immediately to the **Update \u002F Fold-in Workflow** section after Step 2.5 (skipping Steps 3, 4, 6, 7, 8, 9).\n\n---\n\n## Step 6 — Create skill directory structure\n\n```bash\nmkdir -p \"$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\"\n```\n\n---\n\n## Step 7 — Generate chapter summaries\n\n**TOKEN BUDGET RULE — CRITICAL (adaptive):**\n\nThe per-chapter budget scales with `BOOK_TYPE` and `DEPTH`. Technical chapters need room for code and tables; study depth needs room for worked reasoning. Pick the budget from this matrix:\n\n| | `DEPTH=reference` | `DEPTH=study` |\n|---|---|---|\n| `BOOK_TYPE=text` | 800–1,200 tokens | 1,000–1,800 tokens |\n| `BOOK_TYPE=technical` | 1,200–1,800 tokens | 2,000–3,000 tokens |\n\n- These are per-file targets, not hard caps — a dense chapter may run over, a thin one under. Density still beats length (Quality Rule #3): never pad to hit a number.\n- Files are loaded on-demand, so a larger chapter only costs tokens when that chapter is actually read.\n- When in doubt between two cells (e.g. mixed-content book), use the lower budget and let depth come from precision, not volume.\n\n**`DEPTH=study` is earned with content, not a bigger number.** The standard section template (Core Idea → Connects To) naturally lands a dense prose chapter around 700–900 tokens. To reach the study budget *honestly* — not by padding — a study-depth chapter must add concrete material:\n- **Reproduce one worked example or artifact** from the chapter (e.g. the example press release, a sample dialogue, a filled-in template, a decision the author walks through) under a `## Worked Example` section. This is the single biggest lever and the main thing a learner returns for.\n- **Expand the \"How\" of each framework** into explicit steps or criteria, not a one-liner.\n- **Add a short \"Why it works \u002F failure mode\" note** to the top 1–2 frameworks.\n\nIf a chapter genuinely has no worked example and resists expansion, let it land below the study floor rather than padding — and note that the chapter is thin in its Core Idea. A `reference`-depth chapter, by contrast, deliberately omits worked examples and keeps only the decision-ready essentials.\n\nFor EACH chapter\u002Fmajor section identified in Step 3:\n\nRead the corresponding section of the extracted `full_text.txt` (use character offsets or grep for chapter headings).\n\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\u002Fch\u003CNN>-\u003Cslug>.md` using the structure below.\n\n**Adapt emphasis based on `BOOK_TYPE`:**\n- `technical` → prioritize \"Code Examples\", \"Reference Tables\", and \"Commands & APIs\" sections; preserve exact syntax\n- `text` → prioritize \"Frameworks Introduced\", \"Mental Models\", and \"Key Takeaways\"; skip empty technical sections\n\n```markdown\n# Chapter N: \u003CFull Title>\n\n## Core Idea\n\u003C1–2 sentences: the single most important thing this chapter teaches>\n\n## Frameworks Introduced\n- **\u003CFramework Name>**: \u003Cexact formulation — preserve the author's naming>\n  - When to use: \u003Cspecific situation>\n  - How: \u003Csteps or criteria>\n\n## Key Concepts\n- **\u003CTerm>**: \u003Cprecise definition in 1 sentence>\n(5–10 most important terms from this chapter)\n\n## Mental Models\n\u003C2–4 frameworks or thinking tools. Write as \"Use X when Y\" or \"Think of X as Y\">\n\n## Anti-patterns\n- **\u003CWhat to avoid>**: \u003Cwhy it fails>\n\n## Code Examples *(technical books only — omit if BOOK_TYPE=text)*\n\u003C!-- Copy the most instructive snippet from the chapter. Preserve indentation exactly. -->\n```\u003Clanguage>\n\u003Ckey code example from this chapter>\n```\n- **What it demonstrates**: \u003Cone line>\n\n## Reference Tables *(technical books only — omit if BOOK_TYPE=text)*\n\u003C!-- Reproduce any comparison matrix, parameter table, or decision table from the chapter in markdown. -->\n\n## Worked Example *(DEPTH=study only — omit for DEPTH=reference)*\n\u003C!-- Reproduce or reconstruct one concrete example the author works through: a\n     sample document, a dialogue, a filled-in template, a before\u002Fafter, or a\n     decision walked end-to-end. This is what makes a study chapter worth its\n     budget. Keep it faithful to the source; never copy long raw passages —\n     reconstruct the example compactly. -->\n\n## Key Takeaways\n1. \u003CActionable insight>\n2. \u003CActionable insight>\n3. \u003CActionable insight>\n(3–7 takeaways a practitioner must remember)\n\n## Connects To\n- **Ch N**: \u003Cwhy this chapter relates>\n- **\u003CConcept>**: \u003Cexternal concept or standard it connects with>\n```\n\n---\n\n## Step 8 — Generate supporting files\n\n### glossary.md\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md`:\n- Every significant term from the book, alphabetically sorted\n- Format: `**Term** — definition (Ch N)`\n- Max 1,500 tokens\n\n### patterns.md\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fpatterns.md`:\n- All concrete techniques, design patterns, algorithms from the book\n- Format: `## Pattern Name\\n**When to use**: ...\\n**How**: ...\\n**Trade-offs**: ...`\n- Max 2,000 tokens\n\n### cheatsheet.md\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fcheatsheet.md`:\n\n**This is the most differentiated layer of the skill — treat it as a reasoning aid, not a keyword list.** Anyone can grep the glossary for a term. The cheatsheet captures the author's *judgment*: the decisions they'd make and why. It's the file that turns \"I know the words\" into \"I'd act the way the author would\".\n\nPrioritize, in order:\n1. **Decision rules** — \"When X, do Y, because Z.\" The if\u002Fthen logic the author applies, stated so the reader can apply it without re-reading the book.\n2. **Decision trees \u002F flowcharts** (as nested bullets or a small table) — for choices with more than two branches.\n3. **Trade-off matrices** — competing options scored on the dimensions the author cares about, so the reader can pick under their own constraints.\n4. **Thresholds & defaults** — the specific numbers, ratios, or rules of thumb the author commits to (e.g. \"keep functions under ~20 lines\", \"alert when error budget \u003C 10%\").\n5. **Tells & smells** — fast heuristics for recognizing a situation (\"if you see X, you're probably in trouble Y\").\n\nAvoid: bare term→definition rows (that's the glossary), and prose paragraphs (that's the chapters). Every line should help the reader *decide* something.\n\n- Format mostly as compact tables and decision rules; the content you'd want on a single printed page kept beside you while working.\n- Max 1,200 tokens.\n\n---\n\n## Step 9 — Generate the master SKILL.md\n\n**CRITICAL TOKEN BUDGET: Keep SKILL.md body under 4,000 tokens.**\nCompaction truncates from the END — put the most important content FIRST.\n\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002FSKILL.md`:\n\n```markdown\n---\nname: \u003Cskill_name>\ndescription: \"Knowledge base from \\\"\u003CFull Title>\\\" by \u003CAuthor(s)>. Use when applying \u003Cauthor>'s frameworks for \u003Ckey topics, 3–6 terms>, studying the book, or referencing its concepts.\"\n---\n\n\u003C!-- argument-hint: [topic, framework name, or chapter number] -->\n\n# \u003CFull Title>\n**Author**: \u003CAuthor(s)> | **Pages**: ~\u003CN> | **Chapters**: \u003CN> | **Generated**: \u003CYYYY-MM-DD>\n\n## How to Use This Skill\n\n- **Without arguments** — load core frameworks for reference\n- **With a topic** — ask about `replication`, `pricing`, or another indexed topic; I find and read the relevant chapter\n- **With chapter** — ask for `ch05`; I load that specific chapter\n- **Browse** — ask \"what chapters do you have?\" to see the full index\n\nWhen you ask about a topic not covered in Core Frameworks below, I will read\nthe relevant chapter file before answering.\n\n---\n\n## Core Frameworks & Mental Models\n\u003C!-- ~2,000 tokens: the author's most important named frameworks and principles.\n     Preserve exact names. Write as \"Use X when Y\", \"Prefer X over Y because Z\".\n     This is a toolkit, not a summary. -->\n\n\u003Cgenerate 2,000 tokens of the most critical frameworks and insights here>\n\n---\n\n## Chapter Index\n\n| # | Title | Key Frameworks |\n|---|-------|----------------|\n| [ch01](chapters\u002Fch01-\u003Cslug>.md) | \u003CTitle> | \u003Cframework1>, \u003Cframework2> |\n| [ch02](chapters\u002Fch02-\u003Cslug>.md) | \u003CTitle> | \u003Cframework1>, \u003Cframework2> |\n...\n\n## Topic Index\n\n\u003C!-- Alphabetical. Major terms\u002Fframeworks → chapter(s) that cover them. -->\n- **\u003CTerm>** → ch\u003CN>[, ch\u003CN>]\n- **\u003CTerm>** → ch\u003CN>\n\n## Supporting Files\n\n- [glossary.md](glossary.md) — all key terms with definitions\n- [patterns.md](patterns.md) — all techniques and design patterns\n- [cheatsheet.md](cheatsheet.md) — quick reference tables and decision guides\n\n---\n\n## Scope & Limits\n\nThis skill covers the book content only. For hands-on implementation in your codebase,\ncombine with project-specific tools. For topics beyond this book, check related skills\nor ask the agent directly.\n```\n\n---\n\n## Step 10 — Cleanup and report\n\n```bash\nPYTHON_BIN=\"${PYTHON_BIN:-python3}\"\nif ! command -v \"$PYTHON_BIN\" >\u002Fdev\u002Fnull 2>&1; then\n  PYTHON_BIN=\"python\"\nfi\n\n\"$PYTHON_BIN\" - \u003C\u003C'PY'\nimport os\nimport shutil\nimport tempfile\nfrom pathlib import Path\nshutil.rmtree(\n    os.environ.get(\"BOOK_SKILL_WORKDIR\", Path(tempfile.gettempdir()) \u002F \"book_skill_work\"),\n    ignore_errors=True,\n)\nPY\n```\n\nThen report to the user:\n\n```\n✅ Skill created: $SKILLS_HOME\u002F\u003Cskill_name>\u002F\n\n📚 Book: \u003CFull Title> — \u003CAuthor>\n📄 Pages: ~\u003CN> | Chapters: \u003CN>\n\nFiles generated:\n  SKILL.md         — core frameworks + index   (~X tokens)\n  chapters\u002F        — \u003CN> chapter summaries     (~X tokens each, ~X total)\n  glossary.md      — key terms                 (~X tokens)\n  patterns.md      — techniques & patterns     (~X tokens)\n  cheatsheet.md    — quick reference           (~X tokens)\n  ─────────────────────────────────────────────────────\n  Total skill size: ~X tokens (loaded on-demand, not all at once)\n\n💡 Tip: check your agent's session cost\u002Fusage command to see actual token usage.\n\nUsage:\n  Ask for \u003Cskill_name>                  → load core frameworks\n  Ask \u003Cskill_name> about \u003Ctopic>        → find and explain a topic\n  Ask \u003Cskill_name> for ch\u003CN>            → dive into a specific chapter\n\nReload (if your agent doesn't auto-detect new skills):\n  GitHub Copilot CLI:  \u002Fskills reload\n  Claude Code:         restart the session\n  Amp:                 restart the session\n\nShare this skill (Copilot ecosystem, optional):\n  gh skill publish $SKILLS_HOME\u002F\u003Cskill_name>\n```\n\n---\n\n## Update \u002F Fold-in Workflow\n\nWhen performing an Update\u002FFold-in operation on an existing skill at `$SKILLS_HOME\u002F\u003Cskill_name>\u002F`:\n\n### 1. Read Existing Skill Structure\nRead and parse the existing skill's files:\n- Read `$SKILLS_HOME\u002F\u003Cskill_name>\u002FSKILL.md` to parse the existing **Chapter Index**, **Topic Index**, metadata (author, total chapters), and **Core Frameworks**.\n- List all files in `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\u002F` to find the highest chapter number (e.g. `ch12`).\n- Read `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md`, `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fpatterns.md`, and `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fcheatsheet.md` to see what terms and frameworks are already indexed.\n\n### 2. Match Content & Identify Revisions vs. Additions\nAnalyze the new extracted text in `\u003Ctempdir>\u002Fbook_skill_work\u002Ffull_text.txt` to identify if the new content represents:\n- **Updates\u002FRevisions to existing chapters**: If a section of the new content directly updates or expands an existing chapter's topic, read the existing chapter file, merge the new details into it, and rewrite the file.\n- **New additions**: If the content introduces new chapters, papers, or separate sections, create **new chapter summary files** under `chapters\u002F`. Start numbering these files after the highest existing chapter number (e.g. if the existing chapters stop at `ch12`, create `ch13-*.md`, `ch14-*.md`, etc.).\n\n### 3. Generate or Update Chapter Summary Files\nFor each new or revised chapter:\n- Read the corresponding section of the extracted new text.\n- Follow the formatting guidelines in **Step 7** to build the summary.\n- Write\u002Fupdate the file in `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\u002F`.\n\n### 4. Merge Supporting Files\n- **Merge glossary.md**:\n  - Read the existing `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md`.\n  - Extract all new terms and definitions from the new content (Step 8 glossary guidelines).\n  - Combine and alphabetize the list of existing and new terms.\n  - If a term already exists, append the new chapter\u002Fsource references to it (e.g. `**Term** — definition (Ch 4, Ch 13)`).\n  - Rewrite `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md` with the fully merged, alphabetized list.\n- **Merge patterns.md**:\n  - Read existing `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fpatterns.md`.\n  - Extract any new techniques, algorithms, or patterns from the new content.\n  - Append the new patterns, ensuring consistent formatting, and keeping the total length concise (under 2,500 tokens).\n- **Merge cheatsheet.md**:\n  - Read existing `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fcheatsheet.md`.\n  - Extract new comparison rules, decision tables, or parameter guides.\n  - Integrate them cleanly into the cheatsheet structure.\n\n### 5. Re-generate the Master SKILL.md\nUpdate the master skill file `$SKILLS_HOME\u002F\u003Cskill_name>\u002FSKILL.md`:\n- **Metadata**: Increment the chapter count, update the estimated page count, and add the new source names if appropriate. Update the `Generated` date to the current date.\n- **Core Frameworks**: Fold in the most high-impact mental models or principles from the new content (ensuring the overall file remains under 4,000 tokens).\n- **Chapter Index**: Append the new chapters to the index table, linking to the newly created files.\n- **Topic Index**: Merge the new topics alphabetically. If an existing topic is also covered in the new chapters, append the new chapter links to its line (e.g. `- **Topic** → ch05, ch13`).\n\n### 6. Cleanup and Proceed to Step 10\nOnce the files are successfully written and merged, skip to **Step 10** to perform cleanup and print a custom update report summarizing the newly added chapters, merged glossary terms, and updated indices.\n\n---\n\n## Quality Rules\n\n1. **Extract structure, not summaries** — capture named frameworks, exact formulations, anti-patterns; not chapter recaps\n2. **Preserve the author's precision** — \"The 5 Whys\" ≠ \"ask why multiple times\"; keep exact naming\n3. **Density over completeness** — a 1,000-token summary beats a 10,000-token excerpt\n4. **Practitioner voice** — write \"Use X when Y\", not \"The book explains X\"\n5. **Front-load SKILL.md** — compaction keeps the first 5,000 tokens; most important content comes first\n6. **Chapter files are on-demand** — they don't count against skill budget until loaded\n7. **Never copy raw book text** — always synthesize, summarize, extract signal\n8. **Topic index is critical** — it's how the agent navigates to the right chapter file\n","\u003C!--\nCross-agent notes (informational; ignored by host agents):\n  - Compatible skill roots: GitHub Copilot CLI (~\u002F.copilot\u002Fskills, ~\u002F.agents\u002Fskills,\n    .github\u002Fskills, .claude\u002Fskills, .agents\u002Fskills), Amp (.agents\u002Fskills,\n    ~\u002F.config\u002Fagents\u002Fskills, ~\u002F.config\u002Famp\u002Fskills), Claude Code (~\u002F.claude\u002Fskills).\n  - `allowed-tools` is intentionally omitted to stay agent-neutral: Copilot CLI uses\n    `shell`\u002FMCP-server names, Claude uses `Bash`\u002F`Read`\u002F`Write`\u002F`Glob`\u002F`Grep`, Amp\n    adds `shell_command`. The skill needs shell (to run extract.py) and file\n    read\u002Fwrite — each host will prompt for those on first use.\n  - Argument hint: \u003Cpath-to-document-folder-or-glob>... [skill-name-slug]\n-->\n\n# Book-to-Skill Converter\n\nTransform written knowledge into actionable agent skills by extracting structure — not producing summaries.\n\n## Philosophy\n\nBooks contain crystallized expertise: frameworks, principles, and techniques that took years to develop. This skill extracts that knowledge into a format GitHub Copilot CLI, Amp, Claude Code, or another compatible agent can leverage repeatedly.\n\n**Extract structure, not summaries.** A skill isn't a book report. It's a toolkit of:\n- Named frameworks (mental models with clear application)\n- Actionable principles (rules that guide decisions)\n- Techniques (step-by-step methods)\n- Anti-patterns (what to avoid and why)\n- Voice calibration (how the author thinks and communicates)\n\n**Preserve the author's precision.** Frameworks often have specific names for reasons. \"The 5 Whys\" isn't interchangeable with \"ask why multiple times.\" Capture the exact formulation.\n\n**Layer depth appropriately.** Simple books → simple skills. Complex books with 10+ frameworks → skills with reference files and on-demand chapters.\n\n---\n\n## Modes of Operation\n\nFour paths available. Route based on what the user asks:\n\n### 1. Full Conversion (Default)\n**Trigger:** User provides one or more document\u002Fdirectory\u002Fglob paths without special instructions\n**Action:** Run all steps below (Steps 0–9)\n**Output:** Complete skill with SKILL.md, chapters\u002F, glossary, patterns, cheatsheet\n\n### 2. Analyze Only\n**Trigger:** User says \"analyze\", \"just extract\", or \"I want to review before generating\"\n**Action:** Run Steps 0–3, then produce a structured extraction report (frameworks, principles, techniques found). Stop — do NOT generate skill files.\n**Output:** Analysis report for user review\n\n### 3. Generate from Prior Analysis\n**Trigger:** User has existing analysis notes or previously ran analyze-only\n**Action:** Skip Steps 0–3, use the provided analysis as input, run Steps 4–9\n**Output:** Skill files from the provided analysis\n\n### 4. Update \u002F Fold-in (Existing Skill)\n**Trigger:** User provides one or more new source paths and indicates they want to update an existing skill (either by pointing to the existing skill folder, providing a skill slug that already exists in `SKILLS_HOME`, or explicitly requesting an update).\n**Action:** Run Step 0 (out-of-scope check), Step 1 (validate inputs), Step 1.5 (identify book type), and Step 2 (extract new files). Then skip to Step 5 (identify\u002Fdetect existing skill path) and run the **Update \u002F Fold-in Workflow** to merge the new content into the existing skill files.\n**Output:** Updated existing skill with new\u002Frevised chapter summaries and merged indexes\u002Fglossaries.\n\n---\n\n## Skill Locations\n\nThis converter can run from multiple skill systems. When looking for this converter's helper script or writing the generated book skill, prefer these locations in order:\n\n1. GitHub Copilot CLI personal skills: `~\u002F.copilot\u002Fskills\u002F`\n2. Cross-agent personal skills (Copilot + Amp): `~\u002F.agents\u002Fskills\u002F`\n3. Claude Code personal skills: `~\u002F.claude\u002Fskills\u002F`\n4. Project-local Copilot skills: `.github\u002Fskills\u002F`\n5. Project-local Claude skills: `.claude\u002Fskills\u002F`\n6. Project-local Amp \u002F Copilot skills: `.agents\u002Fskills\u002F`\n7. Amp global skills: `~\u002F.config\u002Fagents\u002Fskills\u002F`\n8. Amp legacy global skills: `~\u002F.config\u002Famp\u002Fskills\u002F`\n\nFor **generated** book skills, pick a destination that the user's host agent can actually discover (see Step 5). When more than one valid root exists, ask the user once and remember the answer for the session — do not silently default.\n\n---\n\n## Step 0 — Out-of-scope check\n\nIf no arguments are provided, stop and respond:\n> \"book-to-skill requires a supported document path, folder, or glob pattern. Usage: `book-to-skill \u003Cpath-to-document-folder-or-glob>... [skill-name-slug]`\"\n\nThroughout the workflow:\n- Identify the input paths and the optional skill slug.\n- If the last argument is not a file, folder, or glob that exists or matches any files, and it looks like a skill slug (e.g. lowercase hyphens, alphanumeric), treat it as `SKILL_NAME`.\n- Treat all other arguments as the list of `INPUT_PATHS`.\n- If any input path is an existing skill directory (contains `SKILL.md` and a `chapters\u002F` sub-folder), or if `SKILL_NAME` matches an existing skill slug in `SKILLS_HOME`, flag this run as an **Update\u002FFold-in** operation (Mode 4).\n\n---\n\n## Step 1 — Validate input\n\nVerify that there is at least one supported file, directory, or glob pattern among the `INPUT_PATHS`.\nFor directories and globs, expand them to find matching supported files (`.pdf`, `.epub`, `.docx`, `.txt`, `.md`, `.markdown`, `.rst`, `.adoc`, `.html`, `.htm`, `.rtf`, `.mobi`, `.azw`, `.azw3`).\n\nIf no supported files are found, stop with a clear error message.\n\n---\n\n## Step 1.5 — Identify content type\n\nBefore extracting, ask the user:\n\n> \"What kind of content do these sources have? This helps me choose the best extraction method.\n>\n> 1. **Technical** — has code blocks, tables, formulas, diagrams (e.g. programming books, academic papers, architecture guides)\n> 2. **Text-heavy** — mostly prose, few or no tables\u002Fcode (e.g. management, productivity, narrative non-fiction)\n> 3. **Not sure** — I'll use the fast method and warn you if quality seems limited\"\n\nStore the answer as `BOOK_TYPE`:\n- Option 1 → `BOOK_TYPE=technical`\n- Option 2 → `BOOK_TYPE=text`\n- Option 3 → `BOOK_TYPE=text`\n\n**If `BOOK_TYPE=technical`**, inform the user before proceeding:\n> \"📐 Technical mode selected — using Docling for structure-aware extraction (tables, code blocks, formulas preserved as markdown). This takes ~1.5s per page, so expect a few minutes for longer sources. Starting now…\"\n\n**If `BOOK_TYPE=text`**, inform:\n> \"📄 Text mode selected — using the fastest suitable extractor for each file type. Plain text\u002FMarkdown\u002FHTML are usually ready in seconds; PDFs use pdftotext when available.\"\n\n---\n\n## Step 2 — Extract text from the source documents\n\nRun the extraction script, passing the input paths:\n\n```bash\nSCRIPT_PATH=\"\"\nfor candidate in \\\n  \"$HOME\u002F.copilot\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.agents\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.claude\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \".github\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \".claude\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \".agents\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.config\u002Fagents\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\" \\\n  \"$HOME\u002F.config\u002Famp\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py\"\ndo\n  if [ -f \"$candidate\" ]; then\n    SCRIPT_PATH=\"$candidate\"\n    break\n  fi\ndone\n\nif [ -z \"$SCRIPT_PATH\" ]; then\n  echo \"Could not find scripts\u002Fextract.py for book-to-skill\" >&2\n  exit 1\nfi\n\nPYTHON_BIN=\"${PYTHON_BIN:-python3}\"\nif ! command -v \"$PYTHON_BIN\" >\u002Fdev\u002Fnull 2>&1; then\n  PYTHON_BIN=\"python\"\nfi\n\n\"$PYTHON_BIN\" \"$SCRIPT_PATH\" $INPUT_PATHS --mode \u003CBOOK_TYPE> --install-missing ask\n```\n\nBefore extraction, the script checks optional Python packages needed for the detected format. If a better extractor is missing, it prompts the user with the available fallback. Non-interactive sessions default to fallback unless install mode is explicitly `yes`.\n\n**Tip — preflight the environment:** run `\"$PYTHON_BIN\" \"$SCRIPT_PATH\" --check` to print a per-format report of which extractors are installed and the exact command to install whatever is missing, without processing any file. Useful when a user reports a setup or quality problem.\n\nThis creates:\n- `\u003Ctempdir>\u002Fbook_skill_work\u002Ffull_text.txt` — combined extracted text of all sources with clear visually demarcated boundaries.\n- `\u003Ctempdir>\u002Fbook_skill_work\u002Fmetadata.json` — overall combined size, words, pages, token counts, and a detailed list of individual processed `sources`.\n\nRead `\u003Ctempdir>\u002Fbook_skill_work\u002Fmetadata.json` to inspect the results.\n\n---\n\n## Step 2.5 — Pre-flight cost estimate\n\nRead `\u003Ctempdir>\u002Fbook_skill_work\u002Fmetadata.json` and present the user with an estimate **before doing any generation**:\n\n```\n📖 Sources detected: \u003Ctotal_sources> source(s)\n\u003Clist each source filename and format from the sources metadata list>\n📄 Combined Pages\u002FSections: ~\u003CN> | Words: ~\u003CN> | Total tokens: ~\u003CN>K\n\n💰 Estimated token cost (Full Conversion \u002F Update):\n   Input  (reading + prompts): ~\u003CN>K tokens\n   Output (skill files generated\u002Fupdated):  ~\u003CN>K tokens\n   Total:                           ~\u003CN>K tokens\n\n   Reference prices (as of 2025):\n   Claude Sonnet 4.5 → ~$\u003CX> USD\n   Claude Haiku 4.5  → ~$\u003CX> USD\n\n   ⏱  Estimated time: ~\u003CN> minutes\n\n📁 Files to be generated\u002Fupdated:\n   SKILL.md + chapter files + glossary + patterns + cheatsheet\n\n➡  Proceed with Full Conversion \u002F Update? (or type \"analyze only\" to preview first)\n```\n\n**How to estimate:**\n- Input tokens ≈ `estimated_tokens` from metadata × 1.3 (prompts overhead per chapter pass)\n- Output tokens ≈ chapters × per-chapter budget + 4,000 (SKILL.md) + 4,500 (glossary + patterns + cheatsheet)\n  - Per-chapter budget midpoint by `BOOK_TYPE` (DEPTH is decided later in Step 4 and can raise it): `text` ≈ 1,000, `technical` ≈ 1,800. If the user has already indicated reference-only vs deep study, use the matching row of the Step 7 matrix.\n- Price: Sonnet input=$3\u002FMTok output=$15\u002FMTok — Haiku input=$0.80\u002FMTok output=$4\u002FMTok\n\nWait for the user to confirm before proceeding. If they say \"analyze only\", switch to Mode 2.\n\n---\n\n## Step 2.6 — REPL-style access for large books (> 50k tokens)\n\nInspired by the Recursive Language Model (RLM) paradigm: treat `full_text.txt` as a queryable corpus, not a single read. Loading the whole file into context burns budget you will need later for generation.\n\nFor books over ~50k tokens, prefer programmatic probes over `Read(full_text.txt)` without bounds:\n\n```bash\n# Size check before any Read\nwc -w \"$FULL_TEXT_PATH\"\n\n# Find chapter offsets without loading the whole file\ngrep -n -E \"^\\s*(Chapter|CHAPTER)\\s+[0-9]+\" \"$FULL_TEXT_PATH\" | head -40\n\n# Pull only the chapter you need (lines start..end inclusive)\nsed -n '\u003Cstart>,\u003Cend>p' \"$FULL_TEXT_PATH\"\n\n# Verify a framework is actually mentioned before claiming it in SKILL.md\ngrep -c -i \"westrum\\|dora\" \"$FULL_TEXT_PATH\"\n\n# Targeted Read with offset\u002Flimit avoids dumping the full file\n# Read(file_path=full_text.txt, offset=\u003Cline>, limit=\u003Clines>)\n```\n\nUse this approach for Step 3 (structure analysis), Step 7 (per-chapter summaries), and Step 8 (glossary \u002F patterns extraction). On books under 50k tokens, a single `Read` is fine.\n\nWhy this matters: a 200-page book is ~75k tokens. Re-reading it once per chapter (28 passes) costs ~2M input tokens; using grep + sed to pull only relevant slices keeps generation cost proportional to the output, not the source.\n\n---\n\n## Step 3 — Analyze book structure\n\nRead the first 8,000 characters of the extracted `full_text.txt` to identify:\n- Book **title** and **author(s)**\n- **Chapter structure** (look for \"Chapter N\", \"PART I\", numbered headings, table of contents)\n- **Core themes** and subject domain\n- Approximate number of chapters\n\nThen read the Table of Contents section if present to map all chapters.\n\n**If mode is \"Analyze Only\":** produce the extraction report now and stop. Structure:\n```\n## Extraction Report — \u003CTitle>\n\n### Author's Core Frameworks\n- **\u003CFramework Name>**: \u003Cwhat it is and when to apply>\n\n### Key Principles\n- \u003CPrinciple>: \u003Cactionable rule>\n\n### Techniques & Methods\n- \u003CTechnique>: \u003Cstep-by-step or how-to>\n\n### Anti-patterns\n- \u003CWhat to avoid>: \u003Cwhy>\n\n### Suggested Skill Name\n`{author-lastname}-{core-concept}` — e.g. `cialdini-influence`\n\n### Chapters Detected\n| # | Title | Main Frameworks |\n```\n\n---\n\n## Step 4 — Ask purpose (Full Conversion only)\n\nBefore generating, ask the user:\n\n> \"What should this skill help you do? (Pick one or more)\n> 1. Apply the author's frameworks while working\n> 2. Think with the author's mental models\n> 3. Reference specific chapters and concepts\n> 4. All of the above\"\n\nUse the answer to weight what gets highlighted in the SKILL.md Core section.\n\n**Derive `DEPTH` from the answer (no extra prompt):**\n- Answer is **only** option 3 (reference) → `DEPTH=reference` — lean, fast-lookup chapters.\n- Answer includes option 1, 2, or 4 → `DEPTH=study` — deeper chapters with more worked detail, examples, and reasoning.\n\n`DEPTH` and `BOOK_TYPE` together set the per-chapter token budget in Step 7. Do **not** ask a separate \"study vs reference\" question — it is inferred here. (In Modes 2\u002F3, where Step 4 is skipped, default `DEPTH=study`.)\n\n---\n\n## Step 5 — Determine skill name\n\nIf `SKILL_NAME` was provided, use it as the skill slug.\nOtherwise, propose two options and let the user choose:\n- **By author-concept**: `{author-lastname}-{core-concept}` (e.g. `cialdini-influence`, `meadows-systems`)\n- **By title**: lowercase hyphens from book title (e.g. `designing-data-intensive-apps`)\n\nDefault to author-concept format if the book has a strong methodological identity.\n\nChoose the destination skill root (`SKILLS_HOME`). Probe the user's filesystem for existing skill homes and pick by **the host the user is running in**:\n\n| Host agent | Personal skill root (probe in order) | Project-local root |\n|---|---|---|\n| **GitHub Copilot CLI** | `~\u002F.copilot\u002Fskills` → `~\u002F.agents\u002Fskills` | `.github\u002Fskills` → `.claude\u002Fskills` → `.agents\u002Fskills` |\n| **Amp** | `~\u002F.agents\u002Fskills` → `~\u002F.config\u002Fagents\u002Fskills` → `~\u002F.config\u002Famp\u002Fskills` | `.agents\u002Fskills` |\n| **Claude Code** | `~\u002F.claude\u002Fskills` | `.claude\u002Fskills` |\n\nSelection rules:\n1. If **exactly one** of the host's candidate roots exists on disk, use it without asking.\n2. If **none** exist (fresh machine), ask the user which root to create — present the host-appropriate options and remember the choice for the session. Do not silently pick.\n3. If the user explicitly asked for project-local output, prefer the project-local row.\n4. If you cannot identify the host, ask: \"Which agent are you running this in — GitHub Copilot CLI, Amp, or Claude Code?\"\n\nSet `SKILLS_HOME` to the selected root and check if `$SKILLS_HOME\u002F\u003Cskill_name>\u002F` already exists.\nIf it does, prompt the user to choose:\n1. **Update \u002F Fold-in** (Mode 4) — integrate new files\u002Fcontent into the existing skill components.\n2. **Overwrite** — delete and regenerate the skill from scratch.\n3. **Rename** — append `-2` or use a different custom slug.\n\nIf the user selects **Update \u002F Fold-in**, proceed immediately to the **Update \u002F Fold-in Workflow** section after Step 2.5 (skipping Steps 3, 4, 6, 7, 8, 9).\n\n---\n\n## Step 6 — Create skill directory structure\n\n```bash\nmkdir -p \"$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\"\n```\n\n---\n\n## Step 7 — Generate chapter summaries\n\n**TOKEN BUDGET RULE — CRITICAL (adaptive):**\n\nThe per-chapter budget scales with `BOOK_TYPE` and `DEPTH`. Technical chapters need room for code and tables; study depth needs room for worked reasoning. Pick the budget from this matrix:\n\n| | `DEPTH=reference` | `DEPTH=study` |\n|---|---|---|\n| `BOOK_TYPE=text` | 800–1,200 tokens | 1,000–1,800 tokens |\n| `BOOK_TYPE=technical` | 1,200–1,800 tokens | 2,000–3,000 tokens |\n\n- These are per-file targets, not hard caps — a dense chapter may run over, a thin one under. Density still beats length (Quality Rule #3): never pad to hit a number.\n- Files are loaded on-demand, so a larger chapter only costs tokens when that chapter is actually read.\n- When in doubt between two cells (e.g. mixed-content book), use the lower budget and let depth come from precision, not volume.\n\n**`DEPTH=study` is earned with content, not a bigger number.** The standard section template (Core Idea → Connects To) naturally lands a dense prose chapter around 700–900 tokens. To reach the study budget *honestly* — not by padding — a study-depth chapter must add concrete material:\n- **Reproduce one worked example or artifact** from the chapter (e.g. the example press release, a sample dialogue, a filled-in template, a decision the author walks through) under a `## Worked Example` section. This is the single biggest lever and the main thing a learner returns for.\n- **Expand the \"How\" of each framework** into explicit steps or criteria, not a one-liner.\n- **Add a short \"Why it works \u002F failure mode\" note** to the top 1–2 frameworks.\n\nIf a chapter genuinely has no worked example and resists expansion, let it land below the study floor rather than padding — and note that the chapter is thin in its Core Idea. A `reference`-depth chapter, by contrast, deliberately omits worked examples and keeps only the decision-ready essentials.\n\nFor EACH chapter\u002Fmajor section identified in Step 3:\n\nRead the corresponding section of the extracted `full_text.txt` (use character offsets or grep for chapter headings).\n\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\u002Fch\u003CNN>-\u003Cslug>.md` using the structure below.\n\n**Adapt emphasis based on `BOOK_TYPE`:**\n- `technical` → prioritize \"Code Examples\", \"Reference Tables\", and \"Commands & APIs\" sections; preserve exact syntax\n- `text` → prioritize \"Frameworks Introduced\", \"Mental Models\", and \"Key Takeaways\"; skip empty technical sections\n\n```markdown\n# Chapter N: \u003CFull Title>\n\n## Core Idea\n\u003C1–2 sentences: the single most important thing this chapter teaches>\n\n## Frameworks Introduced\n- **\u003CFramework Name>**: \u003Cexact formulation — preserve the author's naming>\n  - When to use: \u003Cspecific situation>\n  - How: \u003Csteps or criteria>\n\n## Key Concepts\n- **\u003CTerm>**: \u003Cprecise definition in 1 sentence>\n(5–10 most important terms from this chapter)\n\n## Mental Models\n\u003C2–4 frameworks or thinking tools. Write as \"Use X when Y\" or \"Think of X as Y\">\n\n## Anti-patterns\n- **\u003CWhat to avoid>**: \u003Cwhy it fails>\n\n## Code Examples *(technical books only — omit if BOOK_TYPE=text)*\n\u003C!-- Copy the most instructive snippet from the chapter. Preserve indentation exactly. -->\n```\u003Clanguage>\n\u003Ckey code example from this chapter>\n```\n- **What it demonstrates**: \u003Cone line>\n\n## Reference Tables *(technical books only — omit if BOOK_TYPE=text)*\n\u003C!-- Reproduce any comparison matrix, parameter table, or decision table from the chapter in markdown. -->\n\n## Worked Example *(DEPTH=study only — omit for DEPTH=reference)*\n\u003C!-- Reproduce or reconstruct one concrete example the author works through: a\n     sample document, a dialogue, a filled-in template, a before\u002Fafter, or a\n     decision walked end-to-end. This is what makes a study chapter worth its\n     budget. Keep it faithful to the source; never copy long raw passages —\n     reconstruct the example compactly. -->\n\n## Key Takeaways\n1. \u003CActionable insight>\n2. \u003CActionable insight>\n3. \u003CActionable insight>\n(3–7 takeaways a practitioner must remember)\n\n## Connects To\n- **Ch N**: \u003Cwhy this chapter relates>\n- **\u003CConcept>**: \u003Cexternal concept or standard it connects with>\n```\n\n---\n\n## Step 8 — Generate supporting files\n\n### glossary.md\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md`:\n- Every significant term from the book, alphabetically sorted\n- Format: `**Term** — definition (Ch N)`\n- Max 1,500 tokens\n\n### patterns.md\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fpatterns.md`:\n- All concrete techniques, design patterns, algorithms from the book\n- Format: `## Pattern Name\\n**When to use**: ...\\n**How**: ...\\n**Trade-offs**: ...`\n- Max 2,000 tokens\n\n### cheatsheet.md\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fcheatsheet.md`:\n\n**This is the most differentiated layer of the skill — treat it as a reasoning aid, not a keyword list.** Anyone can grep the glossary for a term. The cheatsheet captures the author's *judgment*: the decisions they'd make and why. It's the file that turns \"I know the words\" into \"I'd act the way the author would\".\n\nPrioritize, in order:\n1. **Decision rules** — \"When X, do Y, because Z.\" The if\u002Fthen logic the author applies, stated so the reader can apply it without re-reading the book.\n2. **Decision trees \u002F flowcharts** (as nested bullets or a small table) — for choices with more than two branches.\n3. **Trade-off matrices** — competing options scored on the dimensions the author cares about, so the reader can pick under their own constraints.\n4. **Thresholds & defaults** — the specific numbers, ratios, or rules of thumb the author commits to (e.g. \"keep functions under ~20 lines\", \"alert when error budget \u003C 10%\").\n5. **Tells & smells** — fast heuristics for recognizing a situation (\"if you see X, you're probably in trouble Y\").\n\nAvoid: bare term→definition rows (that's the glossary), and prose paragraphs (that's the chapters). Every line should help the reader *decide* something.\n\n- Format mostly as compact tables and decision rules; the content you'd want on a single printed page kept beside you while working.\n- Max 1,200 tokens.\n\n---\n\n## Step 9 — Generate the master SKILL.md\n\n**CRITICAL TOKEN BUDGET: Keep SKILL.md body under 4,000 tokens.**\nCompaction truncates from the END — put the most important content FIRST.\n\nCreate `$SKILLS_HOME\u002F\u003Cskill_name>\u002FSKILL.md`:\n\n```markdown\n---\nname: \u003Cskill_name>\ndescription: \"Knowledge base from \\\"\u003CFull Title>\\\" by \u003CAuthor(s)>. Use when applying \u003Cauthor>'s frameworks for \u003Ckey topics, 3–6 terms>, studying the book, or referencing its concepts.\"\n---\n\n\u003C!-- argument-hint: [topic, framework name, or chapter number] -->\n\n# \u003CFull Title>\n**Author**: \u003CAuthor(s)> | **Pages**: ~\u003CN> | **Chapters**: \u003CN> | **Generated**: \u003CYYYY-MM-DD>\n\n## How to Use This Skill\n\n- **Without arguments** — load core frameworks for reference\n- **With a topic** — ask about `replication`, `pricing`, or another indexed topic; I find and read the relevant chapter\n- **With chapter** — ask for `ch05`; I load that specific chapter\n- **Browse** — ask \"what chapters do you have?\" to see the full index\n\nWhen you ask about a topic not covered in Core Frameworks below, I will read\nthe relevant chapter file before answering.\n\n---\n\n## Core Frameworks & Mental Models\n\u003C!-- ~2,000 tokens: the author's most important named frameworks and principles.\n     Preserve exact names. Write as \"Use X when Y\", \"Prefer X over Y because Z\".\n     This is a toolkit, not a summary. -->\n\n\u003Cgenerate 2,000 tokens of the most critical frameworks and insights here>\n\n---\n\n## Chapter Index\n\n| # | Title | Key Frameworks |\n|---|-------|----------------|\n| [ch01](chapters\u002Fch01-\u003Cslug>.md) | \u003CTitle> | \u003Cframework1>, \u003Cframework2> |\n| [ch02](chapters\u002Fch02-\u003Cslug>.md) | \u003CTitle> | \u003Cframework1>, \u003Cframework2> |\n...\n\n## Topic Index\n\n\u003C!-- Alphabetical. Major terms\u002Fframeworks → chapter(s) that cover them. -->\n- **\u003CTerm>** → ch\u003CN>[, ch\u003CN>]\n- **\u003CTerm>** → ch\u003CN>\n\n## Supporting Files\n\n- [glossary.md](glossary.md) — all key terms with definitions\n- [patterns.md](patterns.md) — all techniques and design patterns\n- [cheatsheet.md](cheatsheet.md) — quick reference tables and decision guides\n\n---\n\n## Scope & Limits\n\nThis skill covers the book content only. For hands-on implementation in your codebase,\ncombine with project-specific tools. For topics beyond this book, check related skills\nor ask the agent directly.\n```\n\n---\n\n## Step 10 — Cleanup and report\n\n```bash\nPYTHON_BIN=\"${PYTHON_BIN:-python3}\"\nif ! command -v \"$PYTHON_BIN\" >\u002Fdev\u002Fnull 2>&1; then\n  PYTHON_BIN=\"python\"\nfi\n\n\"$PYTHON_BIN\" - \u003C\u003C'PY'\nimport os\nimport shutil\nimport tempfile\nfrom pathlib import Path\nshutil.rmtree(\n    os.environ.get(\"BOOK_SKILL_WORKDIR\", Path(tempfile.gettempdir()) \u002F \"book_skill_work\"),\n    ignore_errors=True,\n)\nPY\n```\n\nThen report to the user:\n\n```\n✅ Skill created: $SKILLS_HOME\u002F\u003Cskill_name>\u002F\n\n📚 Book: \u003CFull Title> — \u003CAuthor>\n📄 Pages: ~\u003CN> | Chapters: \u003CN>\n\nFiles generated:\n  SKILL.md         — core frameworks + index   (~X tokens)\n  chapters\u002F        — \u003CN> chapter summaries     (~X tokens each, ~X total)\n  glossary.md      — key terms                 (~X tokens)\n  patterns.md      — techniques & patterns     (~X tokens)\n  cheatsheet.md    — quick reference           (~X tokens)\n  ─────────────────────────────────────────────────────\n  Total skill size: ~X tokens (loaded on-demand, not all at once)\n\n💡 Tip: check your agent's session cost\u002Fusage command to see actual token usage.\n\nUsage:\n  Ask for \u003Cskill_name>                  → load core frameworks\n  Ask \u003Cskill_name> about \u003Ctopic>        → find and explain a topic\n  Ask \u003Cskill_name> for ch\u003CN>            → dive into a specific chapter\n\nReload (if your agent doesn't auto-detect new skills):\n  GitHub Copilot CLI:  \u002Fskills reload\n  Claude Code:         restart the session\n  Amp:                 restart the session\n\nShare this skill (Copilot ecosystem, optional):\n  gh skill publish $SKILLS_HOME\u002F\u003Cskill_name>\n```\n\n---\n\n## Update \u002F Fold-in Workflow\n\nWhen performing an Update\u002FFold-in operation on an existing skill at `$SKILLS_HOME\u002F\u003Cskill_name>\u002F`:\n\n### 1. Read Existing Skill Structure\nRead and parse the existing skill's files:\n- Read `$SKILLS_HOME\u002F\u003Cskill_name>\u002FSKILL.md` to parse the existing **Chapter Index**, **Topic Index**, metadata (author, total chapters), and **Core Frameworks**.\n- List all files in `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\u002F` to find the highest chapter number (e.g. `ch12`).\n- Read `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md`, `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fpatterns.md`, and `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fcheatsheet.md` to see what terms and frameworks are already indexed.\n\n### 2. Match Content & Identify Revisions vs. Additions\nAnalyze the new extracted text in `\u003Ctempdir>\u002Fbook_skill_work\u002Ffull_text.txt` to identify if the new content represents:\n- **Updates\u002FRevisions to existing chapters**: If a section of the new content directly updates or expands an existing chapter's topic, read the existing chapter file, merge the new details into it, and rewrite the file.\n- **New additions**: If the content introduces new chapters, papers, or separate sections, create **new chapter summary files** under `chapters\u002F`. Start numbering these files after the highest existing chapter number (e.g. if the existing chapters stop at `ch12`, create `ch13-*.md`, `ch14-*.md`, etc.).\n\n### 3. Generate or Update Chapter Summary Files\nFor each new or revised chapter:\n- Read the corresponding section of the extracted new text.\n- Follow the formatting guidelines in **Step 7** to build the summary.\n- Write\u002Fupdate the file in `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fchapters\u002F`.\n\n### 4. Merge Supporting Files\n- **Merge glossary.md**:\n  - Read the existing `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md`.\n  - Extract all new terms and definitions from the new content (Step 8 glossary guidelines).\n  - Combine and alphabetize the list of existing and new terms.\n  - If a term already exists, append the new chapter\u002Fsource references to it (e.g. `**Term** — definition (Ch 4, Ch 13)`).\n  - Rewrite `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fglossary.md` with the fully merged, alphabetized list.\n- **Merge patterns.md**:\n  - Read existing `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fpatterns.md`.\n  - Extract any new techniques, algorithms, or patterns from the new content.\n  - Append the new patterns, ensuring consistent formatting, and keeping the total length concise (under 2,500 tokens).\n- **Merge cheatsheet.md**:\n  - Read existing `$SKILLS_HOME\u002F\u003Cskill_name>\u002Fcheatsheet.md`.\n  - Extract new comparison rules, decision tables, or parameter guides.\n  - Integrate them cleanly into the cheatsheet structure.\n\n### 5. Re-generate the Master SKILL.md\nUpdate the master skill file `$SKILLS_HOME\u002F\u003Cskill_name>\u002FSKILL.md`:\n- **Metadata**: Increment the chapter count, update the estimated page count, and add the new source names if appropriate. Update the `Generated` date to the current date.\n- **Core Frameworks**: Fold in the most high-impact mental models or principles from the new content (ensuring the overall file remains under 4,000 tokens).\n- **Chapter Index**: Append the new chapters to the index table, linking to the newly created files.\n- **Topic Index**: Merge the new topics alphabetically. If an existing topic is also covered in the new chapters, append the new chapter links to its line (e.g. `- **Topic** → ch05, ch13`).\n\n### 6. Cleanup and Proceed to Step 10\nOnce the files are successfully written and merged, skip to **Step 10** to perform cleanup and print a custom update report summarizing the newly added chapters, merged glossary terms, and updated indices.\n\n---\n\n## Quality Rules\n\n1. **Extract structure, not summaries** — capture named frameworks, exact formulations, anti-patterns; not chapter recaps\n2. **Preserve the author's precision** — \"The 5 Whys\" ≠ \"ask why multiple times\"; keep exact naming\n3. **Density over completeness** — a 1,000-token summary beats a 10,000-token excerpt\n4. **Practitioner voice** — write \"Use X when Y\", not \"The book explains X\"\n5. **Front-load SKILL.md** — compaction keeps the first 5,000 tokens; most important content comes first\n6. **Chapter files are on-demand** — they don't count against skill budget until loaded\n7. **Never copy raw book text** — always synthesize, summarize, extract signal\n8. **Topic index is critical** — it's how the agent navigates to the right chapter file\n",{"name":5,"description":7},"master","8c91ae30409640de28e218b3e9c7fe01c01d257b","skills\u002Fbook-to-skill","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow","https:\u002F\u002Fgithub.com\u002Ffozagtx","hi.fawuzanpima@gmail.com","Forward deployed","2026-10-08 00:13:28",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add fozagtx\u002FBuildOS-workflow --skill book-to-skill",{"tool":39,"command":40},"bunx","bunx skills add fozagtx\u002FBuildOS-workflow --skill book-to-skill",{"tool":42,"command":43},"pnpm","pnpm dlx skills add fozagtx\u002FBuildOS-workflow --skill book-to-skill","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FSKILL.md",true,[47,53,57,61,65,69,73,77,81,87,90,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,170,174,178,182,187,191,195,199,203,207,211,215,219,223],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},".github\u002Fdependabot.yml","REFERENCE","参考文档",693,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002Fdependabot.yml",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},".github\u002FFUNDING.yml",23,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002FFUNDING.yml",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},".github\u002FISSUE_TEMPLATE\u002Fbug_report.md",508,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002FISSUE_TEMPLATE\u002Fbug_report.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},".github\u002FISSUE_TEMPLATE\u002Ffeature_request.md",469,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002FISSUE_TEMPLATE\u002Ffeature_request.md",{"path":66,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":67,"sourceHtmlUrl":68},".github\u002FPULL_REQUEST_TEMPLATE.md",3217,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002FPULL_REQUEST_TEMPLATE.md",{"path":70,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":71,"sourceHtmlUrl":72},".github\u002Fworkflows\u002Fci.yml",6983,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002Fworkflows\u002Fci.yml",{"path":74,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":75,"sourceHtmlUrl":76},".github\u002Fworkflows\u002Fcodeql.yml",662,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002Fworkflows\u002Fcodeql.yml",{"path":78,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":79,"sourceHtmlUrl":80},".github\u002Fworkflows\u002Fdeploy-docs.yml",1557,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.github\u002Fworkflows\u002Fdeploy-docs.yml",{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},".gitignore","OTHER","其他",489,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002F.gitignore",{"path":88,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":89},"BACKERS.md","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FBACKERS.md",{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"book_to_skill\u002F__init__.py","SCRIPT","脚本",217,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002F__init__.py",{"path":97,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":98,"sourceHtmlUrl":99},"book_to_skill\u002F__main__.py",74,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002F__main__.py",{"path":101,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":102,"sourceHtmlUrl":103},"book_to_skill\u002Fcli.py",536,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fcli.py",{"path":105,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":106,"sourceHtmlUrl":107},"book_to_skill\u002Fconfig.py",955,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fconfig.py",{"path":109,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":110,"sourceHtmlUrl":111},"book_to_skill\u002Fdependencies.py",9998,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fdependencies.py",{"path":113,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":114,"sourceHtmlUrl":115},"book_to_skill\u002Fexceptions.py",117,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fexceptions.py",{"path":117,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":118,"sourceHtmlUrl":119},"book_to_skill\u002Fparsers\u002F__init__.py",18,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002F__init__.py",{"path":121,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":122,"sourceHtmlUrl":123},"book_to_skill\u002Fparsers\u002Fcalibre.py",876,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002Fcalibre.py",{"path":125,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":126,"sourceHtmlUrl":127},"book_to_skill\u002Fparsers\u002Fdocx.py",4849,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002Fdocx.py",{"path":129,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":130,"sourceHtmlUrl":131},"book_to_skill\u002Fparsers\u002Fepub.py",5066,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002Fepub.py",{"path":133,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":134,"sourceHtmlUrl":135},"book_to_skill\u002Fparsers\u002Fhtml.py",1737,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002Fhtml.py",{"path":137,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":138,"sourceHtmlUrl":139},"book_to_skill\u002Fparsers\u002Fpdf.py",3324,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002Fpdf.py",{"path":141,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":142,"sourceHtmlUrl":143},"book_to_skill\u002Fparsers\u002Frtf.py",1709,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002Frtf.py",{"path":145,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":146,"sourceHtmlUrl":147},"book_to_skill\u002Fparsers\u002Ftext.py",1201,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Fparsers\u002Ftext.py",{"path":149,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":150,"sourceHtmlUrl":151},"book_to_skill\u002Futils.py",27153,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fbook_to_skill\u002Futils.py",{"path":153,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":154,"sourceHtmlUrl":155},"CHANGELOG.md",10009,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FCHANGELOG.md",{"path":157,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":158,"sourceHtmlUrl":159},"CONTRIBUTING.md",2096,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FCONTRIBUTING.md",{"path":161,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":162,"sourceHtmlUrl":163},"docs\u002FARCHITECTURE.md",4893,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fdocs\u002FARCHITECTURE.md",{"path":165,"resourceType":166,"resourceTypeDesc":167,"sizeBytes":168,"sourceHtmlUrl":169},"docs\u002Fassets\u002Flogo.png","ASSET","资产文件",196590,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fdocs\u002Fassets\u002Flogo.png",{"path":171,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":172,"sourceHtmlUrl":173},"docs\u002FCNAME",21,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fdocs\u002FCNAME",{"path":175,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":176,"sourceHtmlUrl":177},"docs\u002Findex.md",2587,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fdocs\u002Findex.md",{"path":179,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":180,"sourceHtmlUrl":181},"docs\u002FPERFORMANCE.md",3212,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fdocs\u002FPERFORMANCE.md",{"path":183,"resourceType":184,"resourceTypeDesc":185,"sizeBytes":186,"sourceHtmlUrl":16},"LICENSE.md","LICENSE","许可证",1068,{"path":188,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":189,"sourceHtmlUrl":190},"mkdocs.yml",1917,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fmkdocs.yml",{"path":192,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":193,"sourceHtmlUrl":194},"pyproject.toml",930,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fpyproject.toml",{"path":196,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":197,"sourceHtmlUrl":198},"README.md",24623,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FREADME.md",{"path":200,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":201,"sourceHtmlUrl":202},"scripts\u002Fbanner.txt",2836,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fbanner.txt",{"path":204,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":205,"sourceHtmlUrl":206},"scripts\u002Fextract.py",871,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Fscripts\u002Fextract.py",{"path":208,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":209,"sourceHtmlUrl":210},"SECURITY.md",1290,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002FSECURITY.md",{"path":212,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":213,"sourceHtmlUrl":214},"tests\u002Ftest_book_to_skill.py",56874,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Ftests\u002Ftest_book_to_skill.py",{"path":216,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":217,"sourceHtmlUrl":218},"tests\u002Ftest_discovery_tax.py",4091,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Ftests\u002Ftest_discovery_tax.py",{"path":220,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":221,"sourceHtmlUrl":222},"tools\u002Fdiscovery_tax.py",8597,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Ftools\u002Fdiscovery_tax.py",{"path":224,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":225,"sourceHtmlUrl":226},"tools\u002Fvalidate_skill.py",8211,"https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fbook-to-skill\u002Ftools\u002Fvalidate_skill.py",[228,235,242,249,256,265],{"skillNo":229,"name":230,"nameZh":6,"description":231,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":232,"categories":233,"keywords":234,"publishedAt":20},"01M7EE49XAN8GE213J691P3RZ9","xitter","Interact with X\u002FTwitter via the x-cli terminal client using official X API credentials. Use for posting, reading timelines, searching tweets, liking, retweeting, bookmarks, mentions, and user lookups.","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fxitter\u002FSKILL.md",[],[],{"skillNo":236,"name":237,"nameZh":6,"description":238,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":239,"categories":240,"keywords":241,"publishedAt":20},"01M7EE3TMR3CR7HR7HTCAKPTTR","writing-plans","Use when you have a spec or requirements for a multi-step task. Creates comprehensive implementation plans with bite-sized tasks, exact file paths, and complete code examples.","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":243,"name":244,"nameZh":6,"description":245,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":246,"categories":247,"keywords":248,"publishedAt":20},"01M7EE3AJ6V2VBVAX1WTV7M447","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fwhisper\u002FSKILL.md",[],[],{"skillNo":250,"name":251,"nameZh":6,"description":252,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":253,"categories":254,"keywords":255,"publishedAt":20},"01M7EE36AAP5THSCQAHH6JCWVV","weights-and-biases","Track ML experiments with automatic logging, visualize training in real-time, optimize hyperparameters with sweeps, and manage model registry with W&B - collaborative MLOps platform","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fweights-and-biases\u002FSKILL.md",[],[],{"skillNo":257,"name":258,"nameZh":6,"description":259,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":260,"licenseFileUrl":261,"sourceHtmlUrl":262,"categories":263,"keywords":264,"publishedAt":20},"01M7EE30R3S4EAK1FWJEBG7MW9","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":266,"name":267,"nameZh":6,"description":268,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":269,"categories":270,"keywords":271,"publishedAt":20},"01M7EE2X3PJ0ZJR0JJNF2M4NS5","web-pentest","Authorized web pentest: recon, proof-based exploits, report.","https:\u002F\u002Fgithub.com\u002Ffozagtx\u002FBuildOS-workflow\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-pentest\u002FSKILL.md",[],[]]