.claude/skills/extract-rulebook/SKILL.md
# Rulebook Extraction — Shadow Master Reference Extract an entire Shadowrun sourcebook (or specific sections) into structured reference material for feature implementation, validation, and testing. ## Inputs - **PDF**: Path to PDF in `docs/pdfs/` (e.g. `docs/pdfs/sr5-run-faster.pdf`) - **Sections** (optional): Specific section names to extract. If omitted, extract all mechanical sections. - **Resume** (optional): If a manifest already exists, resume from where extraction left off. ## Phase 1
npx skillsauth add Jasrags/ShadowMaster .claude/skills/extract-rulebookInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Extract an entire Shadowrun sourcebook (or specific sections) into structured reference material for feature implementation, validation, and testing.
docs/pdfs/ (e.g. docs/pdfs/sr5-run-faster.pdf)sr5-run-faster.pdf → sr5-run-faster).docs/references/{book-slug}/manifest.json already exists. If so, skip to Phase 3 (resume).pdf_page_offset in the manifest.TOC located — PDF pages {X}–{Y}, offset: {N}Create docs/references/{book-slug}/manifest.json:
{
"book": "{Book Title}",
"pdf": "docs/pdfs/{book-slug}.pdf",
"total_pages": 0,
"pdf_page_offset": 0,
"sections": [
{
"slug": "section-slug",
"title": "Section Title",
"pages": "start-end",
"pdf_pages": "start-end",
"priority": "high|medium|low|skip",
"reason": "Why this priority",
"page_count": 0,
"split_into": [],
"status": "pending|done|skipped"
}
],
"summary": {
"total_sections": 0,
"skip": 0,
"pending": 0,
"done": 0
}
}
Sections are processed one at a time. Split large sections to keep each extraction unit manageable:
Record splits in the manifest's split_into array. Each split gets its own slug
(e.g. street-gear-weapons-armor, street-gear-electronics-cyber).
After building the manifest, present a summary table to the user:
| Priority | Sections | Pages | Status |
|----------|----------|-------|--------|
| high | 7 | 280 | pending |
| medium | 2 | 84 | pending |
| skip | 11 | 138 | skipped |
Wait for user confirmation before proceeding to Phase 3.
Process sections one at a time, in priority order (high → medium → low).
For each section (or split chunk):
Extracting: "{Title}" — PDF pages {X}–{Y}status: "done" for the completed section.Done: {N}/{total} sections completeWhen launching an agent for extraction, include these instructions:
> **Ambiguity:** blocks — never silently resolve unclear rules> **Cross-reference:** blocksdocs/references/{book-slug}/{section-slug}.md# {Section Title}
**Source:** {Book Title}, p.{book-start}–{book-end}
**PDF Pages:** {pdf-start}–{pdf-end}
---
## Overview
One paragraph summary of what this section covers and why it matters.
---
## Rules
### {Rule Name}
Clear, implementation-focused distillation of the rule.
> **Ambiguity:** [Flag any unclear or contradictory language]
> **Cross-reference:** [Dependencies on other sections or sourcebooks]
---
## Tables
> Tabular data is extracted to the companion JSON file.
> Reference: `{section-slug}.json`
List each table by name and a one-line description.
---
## Validation Checklist
- [ ] {Specific testable assertion}
---
## Implementation Notes
Developer guidance, data structures, edge cases, ordering dependencies.
docs/references/{book-slug}/{section-slug}.json{
"tables": {
"table-slug": {
"source": "{Book Title}, p.{page}",
"description": "What this table governs",
"columns": ["column1", "column2"],
"rows": [{ "column1": "value", "column2": "value" }]
}
}
}
After all sections are extracted, log a final summary:
Extraction complete: {book-slug}
- Sections extracted: {N}
- Sections skipped: {N}
- Total reference files: {N} md + {N} json
- Output: docs/references/{book-slug}/
docs/pdfs/. Book slug = PDF filename without extension.docs/references/{book-slug}/ with kebab-case section slugs.> **Ambiguity:** inline. Never silently resolve unclear rules.# Extract entire book
/extract-rulebook
PDF: docs/pdfs/sr5-run-faster.pdf
# Extract specific sections
/extract-rulebook
PDF: docs/pdfs/sr5-core-rulebook.pdf
Sections: Combat, Magic
# Resume interrupted extraction
/extract-rulebook
PDF: docs/pdfs/sr5-run-faster.pdf
Resume: true
testing
# Verify Reference Data Run the hybrid verification pipeline to compare extracted reference material against edition data files. ## Usage ``` /verify-reference # Run all mapping configs /verify-reference street-gear-weapons-armor # Run specific mapping by name /verify-reference --fix # Run and attempt semantic fixes ``` ## Phase 1 — Structural Verification (Script) Run `pnpm verify-reference` to execute structural checks: ```bash # All mappings p
testing
Test infrastructure reference for Shadow Master. Use when writing tests, finding existing test files, or running test suites. Covers Vitest unit tests, Playwright E2E tests, and testing patterns.
development
# Ship Current Work 1. Run `npm run typecheck` and fix any TypeScript errors 2. Run `npm test` and fix any test failures 3. Run `git status` to review changes 4. Create a descriptive commit with conventional commit format (feat:, fix:, etc.) 5. Push to the current feature branch 6. Create a PR using `gh pr create` with a descriptive title and body referencing the GitHub issue 7. Report the PR URL Never commit to main. If on main, ask the user for a branch name first.
content-media
Redesigns character sheet display components to match the character creation card aesthetic. Use when updating any component in /components/character/sheet/ to use grouped sections, value pills, and the established dark-mode-first color system.