aif-distillation

Distill books, documents, folders, and URLs into reusable Agent Skill packages.

31|2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/letuhao/lore-weave --skill aif-distillation-letuhao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aif-distillation
Source: https://github.com/letuhao/lore-weave/tree/main/.cursor/skills/aif-distillation
Command: npx skills add https://github.com/letuhao/lore-weave --skill aif-distillation-letuhao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Turning long books, documentation sets, or scattered source material into an operational AI skill is slow and error-prone: summaries lose the actionable rules, examples get dropped, and the result rarely tells an agent what to do or when. This Skill converts source material into a structured, invocation-ready skill package with a concise SKILL.md, dense references, and adapted examples. ## Core Features & Use Cases - Source-to-Skill Distillation: Accepts local files, folders, and URLs, then extracts transferable rules, workflows, checklists, pitfalls, and examples into a complete skill package under .cursor/skills or a custom --path output root. - Split-Skill Mode: Use --split or --split-by <strategy> (auto, goal, topic, workflow, audience) to generate multiple focused child skills sharing one namespace prefix, each with a distinct activation trigger. - Large Material Handling: A bundled material-prep.py script extracts and chunks PDFs, folders, and URLs into a manifest and source index, with safeguards that skip hidden and credential-like files. - Update & Redaction Modes: --update merges new material into an existing skill without duplicating files, and --redact-source-map omits source titles, URLs, and paths from generated output. - Use Case: Point it at a programming book PDF with --name code-quality --split to produce a toolkit of focused review and refactoring skills, each with its own references and before/after code examples. ## Quick Start Ask the agent to distill a book or docs folder into a skill, for example: run aif-distillation on ./books/domain-driven-design.pdf with the name ddd-practices.

Frequently Asked Questions about aif-distillation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a book or PDF into an AI agent skill?

Pass the file path to the distillation skill, optionally with --name for the target skill name. It extracts rules, workflows, and examples, then writes a SKILL.md plus references and examples under .cursor/skills or a custom --path directory.

How do I split one large source into multiple focused skills?

Use the --split flag or --split-by with a strategy such as goal, topic, workflow, or audience. Each generated child skill gets a shared namespace prefix, its own trigger description, and independent references and examples.

Does the material-prep script require Python to process PDFs?

The helper script requires a working Python 3 interpreter, detected via python3, python, or py version probes. Without Python 3, the skill falls back to direct file reads and asks for text exports of PDFs.

Can I update an existing skill instead of creating a new one?

Yes, pass --update with the target skill name. The workflow reads existing references and examples, builds a gap list from the new material, patches matching files in place, and only adds files for genuinely new topics.

How do I hide source titles and URLs from generated skills?

Use the --redact-source-map flag. It skips creating SOURCE-MAP.md, omits source-map sections, and keeps exact titles, URLs, and local paths out of all generated files while still producing full distilled content.

What skill names are allowed when generating output?

Names must match the pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$, rejecting dots, path separators, absolute paths, and hidden names. Reserved aif-* names are blocked unless you are explicitly developing AI Factory itself.