Distills course materials into source-grounded AI agent skills. Use when the user wants to convert videos, audio, PDFs, slides, transcripts, OCR output, notes, or existing course distillation files into a CoursePackage and generated mentor, expert, consultant, practitioner, or custom Skill.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
The command stays on one line. Scroll horizontally to inspect it before copying.
Prefer a local copy? Download the files currently available to SkillsMP.
File Explorer
25 files
Showing SKILL.md
SKILL.md
Source instructions · Read-only preview
name
lineage-skill
description
Distills course materials into source-grounded AI agent skills. Use when the user wants to convert videos, audio, PDFs, slides, transcripts, OCR output, notes, or existing course distillation files into a CoursePackage and generated mentor, expert, consultant, practitioner, or custom Skill.
Lineage Skill
Turn course materials into reusable, source-grounded AI Skills.
Core method: Capture -> Cite -> Compress -> Connect -> Codify -> Evaluate.
Use this as an evidence-first workflow: preserve source material before summarizing, cite sources before synthesizing, and mark unsupported gaps.
Distill a course, lecture series, workshop, training program, curriculum, or long-form class.
Convert videos, audio, PDFs, slides, screenshots, notes, transcripts, OCR output, or course summaries into structured course knowledge.
Generate or update a course-backed Skill.
Build a course mentor, expert, consultant, practitioner, or custom course-backed Skill.
Package existing transcripts/, analysis/, documents/, lesson_summaries.json, course_distillation_*.md/json, or course_package.json.
Capabilities
This Skill owns the course-distillation pipeline. Do not describe transcription, visual analysis, screenshot extraction, OCR collection, distillation, packaging, or generated-Skill creation as work the user must perform manually when suitable source files and configured providers are available.
Supported capabilities:
Extract audio from .mp4 course videos and transcribe it through an OpenAI-compatible endpoint.
Split long audio into segments before transcription.
Analyze video content through a vision-capable model, including PPT, board writing, software screens, diagrams, tables, demonstrations, and other visual teaching material.
Compress and chunk large videos before visual analysis.
Parse vision-model [SCREENSHOT MM:SS] markers, extract key frames from the original video, and de-duplicate similar screenshots.
Collect MinerU/OCR Markdown outputs from PDFs or document directories.
Distill transcripts, visual analyses, screenshots, OCR documents, and user notes into structured course notes.
Build course_package.json, evidence_map.json, and lesson_index.json.
Merge multiple course_package.json files into one combined multi-course workspace.
Generate source-grounded course Skills in the requested role.
Record durable pipeline progress in lineage_progress.json.
Build a multi-course workspace catalog with scripts/build_course_catalog.py.
Provider Requirements
Capability is separate from configuration. If a provider is missing, report the missing configuration and the smallest viable fallback; do not imply the Skill lacks the capability.
Audio transcription requires AUDIO_TRANSCRIBE_API_KEY, AUDIO_TRANSCRIBE_BASE_URL, and AUDIO_TRANSCRIBE_MODEL.
Chinese courses can use SenseVoiceSmall/FunASR-compatible transcription services.
English or multilingual courses can use Whisper-compatible or OpenAI transcription models when the endpoint supports them.
Vision analysis requires LINEAGE_VISION_API_KEY, LINEAGE_VISION_BASE_URL, and LINEAGE_VISION_MODEL.
Prefer strong video/vision models for long videos, slides, boards, screenshots, diagrams, and software screens.
Gemini-class video models are appropriate when exposed through a compatible endpoint or adapter.
Text distillation requires LINEAGE_TEXT_API_KEY, LINEAGE_TEXT_BASE_URL, and LINEAGE_TEXT_MODEL when DISTILL_USE_LLM=1.
Prefer long-context models with stable structured output and good support for the course language.
Local media handling requires installed ffmpeg and ffprobe.
When configuration is absent:
If transcripts, OCR, notes, or previous distillation files already exist, skip the missing capture stage and continue with the smallest viable workflow.
If raw audio or videos need transcription and ASR is missing, stop before transcription and tell the user exactly which variables or tools are missing.
If raw videos need visual analysis and vision configuration is missing, stop before visual analysis or skip it only when the user accepts transcript-only processing.
If PDFs are present but MinerU is not configured, continue with non-PDF sources and explain that scanned/image PDF evidence was not included unless existing OCR output is available.
Standalone audio files are transcribed by the capture stage, but they do not produce visual analysis or screenshots.
Decision Flow
Identify source state:
Videos/audio only: run the full pipeline.
Videos plus PDFs: run the full pipeline with document OCR if configured.
Existing transcripts/OCR/notes: skip capture; build package and Skill.
Existing CoursePackage: skip distillation; build or update Skill.
Choose role:
Default: mentor.
Use expert when the user specifically wants narrow course Q&A, concept explanation, or lesson lookup.
Use consultant when the user wants private consulting, diagnosis, or advice based on the course methods.
Use practitioner when the user wants checklists, playbooks, templates, workflows, or concrete work outputs.
Use custom when the user describes a specific role or workflow that does not fit the defaults.
Treat single-course, multi-course, and fused/domain packages as scope metadata, not role names.
Treat strict citation as an evidence strategy, not a role name.
Treat learning progress and daily study planning as a progress strategy, usually attached to mentor, not a separate role.
Preserve evidence before summarizing.
Before rerunning expensive stages, check existing outputs and resume from the smallest viable stage.
Generate outputs.
Verify expected files exist and report paths.
Workflows
Default paths:
Use .lineage/courses/<course-name>/ for course build state unless the user provides --base-dir or a target directory.
Use dist/<skill-name>/ for generated Skills unless the user provides --output-dir.
Keep one source course per course workspace.
If the user does not provide --skill-name, use the builder default:
<course-slug>-mentor-lineage for mentor.
<course-slug>-expert-lineage for expert.
<course-slug>-consultant-lineage for consultant.
<course-slug>-practitioner-lineage for practitioner.
<course-slug>-custom-lineage for custom.
Full Course Pipeline
Use when raw course videos and/or audio files need transcription, visual analysis where video exists, distillation, packaging, and Skill generation.