skill-from-book
Create Claude skills from book content (markdown files). Transforms long-form book knowledge into structured, context-efficient skill packages with granular reference files, workflows, and use-case guidelines. Use this skill when: - Converting a book (markdown) into a reusable Claude skill - Creating knowledge bases from technical books, guides, or documentation - Building skills that need progressive disclosure of large content - Structuring book knowledge for efficient context loading
What this skill does
# Skill From Book
Transform book content into structured, context-efficient Claude skills.
## Overview
This skill guides you through converting a book (in markdown format) into a well-organized skill with:
- Granular knowledge files (one concept per file)
- Workflows for repeatable tasks
- Use-case guidelines (mapping tasks to relevant files)
- Progress tracking for multi-session work
- Subagent extraction tasks
## CRITICAL INSTRUCTIONS
**YOU MUST FOLLOW THIS WORKFLOW STRICTLY. DO NOT SKIP OR REORDER PHASES.**
1. **DO NOT read the book markdown file content before starting Phase 1**
2. **MUST read each reference file BEFORE starting its corresponding phase**
3. **MUST complete each phase before moving to the next**
4. **MUST use subagents for extraction tasks**
5. **MUST propose workflows to user before finalization**
---
## Workflow
### Phase 1: Analysis
**STOP! Before proceeding, you MUST:**
1. Read `references/analysis-guide.md` completely
2. Only then proceed with the steps below
**Phase 1 Steps:**
1. **Extract TOC and outline ONLY** (DO NOT read full book content)
```bash
# Count total lines
wc -l book.md
# Extract headers/TOC - THIS IS ALL YOU NEED
grep -E "^#{1,3} " book.md
```
2. **Identify knowledge categories from outline**
- Core principles/philosophy
- Rules and guidelines
- Examples (good vs bad)
- Patterns and anti-patterns
- Checklists and quick references
3. **Define use cases**
- Who will use this skill?
- What tasks will they perform?
- What questions will they ask?
4. **Ask user to confirm** the identified categories and use cases before proceeding
---
### Phase 2: Planning
**STOP! Before proceeding, you MUST:**
1. Read `references/extraction-patterns.md` completely
2. Read `references/file-templates.md` completely
3. Only then proceed with the steps below
**Phase 2 Steps:**
1. **Design file structure with required files per category**
Each category MUST contain these 3 basic files:
- `knowledge.md` - Core concepts, definitions, and foundational understanding
- `rules.md` - Specific guidelines, do's and don'ts
- `examples.md` - Good/bad code examples, before/after comparisons
Additional files as needed:
- `patterns.md` - Reusable solutions
- `smells.md` - Anti-patterns and what to avoid
- `checklist.md` - Quick reference checklists
```
skill-name/
├── SKILL.md
├── progress.md
├── guidelines.md
├── workflows/ # NEW: Step-by-step processes
│ ├── [task-1].md
│ └── [task-2].md
└── references/
├── category-1/
│ ├── knowledge.md # REQUIRED
│ ├── rules.md # REQUIRED
│ ├── examples.md # REQUIRED
│ ├── patterns.md # Optional
│ └── checklist.md # Optional
└── category-2/
├── knowledge.md # REQUIRED
├── rules.md # REQUIRED
├── examples.md # REQUIRED
└── smells.md # Optional
```
2. **Create progress.md**
- List ALL files to create (required + optional)
- Group by phase/priority
- Track completion status
3. **Plan extraction tasks**
- One task per knowledge file
- Define input (book section with line ranges) and output (file path)
- Identify dependencies between tasks
4. **Ask user to confirm** the file structure and extraction plan before proceeding
---
### Phase 3: Extraction
**STOP! Before proceeding, you MUST:**
1. Have completed Phase 1 and Phase 2
2. Have user confirmation on the plan
3. Only then proceed with extraction
**CRITICAL: You MUST use subagents (Task tool) for extraction. One subagent per topic - each subagent creates ALL files for that topic.**
#### Main Agent Instructions for Phase 3
**YOU MUST follow these steps:**
1. **One subagent per topic** - Each subagent reads a book section ONCE and creates all files for that topic (knowledge.md, rules.md, examples.md, plus any optional files)
2. **Prepare the subagent prompt** by filling in the template below with specific values
3. **Calculate line ranges** from your Phase 1 analysis (TOC with line numbers)
4. **Create the complete prompt** - do NOT leave placeholders unfilled
5. **Launch subagents in parallel** for different topics
6. **Update progress.md** after all subagents complete
#### Subagent Prompt Template
**IMPORTANT: Copy this template and replace ALL bracketed placeholders with actual values before launching subagent.**
```markdown
## Task: Extract [TOPIC] Knowledge Base
You are extracting knowledge from a book section to create a complete topic reference.
### Prerequisites - Read These Files First:
1. `skills/skill-from-book/references/file-templates.md` - Templates for all file types
2. `skills/skill-from-book/references/extraction-patterns.md` - Extraction rules
### Source Material:
- **Book**: [BOOK_PATH]
- **Section**: [CHAPTER/SECTION_NAME]
- **Line range**: Read with offset=[START_LINE], limit=[LINE_COUNT]
### Output Directory: [OUTPUT_TOPIC_PATH]
### Files to Create (in this order):
#### 1. knowledge.md (REQUIRED)
Core concepts, definitions, and foundational understanding.
- Extract: definitions, terminology, key concepts, how things relate
- Use the "Knowledge File" template
#### 2. rules.md (REQUIRED)
Specific guidelines, do's and don'ts.
- Extract: explicit rules, guidelines, best practices, exceptions
- Use the "Rules File" template
#### 3. examples.md (REQUIRED)
Good/bad code examples, before/after comparisons.
- Extract: all code samples, refactoring examples, comparisons
- Use the "Examples File" template
#### 4. [OPTIONAL_FILES - list any additional files needed]
[e.g., patterns.md, smells.md, checklist.md - specify what each should contain]
### Your Instructions:
1. Read the two prerequisite files FIRST to understand templates and extraction rules
2. Read the book section ONCE using: offset=[START_LINE], limit=[LINE_COUNT]
3. From that single read, extract content for ALL files listed above
4. For each file:
- Transform content (prose → bullets, extract rules, include examples)
- Format using the appropriate template from file-templates.md
- Keep each file under 200 lines
- Write to [OUTPUT_TOPIC_PATH]/[filename].md
5. Create files in order: knowledge.md → rules.md → examples.md → optional files
### Content Guidance:
[SPECIFIC_GUIDANCE - what to focus on, what to skip]
### Language Conversion (if applicable):
- Source: [SOURCE_LANG or "N/A"]
- Target: [TARGET_LANG or "N/A"]
- Convert ALL code examples to target language
```
#### Example: Filled Subagent Prompt
```markdown
## Task: Extract Functions Knowledge Base
You are extracting knowledge from a book section to create a complete topic reference.
### Prerequisites - Read These Files First:
1. `skills/skill-from-book/references/file-templates.md` - Templates for all file types
2. `skills/skill-from-book/references/extraction-patterns.md` - Extraction rules
### Source Material:
- **Book**: /path/to/clean-code.md
- **Section**: Chapter 3 - Functions
- **Line range**: Read with offset=450, limit=380
### Output Directory: skills/clean-code/references/functions
### Files to Create (in this order):
#### 1. knowledge.md (REQUIRED)
Core concepts, definitions, and foundational understanding.
- Extract: what makes a function clean, key terminology (side effects, arguments, abstraction levels), how functions relate to other concepts
- Use the "Knowledge File" template
#### 2. rules.md (REQUIRED)
Specific guidelines, do's and don'ts.
- Extract: size rules, argument limits, naming conventions, single responsibility, do one thing principle
- Use the "Rules File" template
#### 3. examples.md (REQUIRED)
Good/bad code examples, before/after comparisons.
- Extract: all code samples showing good vs bad functions, refactoring walkthroughs
- Use the "Examples File" template
#### 4. checklist.md (OPTIONAL)
Quick reference for reviewing functions.
- Create a checklist from the ruleRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.