# Where Are the Generated SKILL.md Files Stored in book-to-skill?

> Locate your generated SKILL.md files in the book-to-skill repository. Learn the default storage path and how to customize the skill directory with the --skill-dir argument.

- Repository: [Virgilio Junior/book-to-skill](https://github.com/virgiliojr94/book-to-skill)
- Tags: how-to-guide
- Published: 2026-08-29

---

**The book-to-skill pipeline creates a dedicated skill directory for each conversion, storing the master [`SKILL.md`](https://github.com/virgiliojr94/book-to-skill/blob/main/SKILL.md) file at `./<skill-name>/SKILL.md` by default, with the location fully customizable via the `--skill-dir` CLI argument.**

When converting technical books into AI-ready skill definitions using the `virgiliojr94/book-to-skill` repository, understanding exactly **where the generated SKILL.md files are stored** is critical for agent integration. The pipeline automatically constructs a structured output directory during Step 6 of the extraction process, placing the master skill definition alongside supporting chapter chunks and reference materials.

## Default Output Location

By default, the tool writes the **skill directory** alongside the repository root, using the sanitized book title as the folder name. According to the repository's root [`SKILL.md`](https://github.com/virgiliojr94/book-to-skill/blob/main/SKILL.md) specification, this occurs during **Step 6** of the pipeline—"Create skill directory structure."

The generated directory contains:

- [`SKILL.md`](https://github.com/virgiliojr94/book-to-skill/blob/main/SKILL.md) — The master skill definition consumed by AI agents
- `chunks/` — Individual chapter-level markdown files (`chunk-*.md`)
- `glossary/`, `patterns/`, `cheatsheet/` — Optional supporting artefacts referenced by the master file

For example, converting a PDF titled "MyAwesomeBook" produces:

```bash
./MyAwesomeBook/SKILL.md
./MyAwesomeBook/chunks/chunk-01.md
./MyAwesomeBook/glossary/...

```

## Customizing the Output Path

The default location can be overridden using the **`--skill-dir`** argument defined in [`book_to_skill/cli.py`](https://github.com/virgiliojr94/book-to-skill/blob/main/book_to_skill/cli.py). This parameter accepts a custom filesystem path, allowing you to organize generated skills outside the project root or into version-controlled directories.

```bash

# Override the default location with a custom directory

python -m book_to_skill.cli /path/to/book.pdf --skill-dir ./generated_skills/MyAwesomeBook

```

When specified, the pipeline creates the `<skill-name>` subdirectory within the provided path, maintaining the internal structure described above.

## Directory Structure Breakdown

### The Master SKILL.md File

Located at `/<skill-name>/SKILL.md`, this file serves as the primary interface for AI agents. It aggregates metadata, learning objectives, and references to chunked content stored in subdirectories.

### Chapter Chunks

The `chunks/` subdirectory contains individual markdown files (`chunk-*.md`) representing granular sections of the source book. AI agents can reference these directly for targeted retrieval or context window management.

### Supporting Artefacts

Depending on the book content, the pipeline may generate additional folders:

- `glossary/` — Term definitions and domain vocabulary
- `patterns/` — Reusable code patterns or architectural decisions
- `cheatsheet/` — Quick reference materials

## Programmatic Access

To load the generated skill into an AI agent or validation tool, reference the concrete file path using standard library functions. The [`tools/scan_generated_skill.py`](https://github.com/virgiliojr94/book-to-skill/blob/main/tools/scan_generated_skill.py) utility expects this directory layout when performing safety checks on generated outputs.

```python

# Loading the generated SKILL.md for an AI agent

from pathlib import Path

skill_path = Path("MyAwesomeBook/SKILL.md")
skill_content = skill_path.read_text(encoding="utf-8")

# Pass `skill_content` to your agent's prompt or loader

```

The [`tests/test_scan_generated_skill.py`](https://github.com/virgiliojr94/book-to-skill/blob/main/tests/test_scan_generated_skill.py) suite confirms that the pipeline correctly instantiates this directory structure during execution, ensuring reliable path resolution across environments.

## Summary

- Generated **SKILL.md** files reside in a dedicated skill directory named after the book title, created during Step 6 of the pipeline.
- The default output location is `./<skill-name>/` relative to the repository root, containing the master file plus `chunks/` and optional subfolders.
- Override the default path using the **`--skill-dir`** argument in [`book_to_skill/cli.py`](https://github.com/virgiliojr94/book-to-skill/blob/main/book_to_skill/cli.py).
- AI agents consume the master [`SKILL.md`](https://github.com/virgiliojr94/book-to-skill/blob/main/SKILL.md) file while optionally referencing granular content in the `chunks/` subdirectory.

## Frequently Asked Questions

### What is the default location for generated SKILL.md files?

By default, the pipeline places the skill directory at `./<skill-name>/` relative to the project root, where `<skill-name>` is derived from the book title. The master file sits at `/<skill-name>/SKILL.md`, with chapter chunks stored in `/<skill-name>/chunks/`.

### How do I change where SKILL.md files are saved?

Use the **`--skill-dir`** command-line argument when running `python -m book_to_skill.cli`. This parameter, defined in [`book_to_skill/cli.py`](https://github.com/virgiliojr94/book-to-skill/blob/main/book_to_skill/cli.py), accepts a custom filesystem path where the pipeline will create the skill directory structure.

### What other files are created besides SKILL.md?

The pipeline generates a complete skill package including: chapter-level markdown files in the `chunks/` folder; terminology definitions in `glossary/`; design patterns in `patterns/`; and quick-reference materials in `cheatsheet/`. These artefacts are referenced by the master SKILL.md file.

### How can AI agents access the generated skill files?

AI agents should target the master [`SKILL.md`](https://github.com/virgiliojr94/book-to-skill/blob/main/SKILL.md) file at `/<skill-name>/SKILL.md` for the complete skill definition. For fine-grained context, agents can directly load individual files from the `chunks/` subdirectory, as validated by [`tools/scan_generated_skill.py`](https://github.com/virgiliojr94/book-to-skill/blob/main/tools/scan_generated_skill.py).