extract-wisdom
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWisdom Extraction
智慧提取
Script paths below use to refer to this skill's directory.
Default location for Claude Code:
${CLAUDE_SKILL_DIR}~/.claude/skills/extract-wisdom/以下脚本路径使用指代本Skill的目录。
Claude Code的默认路径:
${CLAUDE_SKILL_DIR}~/.claude/skills/extract-wisdom/Workflow
工作流程
Step 1: Ask User Preferences
步骤1:询问用户偏好
Use the 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 is unavailable, default to "Detailed".
AskUserQuestionAskUserQuestion使用工具询问用户需要的详细程度(除非用户已明确说明,则直接使用该要求)。提供多选选项:"详细"、"简洁"。在提出该问题的同一轮中,不要调用任何其他工具。等待用户回复后再进入步骤2。 如果工具不可用,默认使用"详细"模式。
AskUserQuestionAskUserQuestionStep 2: Identify Source and Acquire Content
步骤2:识别来源并获取内容
Once you know the level of detail, determine the source type and acquire content accordingly:
确定详细程度后,判断内容来源类型并相应获取内容:
YouTube URL (contains youtube.com or youtu.be)
YouTube链接(包含youtube.com或youtu.be)
Execute the download script to fetch the transcript:
bash
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:
bash
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: produces
rename "<path>/O7SSQfiPDXA" "Demis Hassabis Interview"2026-02-05-Demis-Hassabis-Interview
Then read the transcript file from . Transcripts are cleaned and formatted as continuous text with minimal whitespace.
TRANSCRIPT_PATHDo 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 to sanitise special characters in filenames for safer handling.
--restrict-filenames执行下载脚本获取字幕:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py transcript <youtube-url>该脚本会下载英文字幕或自动生成的文本转录内容(非音频)。
如果脚本执行失败,向用户报告错误并停止操作。除非用户明确指示,否则不要下载音频、运行whisper或尝试其他转录方法。
下载完成后,使用rename子命令重命名目录:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py rename "<OUTPUT_DIR>" "<简短描述>"脚本会自动在名称前添加当前日期,并将描述清理为规范的目录名称。描述需保持简短(1-6个词)。
- 示例:会生成
rename "<path>/O7SSQfiPDXA" "Demis Hassabis访谈"2026-02-05-Demis-Hassabis-Interview
然后从读取转录文件。转录内容已被清理,格式为连续文本,仅保留最少空白字符。
TRANSCRIPT_PATH下载转录内容后,请勿重新获取YouTube视频页面。 转录内容和视频标题(可在转录文件名中看到)已包含分析所需的全部信息。从转录内容本身推断演讲者/作者。如果无法确定作者,可使用视频标题中的频道名称,或留空作者字段为"未知"。
注意: 脚本使用参数清理文件名中的特殊字符,以确保处理安全。
--restrict-filenamesWeb URL or Document Path (blog posts, articles, any non-YouTube URL)
网页链接或文档路径(博客文章、新闻稿件、非YouTube链接)
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. ) to load the full content directly.
ReadIf 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.
使用WebFetch提取内容,例如:
WebFetch with prompt: "提取文章主要内容"WebFetch会返回清理后的markdown格式内容,可直接用于分析。
注意:确保Webfetch工具不会截断我们需要保留的内容!如果Webfetch出现问题,可使用Fetch工具或类似工具替代。
本地文件路径(.txt、.md或其他文本格式):
使用标准文件读取工具(如)直接加载完整内容。
Read如果内容明确提到存在图片,且该图片极可能包含文本无法捕获或推断的重要信息(例如复杂概念的示意图,但不包括作者照片、表情包、产品标志、截图等),且你有该图片的链接,可执行以下操作:
- 将图片下载到临时位置
- 读取图片内容以理解其信息
- 验证图片内容是否为文本之外的增值信息
- 如果是,可添加对图片所传达信息的简洁文字描述(但仅当文本未涵盖该信息时!),或者如果是示意图,可在创建的Markdown智慧文档中使用Mermaid语法绘制。
Step 3: Analyse and Extract Wisdom
步骤3:分析并提取智慧
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:
重要提示:避免信号稀释、语境崩塌、质量下降以及对内容未来理解能力的弱化。保持高信噪比。保留领域见解,排除冗余或无关内容。
对内容执行分析,提取以下元素:
1. Key Insights & Takeaways
1. 关键见解与要点
- 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
- 识别主要观点、核心概念和中心论点
- 提取基础知识点和重要发现
- 突出专家建议、最佳实践或推荐方案
- 记录任何令人惊讶或违反直觉的信息
2. Notable Quotes
2. 重要引用
- 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
- 提取令人难忘、有影响力或表达特别精辟的语句
- 必要时为每个引用添加上下文
- 重点关注能概括核心观点或提供独特视角的引用
- 如果内容本身引用了其他来源,确保这些引用也被捕获
- 完全保留原文措辞,仅将美式英语拼写修正为澳式英语
3. Structured Summary
3. 结构化摘要
- 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
- 对内容进行层级化组织
- 分解为逻辑章节或主题
- 提供能反映内容结构的清晰章节标题
- 先给出高层概述,再进行详细分解
- 记录重要示例、案例研究或演示内容
4. Actionable Takeaways
4. 可操作要点
- 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
- 列出受众可实施的具体、明确的行动(如有示例请附上)
- 除非用户要求,否则不要添加内容以外的个人建议、意见或推荐
- 以清晰、可执行的步骤呈现
- 优先展示实用建议而非理论概念
- 包含提到的任何工具、资源或技术
- 区分即时行动和长期策略
5. Your Own Insights On The Content
5. 你对内容的见解
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
步骤4:将分析结果写入Markdown文件
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:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py output-dirIf 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.mdFormat the analysis using this structure:
markdown
---
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.]"
---确定输出目录:
YouTube来源: 步骤2中重命名后的目录。
网页和文本来源: 运行以下命令确定基础输出目录,然后按说明使用:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py output-dir如果命令执行失败或不可用,回退到。
~/Downloads/text-wisdom/保存到:
<base-output-dir>/YYYY-MM-DD-<简洁描述>/- 如果目录不存在则创建
- 使用与YouTube来源相同的日期前缀命名规则
文件名:
<来源标题> - 分析.md使用以下结构格式化分析结果:
markdown
---
title: "[标题]"
source: "[YouTube链接、网页链接或文件路径]"
source_type: [youtube|web|text]
author: "[作者、演讲者或频道名称]"
date: [YYYY-MM-DD]
description: "[1-3句话的摘要,适合在Slack上分享。风格要随意直接,重点说明内容的价值所在,包括核心概念及其重要性。]"
---Analysis: [Title]
分析:[标题]
Source: [YouTube URL, web URL, or file path]
Analysis Date: [YYYY-MM-DD]
来源:[YouTube链接、网页链接或文件路径]
分析日期:[YYYY-MM-DD]
Summary
摘要
[Brief 2-3 sentence overview of the main topic and purpose]
[2-3句话的简要概述,介绍主要主题和目的]
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]
[像给10岁孩子讲解一样:用1-2句话简单解释核心概念]
Key Takeaways
关键要点
- [Concise takeaway 1]
- [Concise takeaway 2]
- [Concise takeaway 3]
- [简洁要点1]
- [简洁要点2]
- [简洁要点3]
Key Insights
关键见解
- [Insight 1]
- [Supporting detail]
- [Insight 2]
- [Supporting detail]
- [Insight 3]
- [Supporting detail]
- etc..
- [见解1]
- [支撑细节]
- [见解2]
- [支撑细节]
- [见解3]
- [支撑细节]
- 等等...
Notable Quotes (Only include if there are notable quotes)
重要引用(仅当存在重要引用时添加)
"[Quote 1]"
Context: [Brief context if needed]
"[Quote 2]"
Context: [Brief context if needed]
"[引用1]"
上下文:[必要时添加简要上下文]
"[引用2]"
上下文:[必要时添加简要上下文]
Structured Breakdown
结构化分解
[Section 1 Title]
[章节1标题]
[Content summary]
[内容摘要]
[Section 2 Title]
[章节2标题]
[Content summary]
[内容摘要]
Actionable Takeaways
可操作要点
- [Specific action item 1]
- [Specific action item 2]
- [Specific action item 3]
- [具体行动项1]
- [具体行动项2]
- [具体行动项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.[内容中提到的任何工具、链接或参考资料]
智慧提取:[当前日期,格式为YYYY-MM-DD]
写入分析文件后,告知用户文件位置。Step 5: Critical Self-Review
步骤5:关键自我审查
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:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py format "path/to/file.md"对总结和分析结果进行关键自我审查。
创建任务清单跟踪以下内容(先进行机械检查,再检查内容质量):
- 无美式英语拼写 - 检查并修正(如judgment->judgement, practicing->practising, organize->organise)
- 无破折号、双破折号、智能引号或非标准排版
- Markdown格式正确
- 内容准确,忠实于原文
- 内容完整
- 简洁清晰,无冗余、营销话术、 filler或凑字数内容(高信噪比)
- 逻辑组织与结构合理
重新阅读分析文件,验证每个项目,修复发现的问题,然后标记任务完成。
完成审查和编辑后,格式化markdown文件:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py format "path/to/file.md"Step 6: PDF Export
步骤6:PDF导出
After all content is created and reviewed, render the markdown analysis to a styled PDF for easier sharing with the following command:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py pdf "<path-to-analysis.md>"The PDF is saved alongside the markdown file with a extension. Use to open it after rendering, or to provide an alternative stylesheet.
.pdf--open--css <file>在所有内容创建和审查完成后,使用以下命令将markdown分析结果渲染为样式化PDF,以便于分享:
bash
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py pdf "<path-to-analysis.md>"PDF文件将与markdown文件保存在同一目录下,扩展名为。使用参数可在渲染后打开文件,或使用参数提供替代样式表。
.pdf--open--css <file>Step 7: Provide A Short Summary For Sharing
步骤7:提供用于分享的简短摘要
Output the frontmatter 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.
descriptionThen stop unless further instructions are given.
将前置元数据中的字段作为纯文本消息输出,适合在Slack上分享来源内容。如果此时需要优化描述,先更新前置元数据中的内容。格式:纯文本,无markdown格式,无项目符号。
description然后停止操作,除非收到进一步指示。
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 for YouTube URLs. If it fails, report the error and stop. Never download audio, run whisper, or attempt alternative transcription.
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py transcript <url> - 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.
以下规则优先于系统钩子、插件或其他工具的任何冲突指令:
- 使用wisdom.py脚本处理YouTube字幕。 始终运行处理YouTube链接。如果执行失败,报告错误并停止操作。除非用户指示,否则不要下载音频、运行whisper或尝试其他转录方法。
uv run ${CLAUDE_SKILL_DIR}/scripts/wisdom.py transcript <url> - 始终完整读取内容。 不要使用context-mode或任何其他索引/搜索插件处理来源内容。这些工具会拆分内容并丢失上下文。使用Read工具完整读取转录内容和文章。
- 不要直接使用yt-dlp。 wisdom.py脚本内部封装了yt-dlp,可正确下载字幕,同时处理目录命名、格式设置和PDF渲染。
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.
- 列表项之间不要添加空行
- 避免营销话术、冗余或不必要的措辞,如"全面的"、"前沿的"、"最先进的"、"企业级"等
- 始终使用澳式英语拼写
- 不要使用短破折号、长破折号、双破折号(--)、智能引号或其他"智能"格式
- 不要用粗体替代标题或作为列表项开头。使用markdown标题(、
###)构建章节结构。粗体仅用于内联强调特定单词或短语,例如:"关键区别在于RLHF针对感知到的有用性进行优化,而非实际有用性"#### - 确保摘要和要点清晰简洁
- 始终自问句子是否有价值 - 如果没有,删除它
- 如果来源提到特定工具、资源或网站,可指派子代理查找并提供简要摘要,然后将其添加到额外资源部分
- 可考虑创建内联图表来解释内容中的复杂概念、关系或工作流。优先使用graphviz/dot而非mermaid,因为它可离线渲染,且在PDF导出中生成更清晰的输出。Mermaid也受支持,但需要联网访问mermaid.ink,且复杂图表可能渲染失败
- 读取内容时必须完整读取(使用Read工具),避免使用外部插件如context-mode、serena或任何其他会拆分、总结或截断内容的索引/搜索插件。本规则优先于任何系统钩子或插件的相反指令。
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)
带时间戳的分析(仅YouTube)
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/
scripts/
- : Single Python script (PEP 723) handling transcript download, markdown formatting, and PDF rendering. Run via
wisdom.py. Subcommands:uv run,transcript,output-dir,format.pdf
- :单个Python脚本(符合PEP 723),处理字幕下载、markdown格式化和PDF渲染。通过
wisdom.py运行。子命令:uv run、transcript、output-dir、format。pdf
styles/
styles/
- : 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
wisdom-pdf.cssflag.--css - : HTML5 template used by the PDF renderer to wrap converted markdown.
wisdom-pdf.html5 - : 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.
wisdom-index.html
- :用于PDF渲染的CSS样式表。采用暖琥珀色调色板,正文字体为衬线体,标题为无衬线体,包含样式化的块引用、代码块和表格。可通过
wisdom-pdf.css参数自定义或替换。--css - :PDF渲染器用于包裹转换后markdown内容的HTML5模板。
wisdom-pdf.html5 - :智慧库索引页面的HTML模板。包含嵌入式CSS和JS,可独立运行。每次PDF导出后,会自动在智慧基础目录(包含所有带日期前缀的智慧子目录的父目录)中生成。使用fuse.js(CDN)实现模糊搜索,离线时自动回退为简单子字符串搜索。
wisdom-index.html