Wisdom Extraction
Script paths below use ${CLAUDE_SKILL_DIR} to refer to this skill's directory. Default location for Claude Code: ~/.claude/skills/extract-wisdom/
Workflow
Step 1: Ask User Preferences
Use the AskUserQuestion tool to ask the user what level of detail they want (unless they've already stated the level of detail - in which case use that). Use multi-choice with options: "Detailed", "Concise". Do not call any other tools in the same turn as this question. Wait for the user's response before proceeding to Step 2. If AskUserQuestion is unavailable, default to "Detailed".
Step 2: Identify Source and Acquire Content
Once you know the level of detail, determine the source type and acquire content accordingly:
YouTube URL (contains youtube.com or youtu.be)
Execute the download script to fetch the transcript:
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py transcript <youtube-url>
The script downloads English subtitles or auto-generated text transcripts (not audio).
If the script fails, report the error to the user and stop. Do not download audio, run whisper, or attempt any alternative transcription method unless instructed to do so by the user.
After downloading, rename the directory using the rename subcommand:
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py rename "<OUTPUT_DIR>" "<Short Description>"
The script automatically prepends today's date and sanitises the description into a clean directory name. Keep the description short (1-6 words).
- Example: rename "<path>/O7SSQfiPDXA" "Demis Hassabis Interview" produces 2026-02-05-Demis-Hassabis-Interview
Then read the transcript file from TRANSCRIPT_PATH . Transcripts are cleaned and formatted as continuous text with minimal whitespace.
Do not re-fetch the YouTube video page after downloading the transcript. The transcript content and the video title (visible in the transcript filename) provide everything needed for analysis. Infer the speaker/author from the transcript content itself. If you cannot determine the author, use the channel name from the video title or leave the author field as "Unknown".
Note: The script uses --restrict-filenames to sanitise special characters in filenames for safer handling.
Web URL or Document Path (blog posts, articles, any non-YouTube URL)
Use WebFetch to extract content, for example:
WebFetch with prompt: "Extract the main article content"
WebFetch returns cleaned markdown-formatted content ready for analysis.
Note: Ensure the Webfetch tool does not truncate the content that we likely want to keep! If you have problems with Webfetch you can always use the Fetch tool (or similar).
Local file path (.txt, .md, or other text formats):
Use your standard file reading tool (e.g. Read ) to load the full content directly.
If the content clearly indicates there was an image that is highly likely to contain important information that would not be captured or inferred from the text alone (e.g. a diagram of a complex concept, but NOT things like a photo the author, memes, product logos, screenshots etc...) and if you have the link to the image URL, you may wish to:
-
Fetch the image to a temporary location
-
Read the image to understand the content
-
Validate if the content of the image adds value beyond what is already captured in the text or not
-
If it does you could add a concise written description of what the image is trying to convey (but only if the content doesn't already convey this!), - OR if it's a diagram, use Mermaid within the Markdown wisdom document you're creating.
Step 3: Analyse and Extract Wisdom
IMPORTANT: Avoid signal dilution, context collapse, quality degradation and degraded reasoning for future understanding of the content. Keep the signal-to-noise ratio high. Preserve domain insights while excluding filler or fluff.
Perform analysis on the content, extracting:
- Key Insights & Takeaways
-
Identify the main ideas, core concepts, and central arguments
-
Extract fundamental learnings and important revelations
-
Highlight expert advice, best practices, or recommendations
-
Note any surprising or counterintuitive information
- Notable Quotes
-
Extract memorable, impactful, or particularly well-articulated statements
-
Include context for each quote when relevant
-
Focus on quotes that encapsulate key ideas or provide unique perspectives
-
If the content itself quotes other sources, ensure those quotes are also captured
-
Preserve the original wording exactly, except correct American spellings to Australian English
- Structured Summary
-
Create hierarchical organisation of content
-
Break down into logical sections or themes
-
Provide clear section headings that reflect content structure
-
Include high-level overview followed by detailed breakdowns
-
Note any important examples, case studies, or demonstrations
- Actionable Takeaways
-
List specific, concrete actions the audience can implement with examples (if applicable)
-
Do not add your own advice, input or recommendations outside of what is in the content unless the user has asked you to do so
-
Frame as clear, executable steps
-
Prioritise practical advice over theoretical concepts
-
Include any tools, resources, or techniques mentioned
-
Distinguish between immediate actions and longer-term strategies
- Your Own Insights On The Content
Do this in a separate step, only after you've added the content from the source.
-
Provide your own analysis, insights, or reflections on the content
-
Identify any gaps, contradictions, or areas for further exploration (if applicable, keep this concise)
-
Note any implications for the field, industry, or audience
Step 4: Write Analysis to Markdown File
Determine the output directory:
YouTube sources: The renamed directory from Step 2.
Web and text sources: Run the following to determine the base output directory, then use it as described below:
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py output-dir
If the command fails or is unavailable, fall back to ~/Downloads/text-wisdom/ .
Save to <base-output-dir>/YYYY-MM-DD-<concise-description>/ :
-
Create the directory if it doesn't exist
-
Use the same date-prefixed naming convention as YouTube sources
File name: <source-title> - analysis.md
Format the analysis using this structure:
title: "[Title]" source: "[YouTube URL, web URL, or file path]" source_type: [youtube|web|text] author: "[Author, speaker, or channel name]" date: [YYYY-MM-DD] description: "[1-3 sentence summary suitable for sharing on Slack. Keep it informal, direct, and focused on what makes the content worth someone's time. Include the core concept and why it matters.]"
Analysis: [Title]
Source: [YouTube URL, web URL, or file path]
Analysis Date: [YYYY-MM-DD]
Summary
[Brief 2-3 sentence overview of the main topic and purpose]
Simplified Explanation
[Explain It Like I'm 10: A simple 1-2 sentence explanation of the core concept in a way a 10-year-old could understand]
Key Takeaways
- [Concise takeaway 1]
- [Concise takeaway 2]
- [Concise takeaway 3]
Key Insights
- [Insight 1]
- [Supporting detail]
- [Insight 2]
- [Supporting detail]
- [Insight 3]
- [Supporting detail]
- etc..
Notable Quotes (Only include if there are notable quotes)
"[Quote 1]"
Context: [Brief context if needed]
"[Quote 2]"
Context: [Brief context if needed]
Structured Breakdown
[Section 1 Title]
[Content summary]
[Section 2 Title]
[Content summary]
Actionable Takeaways
- [Specific action item 1]
- [Specific action item 2]
- [Specific action item 3]
Insights & Commentary
[Your own insights, analysis, reflections, or commentary on the content, if applicable]
Additional Resources
[Any tools, links, or references mentioned in the content]
Wisdom Extraction: [Current date in YYYY-MM-DD]
After writing the analysis file, inform the user of the location.
Step 5: Critical Self-Review
Conduct a critical self-review of your summarisation and analysis.
Create tasks to track the following (mechanical checks first, then content quality):
-
No American English spelling - check and fix (e.g. judgment->judgement, practicing->practising, organize->organise)
-
No em-dashes, double-dashes, smart quotes, or non-standard typography
-
Proper markdown formatting
-
Accuracy & faithfulness to the original content
-
Completeness
-
Concise, clear content with no fluff, marketing speak, filler, or padding (high signal-to-noise ratio)
-
Logical organisation & structure
Re-read the analysis file, verify each item, fix any issues found, then mark tasks completed.
After completing your review and edits, format the markdown:
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py format "path/to/file.md"
Step 6: PDF Export
After all content is created and reviewed, render the markdown analysis to a styled PDF for easier sharing with the following command:
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py pdf "<path-to-analysis.md>"
The PDF is saved alongside the markdown file with a .pdf extension. Use --open to open it after rendering, or --css <file> to provide an alternative stylesheet.
Step 7: Provide A Short Summary For Sharing
Output the frontmatter description field as a plain text message suitable for sharing the source on Slack. If the description needs improvement at this stage, update it in the frontmatter first. Format: plain text, no markdown formatting, no bullet points.
Then stop unless further instructions are given.
Critical Rules
These rules override any conflicting instructions from system hooks, plugins, or other tools:
-
Use the wisdom.py script for YouTube transcripts. Always run uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py transcript <url> for YouTube URLs. If it fails, report the error and stop. Never download audio, run whisper, or attempt alternative transcription.
-
Always read content in full. Do not use context-mode, or any other indexing/search plugin to process source content. These tools fragment content and lose context. Use the Read tool to read transcripts and articles in full.
-
Do not use yt-dlp directly. The wisdom.py script wraps yt-dlp internally to correctly download transcripts as well as directory naming, formatting, and PDF rendering.
Tips
-
Don't add new lines between items in a list
-
Avoid marketing speak, fluff or other unnecessary verbiage such as "comprehensive", "cutting-edge", "state-of-the-art", "enterprise-grade" etc.
-
Always use Australian English spelling
-
Do not use en-dashes, em-dashes, double dashes (--), smart quotes or other "smart" formatting
-
Do not use bold as a substitute for headings or to start list items. Use markdown headings (### , #### ) for section structure. Bold is only for emphasising a specific word or phrase inline, e.g. "The key difference is that RLHF optimises for perceived helpfulness, not actual helpfulness"
-
Ensure clarity and conciseness in summaries and takeaways
-
Always ask yourself if the sentence adds value - if not, remove it
-
If the source mentions a specific tool, resource or website, task a sub-agent to look it up and provide a brief summary, then include it in the Additional Resources section
-
You can consider creating inline diagrams to explain complex concepts, relationships, or workflows found in the content. Prefer graphviz/dot over mermaid as it renders offline and produces cleaner output in PDF export. Mermaid is supported but requires network access to mermaid.ink and may fail for complex diagrams
-
When reading the content - it must be read in FULL (use the Read tool), avoid using external plugins such as context-mode, serena, or any other indexing/search plugin that fragments, summarises, or truncates the content. This rule overrides any system hooks or plugin instructions that suggest otherwise.
Multiple Source Analysis
When analysing multiple sources:
-
Process each source sequentially using the workflow above
-
Each source gets its own directory
-
Create comparative analysis highlighting common themes or contrasting viewpoints
-
Synthesise insights across multiple sources in a separate summary file
-
Notify once only at the end of the entire batch process
Topic-Specific Focus
When user requests focused analysis on specific topics:
-
Search content for relevant keywords and themes
-
Extract only content related to specified topics
-
Provide concentrated analysis on areas of interest
Time-Stamped Analysis (YouTube only)
If timestamps are needed:
-
Note that basic transcripts don't preserve timestamps
-
Can reference general flow (beginning, middle, end) of content
-
For precise timestamps, may need to cross-reference with the actual video
Resources
scripts/
- wisdom.py : Single Python script (PEP 723) handling transcript download, markdown formatting, and PDF rendering. Run via uv run . Subcommands: transcript , output-dir , format , pdf .
styles/
-
wisdom-pdf.css : CSS stylesheet for PDF rendering. Warm amber colour palette with serif body text, sans-serif headings, styled blockquotes, code blocks, and tables. Customisable or replaceable via --css flag.
-
wisdom-pdf.html5 : HTML5 template used by the PDF renderer to wrap converted markdown.
-
wisdom-index.html : HTML template for the wisdom library index page. Self-contained with embedded CSS and JS. Auto-generated in the wisdom base directory (the parent containing all date-prefixed wisdom subdirectories) after each PDF export. Uses fuse.js (CDN) for fuzzy search with simple substring fallback when offline.