Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

insight-extraction洞察力提取

Agent Skill

insight-extraction 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,479

周安装

61

GitHub Stars

25

下载量

483
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:insight-extraction(洞察力提取)
来源仓库:https://github.com/oimiragieo/agent-studio
仓库路径:skills/insight-extraction
安装命令:
npx skills add https://github.com/oimiragieo/agent-studio --skill insight-extraction
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/oimiragieo/agent-studio --skill insight-extraction

简介

insight-extraction 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 注意该技能当前分类为研究检索,实际功能以来源仓库文档为准。

SKILL.md

Insight Extraction Skill

Overview

Analyze completed coding sessions and extract structured learnings for the memory system. Insights help future sessions avoid mistakes, follow established patterns, and understand the codebase faster.

Core principle: Extract ACTIONABLE knowledge, not logs. Every insight should help a future session do something better.

When to Use

Always:

  • After completing a coding task
  • After fixing bugs
  • After discovering new patterns
  • After failed attempts (especially valuable)

Exceptions:

  • Trivial changes with no learnings
  • Documentation-only changes

The Iron Law

NO SESSION END WITHOUT INSIGHT EXTRACTION FOR NON-TRIVIAL WORK

Non-trivial sessions should capture learnings before context is lost.

Input Required

To extract insights, you need:

  1. Git diff - What files changed and how
  2. Task description - What was being implemented
  3. Attempt history - Previous tries (if any), what approaches were used
  4. Session outcome - Success or failure

Workflow

Phase 1: Gather Session Data

# Get the diff of changes
git diff HEAD~1 --stat
git diff HEAD~1

# Get commit message
git log -1 --pretty=format:"%s%n%n%b"

# Get list of modified files
git diff HEAD~1 --name-only

Phase 2: Analyze File Insights

For each modified file, extract:

  • Purpose: What role does this file play?
  • Changes made: What was the modification? Focus on the "why" not just "what"
  • Patterns used: What coding patterns were applied?
  • Gotchas: Any file-specific traps?

Good example:

{
  "path": "src/stores/terminal-store.ts",
  "purpose": "Zustand store managing terminal session state with immer middleware",
  "changes_made": "Added setAssociatedTask action to link terminals with tasks",
  "patterns_used": ["Zustand action pattern", "immer state mutation"],
  "gotchas": ["State changes must go through actions, not direct mutation"]
}

Bad example (too vague):

{
  "path": "src/stores/terminal-store.ts",
  "purpose": "A store file",
  "changes_made": "Added some code",
  "patterns_used": [],
  "gotchas": []
}

Phase 3: Extract Patterns

Only extract patterns that are reusable:

  • Must apply to more than just this one case
  • Include where/when to apply the pattern
  • Reference a concrete example in the codebase

Good example:

{
  "pattern": "Use e.stopPropagation() on interactive elements inside containers with onClick handlers",
  "applies_to": "Any clickable element nested inside a parent with click handling",
  "example": "Terminal.tsx header - dropdown needs stopPropagation to prevent focus stealing"
}

Phase 4: Document Gotchas

Must be specific and actionable:

  • Include what triggers the problem
  • Include how to solve or prevent it
  • Avoid generic advice ("be careful with X")

Good example:

{
  "gotcha": "Terminal header onClick steals focus from child interactive elements",
  "trigger": "Adding buttons/dropdowns to Terminal header without stopPropagation",
  "solution": "Call e.stopPropagation() in onClick handlers of child elements"
}

Phase 5: Document Approach Outcome

Capture the learning from success or failure:

  • If succeeded: What made this approach work? What was key?
  • If failed: Why did it fail? What would have worked instead?
  • Alternatives tried: What other approaches were attempted?

This helps future sessions learn from past attempts.

Phase 6: Generate Recommendations

Specific, actionable advice for future work:

  • Must be implementable by a future session
  • Should be specific to this codebase, not generic
  • Focus on what's next or what to watch out for

Good: "When adding more controls to Terminal header, follow the dropdown pattern in this session - use stopPropagation and position relative to header"

Bad: "Write good code" or "Test thoroughly"

Phase 7: Output Structured Insights

Create the structured insight output:

# Session Insights: [Task Name]

## Date

[timestamp]

## Task

[Description of what was being implemented]

## Outcome

[SUCCESS/FAILURE]

