SuperAPI AI Directory

yichen-summary

Office & productivity

View repository

Updated 10-16 00:22

About this skill

yichen-summary: Claude Code Conversation Essence Extractor

Goal

Automatically extract and structure the essence of the current conversation, and save it to a specified folder in Obsidian.

Essence Judgment Criteria

Content to Extract

  • Problems and Solutions: Specific problem descriptions and solutions
  • Code Snippets: Reusable code, configurations, commands
  • Decision Rationale: Reasons for technology choices, trade-offs
  • New Knowledge: Information not previously known, API pitfalls, best practices
  • Error Lessons: Pitfalls encountered, why they failed

Content to Filter Out

  • Pure conversational transitions: "OK", "Got it", "Let's try"
  • Intermediate debugging output: temporary printed logs
  • Failed attempts that ultimately proved useless

Workflow

Step 1: Analyze the Conversation

  1. Read all the content of the current conversation
  2. Identify the core theme of the conversation
  3. Extract the essence content (according to the above criteria)

Step 2: Generate the Note Structure

## 背景
<简述对话背景和问题>

## 核心内容
<主要讨论内容>

## 解决方案
<如果有,列出解决方案>

\`\`\`language
<代码片段>
\`\`\`

## 关键要点
- 要点1
- 要点2

## 相关
- 项目路径: <当前工作目录>
- 相关技术/工具

Important:

  • Do not use YAML frontmatter(do not include metadata such as tags, date)
  • Do not use an H1 title(the filename is the topic, and the content starts directly from H2)
  • Keep the content concise and get straight to the point

Step 3: Save to Obsidian

Use the Bash tool to write directly to the file, no MCP connection required:

# 构建完整文件路径(假设 Obsidian vault 路径由用户自行配置)
OBSDIR="<OBSIDIAN_VAULT>/AI对话精华"
FILENAME="<对话主题标题>.md"
FULLPATH="$OBSDIR/$FILENAME"

# 使用 heredoc 语法写入内容
cat > "$FULLPATH" << 'EOF'
## 背景
<简述对话背景和问题>

## 核心内容
<主要讨论内容>

## 解决方案
<如果有,列出解决方案>

\`\`\`language
<代码片段>
\`\`\`

## 关键要点
- 要点1
- 要点2

## 相关
- 项目路径: <当前工作目录>
- 相关技术/工具
EOF

Note:

  • Use << 'EOF' (single quotes) to ensure that special characters in the content are not escaped
  • Wrap the file path in double quotes to handle spaces
  • Complete the save in one go, no second confirmation required

Precautions

  1. Filename Generation Rules:

    • Extract the core theme from the conversation as the filename
    • Keep it concise, use Chinese or English
    • Avoid special characters (such as / \ : * ? < > |)
    • If the theme is not obvious, use the date + sequence number format (such as 2024-02-01-01.md)
  2. Content Quality:

    • Ensure the note is independently readable (has context)
    • Code snippets must have language identifiers
    • Do not omit key information
  3. Obsidian Path Configuration:

    • Default path:<OBSIDIAN_VAULT>/AI对话精华/
    • If your vault is in another location, modify the OBSDIR variable
    • Ensure the directory exists; if it does not, create it first:mkdir -p "$OBSDIR"
  4. Windows Path Handling:

    • Use forward slashes / or double backslashes \\
    • Avoid using single backslashes \(they will be escaped)

Tool Usage

  • Bash Tool: Execute shell commands to write directly to files
  • cat command + heredoc: Create files containing multi-line content
  • mkdir command: Create directory (if it does not exist)