Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:38:41 +08:00
commit 7d5b628e7d
13 changed files with 1610 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
---
name: enrich-citations
description: Add authoritative source links for all facts, citations, and references in markdown content
---
Process markdown content and enrich it with authoritative citation links:
<input_markdown_content>
$ARGUMENTS
</input_markdown_content>
## Input Processing
The command accepts ARGUMENTS which can be either:
1. **Absolute file path**: If the ARGUMENTS starts with `/`, treat it as a file path
- Read the markdown content from the specified file
- Example: `/enrich-citations /Users/sanhehu/Documents/article.md`
2. **Inline content**: If ARGUMENTS is not an absolute path, treat it as inline markdown text
- Process the text directly
- Example: `/enrich-citations This article mentions React and TypeScript frameworks.`
## Workflow
### 1. Load Content
- If absolute path provided: Read content from file
- If inline content provided: Use the provided text directly
### 2. Enrich Citations
Use the `enrich-citations` agent skill to process the markdown content:
**Identify all references:**
- External sources and research papers
- Tools, software, frameworks, libraries
- Products and services
- Organizations and institutions
- Technical concepts and standards
- People and experts
**For each identified reference:**
1. Perform web search to find the authoritative source
2. Verify the URL is current and accessible
3. Replace plain text with markdown hyperlinks: `[Reference](URL)`
4. **Add spaces around hyperlinks**: `text [link](url) text`
**Citation priority:**
- Official sources (project homepages, official documentation)
- Primary sources (original research papers, publications)
- Authoritative organizations (standards bodies, academic institutions)
- Reputable publications (tech blogs, news sites)
- Community resources (GitHub, Stack Overflow)
- General references (Wikipedia as last resort)
**Quality requirements:**
- Verify all links are valid and working
- Ensure proper markdown formatting with spaces
- Preserve all original content (only add hyperlinks)
- Maintain document structure and meaning
### 3. Save Output
Save the enriched document to: `~/tmp/citation_enriched.md`
**Example enrichment:**
Input:
```markdown
# Introduction to Modern JavaScript
JavaScript has evolved significantly with ES6 introducing features like arrow functions.
TypeScript adds static typing to JavaScript and is developed by Microsoft.
```
Output:
```markdown
# Introduction to Modern JavaScript
[JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) has evolved significantly with [ES6](https://www.ecma-international.org/ecma-262/6.0/) introducing features like arrow functions.
[TypeScript](https://www.typescriptlang.org/) adds static typing to JavaScript and is developed by [Microsoft](https://www.microsoft.com/) .
```
### 4. Display Output Location
After completing the enrichment and saving the document, print the absolute path in a clickable format.
**Format:** `file:///absolute/path/to/citation_enriched.md`
**Example output:**
```
✓ Citation enrichment completed successfully!
✓ Enriched document saved to: file:///Users/sanhehu/tmp/citation_enriched.md
Click the link above to open the document.
```
**Requirements:**
- Use absolute path (not relative path like `~/tmp/...`)
- Include `file://` protocol prefix for clickability
- Provide clear success message
- Make it easy for user to access the enriched document
---
## Usage Examples
**Enrich an existing file:**
```bash
/enrich-citations /Users/sanhehu/Documents/article.md
```
**Enrich inline content:**
```bash
/enrich-citations This article discusses React, Next.js, and Vercel deployment.
```
---
**Note:** This command makes citation enrichment quick and accessible. It automatically performs web searches to find authoritative sources and adds verified hyperlinks to the document.

72
commands/yt-to-md.md Normal file
View File

@@ -0,0 +1,72 @@
---
name: yt-to-md
description: Download, transcribe, and organize YouTube video into structured markdown document
---
Process YouTube video $ARGUMENTS end-to-end and create a well-organized document:
## Workflow
Execute these skills in sequence:
### 1. Download Audio
Use the `youtube-video-to-audio` agent skill to download audio from the provided YouTube URL.
### 2. Transcribe Audio
Use the `transcribe-audio-to-text` agent skill to transcribe the downloaded audio file.
### 3. Clean Up Transcription
Use the `audio-transcription-cleanup` agent skill to transform the raw transcription into a well-structured markdown document.
This step will:
- Detect the primary language and use it for output
- Add semantic paragraph breaks based on topic changes
- Create descriptive section headings
- Fix obvious spelling, terminology, and grammatical errors
- Remove filler words and verbal artifacts
- Maintain all original information from the video
**Output Format:**
```markdown
# [Video Title]
## [Section 1 Heading]
[Cleaned paragraph content...]
[More cleaned content...]
## [Section 2 Heading]
[Content continues...]
## Key Takeaways
- Point 1
- Point 2
- Point 3
```
Save the cleaned document to: `~/tmp/organized_transcript.md`
### 4. Display Output Location
After completing the cleanup and saving the document, print the absolute path of the final organized document in a clickable format.
**Format:** `file:///absolute/path/to/organized_transcript.md`
**Example output:**
```
✓ YouTube video processed successfully!
✓ Organized document saved to: file:///Users/sanhehu/tmp/organized_transcript.md
Click the link above to open the document.
```
**Requirements:**
- Use absolute path (not relative path like `~/tmp/...`)
- Include `file://` protocol prefix for clickability
- Provide clear success message
- Make it easy for user to access the final document
**Note:** This command automates the core workflow from video URL to organized markdown document. Each skill can also be run independently for partial workflows.