## File Insights

### [file-path]

- **Purpose**: [what this file does]
- **Changes**: [what was changed and why]
- **Patterns**: [patterns used]
- **Gotchas**: [things to watch out for]

## Patterns Discovered

### [Pattern Name]

- **Pattern**: [description]
- **Applies to**: [when to use]
- **Example**: [file or code reference]

## Gotchas Discovered

### [Gotcha Name]

- **Issue**: [what to avoid]
- **Trigger**: [what causes it]
- **Solution**: [how to handle]

## Approach Analysis

### What Worked

[Description of successful approach]

### What Failed (if applicable)

[Description of failed approaches and why]

### Alternatives Tried

[List of other approaches attempted]

## Recommendations for Future Sessions

1. [Specific recommendation 1]
2. [Specific recommendation 2]

Save to .claude/context/memory/learnings.md (append).

Handling Edge Cases

Empty or Minimal Diff

If the diff is very small or empty:

  • Still extract file purposes if you can infer them
  • Note that the session made minimal changes
  • Focus on recommendations for next steps

Failed Session

If the session failed:

  • Focus on why it failed - this is the most valuable insight
  • Extract what was learned from the failure
  • Recommendations should address how to succeed next time

Multiple Files Changed

  • Prioritize the most important 3-5 files
  • Skip boilerplate changes (package-lock.json, etc.)
  • Focus on files central to the feature

Verification Checklist

Before completing insight extraction:

  • Git diff analyzed
  • File insights extracted for key files
  • Reusable patterns documented
  • Gotchas documented with triggers and solutions
  • Approach outcome documented
  • Recommendations are specific and actionable
  • Insights saved to memory file

Common Mistakes

Too Vague

Why it's wrong: "Fixed the bug" helps no one.

Do this instead: "Fixed race condition in useEffect by adding cleanup function. Pattern: always return cleanup from async effects."

Generic Advice

Why it's wrong: "Test your code" is not actionable.

Do this instead: "Run npm test src/stores after changing store logic - the tests catch state management bugs."

Missing Context

Why it's wrong: Future sessions won't understand why.

Do this instead: Include file paths, function names, and specific scenarios.

Integration with Other Skills

This skill works well with:

  • session-handoff: Use insights in handoff documents
  • summarize-changes: Complement change summaries with insights
  • debugging: Extract insights from debugging sessions

Iron Laws

  1. ALWAYS extract insights immediately after task completion — delayed extraction loses context; the "what" can be reconstructed but the "why" evaporates within the session.
  2. NEVER record what was done — only record what was learned; activity logs belong in task metadata, not in the learning system.
  3. ALWAYS check for duplicate insights before writing — appending a near-duplicate insight pollutes the memory index and degrades future retrieval quality.
  4. NEVER write vague insights like "X is good" without concrete context, file path, or example — vague insights are unfindable and unhelpful to future sessions.
  5. ALWAYS tag insights with domain category ([CODE], [WORKFLOW], [SECURITY], etc.) — untagged insights are effectively invisible to agents searching by domain.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Recording activity ("implemented auth") instead of learningsAgents can reconstruct history from git; they cannot reconstruct tacit knowledgeRecord "why" and "gotcha": "Fiber's CSRF middleware must be before route registration, not after"
Skipping deduplication checkDuplicate entries inflate memory size and confuse retrievalgrep -i "keyword" learnings.md before appending; update existing entry if found
Vague insights without file/function contextFuture sessions can't locate or apply the insightInclude concrete path: "In .claude/hooks/routing/routing-guard.cjs line 47: exit 0 on parse error"
Extracting only at session endLong sessions lose early context; critical gotchas forgottenExtract after each significant task completion, not just at session boundary
Storing insights only in task metadataTask metadata is not read by future sessions or agentsAlways write to .claude/context/memory/learnings.md with tagged format

Memory Protocol

Before starting: Read .claude/context/memory/learnings.md

After completing:

  • New pattern -> .claude/context/memory/learnings.md
  • Issue found -> .claude/context/memory/issues.md
  • Decision made -> .claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.92%
按下载量换算183

Claude

28.49%
按下载量换算138

Cursor

20.34%
按下载量换算98

Gemini CLI

9.3%
按下载量换算45

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/oimiragieo/agent-studio --skill insight-extraction 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills