The book-to-skill tool is a Python-based utility designed to transform technical books, document folders, or structured prose into optimized "Agent Skills" compatible with the open Agent Skills standard. By converting source material into a structured directory—comprising a core SKILL.md file, chapter-specific Markdown files, a glossary, a patterns file, and a cheatsheet—the tool enables AI agents like GitHub Copilot CLI, Claude Code, and Amp to perform on-demand retrieval. This architecture prevents hallucination and significantly improves efficiency, achieving a 24× to 51× reduction in token usage compared to injecting a full book into the context window. The conversion process utilizes a deterministic Python extractor that selects tools based on content type: for example, it employs docling for technical documents containing code and tables, or pdftotext for prose-heavy files. The resulting skill files are stored in a cross-agent directory (typically ~/.agents/skills/) to ensure native discoverability across different LLM hosts. The tool supports various formats, including PDF, EPUB, DOCX, and HTML, by utilizing specialized parsers like ebooklib or python-docx. Crucially, the process is entirely local, ensuring that the source documents are never uploaded during the extraction and distillation phase.

Read original