Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计异常

gotcha-summarizer陷阱总结者

Agent Skill

gotcha-summarizer 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

832

周安装

34

GitHub Stars

1

下载量

267
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gotcha-summarizer(陷阱总结者)
来源仓库:https://github.com/lian-yang/gotcha-summarizer
仓库路径:skills/gotcha-summarizer
安装命令:
npx skills add https://github.com/lian-yang/gotcha-summarizer --skill gotcha-summarizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lian-yang/gotcha-summarizer --skill gotcha-summarizer

简介

gotcha-summarizer 用于处理 GitHub 仓库、Issue、Pull Request 等协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态和代码变更进行整理时使用。
  • 通过 npx skills add 命令从 GitHub 安装,需确认权限范围和维护状态。
  • 使用前应核实是否会触发联网、命令执行或文件读写操作。
  • 建议结合原始 README 和仓库内容进一步核验具体用法。

SKILL.md

Gotcha Summarizer

Automatically extracts and documents technical lessons learned from conversations into the project's docs/gotchas/ directory.

Features

  • Structured Extraction: Extracts problems, causes, solutions, best practices from conversations
  • 18+ Language Detection: Automatic code language detection (JSX/TSX, SQL, Vue, Bash, PowerShell, PHP, Ruby, Swift, Kotlin, C#, Dart, Rust, Go, Python, TypeScript, Java, JavaScript, C, C++)
  • Multi-Code Block Support: Groups and displays code blocks by programming language
  • Confidence Scoring: Returns classification confidence scores for domain and category
  • Fuzzy Duplicate Detection: Detects similar entries using SequenceMatcher (threshold: 0.75)
  • Internationalization: Chinese/English interface with LOCALE environment variable
  • Error Tracking: Tracks JSON parse errors, file I/O errors, classification errors with statistics

Purpose

This skill analyzes conversation history to identify and document:

Frontend Development:

  • Frontend bugs and root causes (hydration errors, memory leaks, rendering issues)
  • Framework issues (React, Vue, Next.js, Nuxt, Svelte, Angular)
  • Styling problems (CSS, SCSS, Tailwind, UnoCSS)
  • Build tool issues (Vite, Webpack, Rollup, esbuild)
  • State management (Redux, Pinia, Zustand, Jotai, Vuex)
  • UI component library issues (Ant Design, Element Plus, shadcn/ui, Material-UI)

Backend Development:

  • Backend bugs and root causes (nil pointer, race conditions, database errors)
  • Database/ORM issues (SQL, migrations, Bun, GORM, Ent, sqlx)
  • API issues (REST, GraphQL, gRPC, endpoints, controllers)
  • Concurrency issues (goroutines, mutexes, channels, context, race conditions)
  • Performance issues (caching, Redis, slow queries, indexing, n+1 problems)
  • Precision issues (decimal vs float, money/amount handling)

Common Development:

  • Testing problems and solutions (unit tests, integration tests, mocks, TDD)
  • CI/CD pipeline issues (GitHub Actions, Docker, deployment, Kubernetes)
  • Git/version control problems (merge conflicts, rebasing, branches)
  • Code quality improvements (refactoring, design patterns, linting)
  • Any technical lessons worth documenting

Usage

Run this skill at the end of a conversation to capture lessons learned:

skill gotcha-summarizer

The skill will:

  1. Analyze the conversation for technical issues
  2. Use a decision tree to categorize the topic
  3. Extract key information (error messages, root causes, solutions)
  4. Check existing docs for duplicates
  5. Update the appropriate markdown file

Decision Tree

START: Analyze conversation for technical issues
│
├─ LAYER 1: Domain Classification (Common / Frontend / Backend)
│   │
│   ├─ COMMON BRANCH → LAYER 2
│   │   ├─ Testing → common/testing.md
│   │   ├─ CI/CD → common/cicd.md
│   │   ├─ Git → common/git.md
│   │   └─ Code Quality → common/code-quality.md
│   │
│   ├─ FRONTEND BRANCH → LAYER 2
│   │   ├─ Bug Issues → frontend/bugs.md
│   │   ├─ Framework → frontend/frameworks.md
│   │   ├─ Styling → frontend/styling.md
│   │   ├─ Build Tools → frontend/build-tools.md
│   │   ├─ State Management → frontend/state-mgmt.md
│   │   └─ UI Components → frontend/ui-components.md
│   │
│   └─ BACKEND BRANCH → LAYER 2
│       ├─ Bug Issues → backend/bugs.md
│       ├─ Database → backend/database.md
│       ├─ API → backend/api.md
│       ├─ Concurrency → backend/concurrency.md
│       ├─ Performance → backend/performance.md
│       └─ Precision → backend/precision.md
│
└─ LAYER 3: File Mapping (Category → markdown file)

Classification Priority

The three-layer decision tree checks categories in this priority order:

Layer 1: Domain (Common > Frontend > Backend)

  • Common domains (Testing, CI/CD, Git) are checked first as they apply to all development

Layer 2: Category (within each domain)

  • Bugs always have highest priority within each domain
  • Other categories follow domain-specific priority

Frontend Priority: Bugs > Frameworks > State Mgmt > Styling > Build Tools > UI Components Backend Priority: Bugs > Database > API > Concurrency > Performance > Precision Common Priority: Testing > CI/CD > Git > Code Quality

Supported Categories

DomainCategoryFileExamples
FrontendBugsfrontend/bugs.mdHydration errors, memory leaks, re-render issues
Frameworksfrontend/frameworks.mdReact, Vue, Next.js, Nuxt, Svelte, Angular
Stylingfrontend/styling.mdCSS, SCSS, Tailwind, UnoCSS, styled-components
Build Toolsfrontend/build-tools.mdVite, Webpack, Rollup, esbuild, HMR
State Mgmtfrontend/state-mgmt.mdRedux, Pinia, Zustand, Jotai, Vuex
UI Componentsfrontend/ui-components.mdAnt Design, Element Plus, shadcn/ui, MUI
BackendBugsbackend/bugs.mdNil pointer, race conditions, SQL errors
Databasebackend/database.mdSQL, ORM (Bun, GORM, Ent), migrations
APIbackend/api.mdREST, GraphQL, gRPC, endpoints, controllers
Concurrencybackend/concurrency.mdGoroutines, mutexes, channels, context
Performancebackend/performance.mdCaching (Redis), slow queries, indexing, n+1
Precisionbackend/precision.mdDecimal vs float, money/amount handling
CommonTestingcommon/testing.mdUnit tests, integration tests, mocks, TDD
CI/CDcommon/cicd.mdGitHub Actions, Docker, Kubernetes, deployment
Gitcommon/git.mdMerge conflicts, rebasing, branch management
Code Qualitycommon/code-quality.mdRefactoring, design patterns, linting

Script Usage

The main script can be run directly:

python3 scripts/summarize.py

Environment Variables

VariableDefaultDescription
CLAUDE_HISTORY_PATHAuto-detectedPath to conversation history JSON
GOTCHAS_DIR./docs/gotchasPath to docs/gotchas directory
DRY_RUNfalseSet to true to preview changes without writing
TIMESTAMP_FORMAT%Y-%m-%d %H:%M:%SFormat for timestamps in generated markdown
LOCALEzhInterface language (zh for Chinese, en for English)
LOG_LEVELWARNINGLogging level (DEBUG, INFO, WARNING, ERROR)
ENABLE_ERROR_TRACKINGfalseEnable detailed error tracking and statistics

Examples

# Default: analyze latest conversation and update docs
python3 scripts/summarize.py

# Preview changes without writing
DRY_RUN=true python3 scripts/summarize.py

# Specify custom gotchas directory
GOTCHAS_DIR=/path/to/docs/gotchas python3 scripts/summarize.py

# Use specific conversation history
CLAUDE_HISTORY_PATH=/path/to/history.jsonl python3 scripts/summarize.py

# Use English locale
LOCALE=en python3 scripts/summarize.py

# Custom timestamp format (ISO 8601)
TIMESTAMP_FORMAT="%Y-%m-%dT%H:%M:%S%z" python3 scripts/summarize.py

# Enable debug logging and error tracking
LOG_LEVEL=DEBUG ENABLE_ERROR_TRACKING=true python3 scripts/summarize.py

Output Format

The skill generates markdown sections following this format:

Chinese (Default)

## 问题:[简短标题]

> **自动生成时间**: 2026-02-04 18:00:00

### 错误信息

错误信息内容

### 相关代码

// Code with automatic language detection const example = "value";


### 问题描述

[解释为什么会发生这个问题]

### 根本原因

[问题背后的技术原因]

### 解决方案

[解决该问题的方法]

### 最佳实践清单

- 检查项 1
- 检查项 2

---

English (LOCALE=en)

## Issue: [Short Title]

> **Auto-generated time**: 2026-02-04 18:00:00

### Error Information

Error message content

### Related Code

// Code with automatic language detection const example = "value";


### Problem Description

[Explanation of why this issue occurs]

### Root Cause

[Technical reason behind the problem]

### Solution

[Method to resolve the issue]

### Best Practices Checklist

- Check item 1
- Check item 2

---

Multiple Code Blocks

When multiple code blocks in different languages are detected, they are grouped:

### 相关代码

#### JAVASCRIPT

const App = () => <div />;


#### GO

func main() {}

Duplicate Detection

Before adding new content, the script:

  1. Reads all existing gotcha files
  2. Normalizes text (removes markdown formatting, timestamps, IDs)
  3. Checks for similar titles (fuzzy matching with 0.75 threshold)
  4. Checks for similar error messages
  5. Checks for similar code patterns
  6. Skips adding if a duplicate is detected (with warning)

Error Statistics

When ENABLE_ERROR_TRACKING=true, the script outputs detailed error statistics:


📊 Error Statistics: • Total entries processed: 150 • JSON parse errors: 3 • File read errors: 0 • File write errors: 1 • Classification errors: 0

This helps identify data quality issues in conversation history files.

Integration with Session End

This skill is designed to be called automatically at the end of conversations. You can set up a session-end hook in your Claude Code configuration to automatically run gotcha-summarizer when a conversation ends.

Troubleshooting

No technical issues found

If the skill doesn't detect any technical issues:

  • Ensure the conversation contains error messages, code examples, or problem-solving discussions
  • Try manually triggering the skill with explicit instructions about what to document

Duplicate entries

The skill attempts to detect duplicates, but may occasionally create similar entries. Review the generated content and merge or remove duplicates as needed.

File permission errors

Ensure the docs/gotchas/ directory is writable:

chmod +w docs/gotchas/*.md

See Also

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.58%
按下载量换算98

Claude

28.6%
按下载量换算76

Cursor

18.4%
按下载量换算49

Gemini CLI

9.53%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills