Token导航 LogoToken导航

Agent Skill · 研究检索

update-context(更新上下文)

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

update-context 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 57,350。

总安装 436周安装 18GitHub Stars 1下载 143核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/kavantrudie/skills --skill update-context

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,提升上下文理解能力。适合在 Codex、Claude、Cursor、Gemini CLI 中根据任务场景快速定位资料时使用。通过 GitHub 仓库安装,使用 npx skills add 命令集成。需检查权限边界,防止触发未授权的联网或命令执行。

update-context 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/update-context

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/kavantrudie/skills --skill update-context;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

update-context 怎么安装?

在终端执行 npx skills add https://github.com/kavantrudie/skills --skill update-context。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

update-context 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

update-context 需要什么权限?

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

update-context 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

update-context 用的人多吗?

公开数据是累计安装 436 次,近一周安装 18 次,下载 143 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

update-context 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
update-context

更新上下文 · 本页

4361接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Update Context Skill

Maintain persistent context documentation by capturing conversation insights and organizing them into markdown files.

When to Use This Skill

Use this skill to document:

  • Features: New feature implementations and requirements
  • Bugs: Bug analysis, root causes, and fixes
  • Architecture: Architectural decisions and design patterns
  • Refactors: Refactoring efforts and outcomes
  • Performance: Performance improvements and optimizations
  • Security: Security considerations and implementations

How Documentation Is Used

Important: Context documentation creates a searchable knowledge base, not automatic context loading.

  • Documentation must be explicitly referenced in future sessions (e.g., "read the auth context doc")
  • Primary value is for human developers to understand past decisions and implementations
  • AI agents can read these docs when asked, but don't auto-load them at session start
  • Best used as Architectural Decision Records (ADRs) with code evidence
  • Searchable via grep/glob for finding relevant past context

Usage

Automatic Invocation

During technical conversations, I may proactively use this skill to capture important context, decisions, and implementation details.

Manual Invocation

# Document a feature
/update-context feature my-feature-name

# Document a bug analysis
/update-context bug issue-123

# Document an architectural decision
/update-context architecture auth-system-redesign

# Document a refactor
/update-context refactor state-management

# Document a performance improvement
/update-context performance query-optimization

# Document a security implementation
/update-context security rate-limiting

Documentation Structure

The skill creates a two-tier documentation system:

1. Index at Project Root (CLAUDE.md)

A lightweight index file at the project root provides quick scanning of all context:

CLAUDE.md   # Minimal index with brief summaries + links

Purpose: Quick overview without loading full documentation. Contains:

  • Brief 1-2 sentence summaries
  • Links to detailed documentation
  • Organized by type (Features, Bugs, Architecture, etc.)
  • Alphabetically sorted within each type

What gets modified: Only the 6 context type sections (Features, Bugs, Architecture, Refactors, Performance, Security). All other content in CLAUDE.md is preserved.

See examples/CLAUDE.md.example for a complete example.

2. Detailed Documentation (Agent-Specific Directories)

Full context documentation is organized in agent-specific directories. The skill automatically detects your AI coding agent and uses the appropriate directory:

  • Claude Code: .claude/context-docs/
  • Cursor: .cursor/context-docs/
  • Aider: .aider/context-docs/
  • GitHub Copilot: .github/copilot/context-docs/
  • Generic/Unknown: .ai-context/

You can also specify a custom directory using the --output flag.

<context-dir>/
├── features/
│   └── [feature-name].md
├── bugs/
│   └── [bug-id].md
├── architecture/
│   └── [decision-name].md
├── refactors/
│   └── [description].md
├── performance/
│   └── [optimization-name].md
└── security/
    └── [security-feature].md

What Gets Captured

Each documentation file includes insights from both conversation and code changes:

  • Overview: Clear description of what this is about (from conversation + git analysis)
  • Problem/Goal: What are we solving? (from conversation context)
  • Solution/Implementation: How did we solve it? (from conversation + actual code changes in git diff)
  • Key Decisions: Why did we choose this approach? (from conversation)
  • Code Changes: Specific files modified and key changes made (from git diff analysis)
  • Tradeoffs: Benefits and costs (from conversation + code complexity analysis)
  • Related Files: Which files are affected? (from git diff + conversation)
  • Testing: Verification approach (from conversation + test file changes)
  • Status: Current state (In Progress, Complete, etc.)
  • Date: When was this documented?

The skill intelligently combines:

  • Conversation insights: "Why" decisions were made, architectural reasoning
  • Code changes: "What" actually changed, implementation details from git diff

Template Structure

# [Title]

**Type**: Feature | Bug | Architecture | Refactor | Performance | Security
**Date**: YYYY-MM-DD
**Status**: In Progress | Complete | Blocked | Review

## Overview
[Clear description from conversation + git analysis]

## Problem/Goal
[What are we solving?]

## Solution/Implementation
[How did we solve it? - from conversation]

## Code Changes
[If git analysis was performed, detailed breakdown of actual changes:]
- **Files Modified**: List of changed files with change summary
- **Key Changes**: Important code additions, modifications, or refactors
- **Patterns Used**: Design patterns or architectural approaches visible in code
- **Dependencies**: New packages or libraries added

## Key Decisions
- [Decision 1 and rationale]
- [Decision 2 and rationale]

## Tradeoffs
- **Pros**: [Benefits]
- **Cons**: [Costs/Downsides]

## Related Files
- `path/to/file1.ts` - [Purpose and changes made]
- `path/to/file2.tsx` - [Purpose and changes made]

## Testing / Verification
- [ ] Unit tests
- [ ] E2E tests
- [ ] Manual testing
[Include test file changes if present in git diff]

## Notes
[Additional context, gotchas, future improvements]

See template.md for the full detailed template.

Agent Detection & Configuration

The skill automatically detects your AI coding agent and creates documentation in the appropriate location:

Auto-Detection Process

The skill checks for the following in order:

  1. Custom output flag: --output /path/to/docs (highest priority)
  2. Environment variable: AI_CONTEXT_DIR environment variable
  3. Agent-specific directories:

- .claude/ exists → use .claude/context-docs/ - .cursor/ exists → use .cursor/context-docs/ - .aider/ exists → use .aider/context-docs/ - .github/copilot/ exists → use .github/copilot/context-docs/

  1. Generic fallback: .ai-context/ (works with any agent)

Custom Output Directory

# Use a custom directory for documentation
/update-context feature my-feature --output ./docs/ai-context

# Use environment variable (set in your shell config)
export AI_CONTEXT_DIR=".ai-docs"
/update-context feature my-feature

Multi-Agent Projects

If you work with multiple AI agents on the same project, the skill will create separate context directories for each agent. This allows each agent to maintain its own context while keeping documentation organized.

Alternatively, set AI_CONTEXT_DIR to use a shared directory across all agents:

export AI_CONTEXT_DIR=".ai-context"

Implementation Steps

When this skill is invoked, I will:

  1. Parse arguments: Extract context type ($0), optional name ($1), and optional flags (e.g., --output)
  2. Detect AI agent and determine output directory:

- Check for --output flag for custom directory - If not specified, auto-detect the AI agent: - Check for .claude/ directory → use .claude/context-docs/ - Check for .cursor/ directory → use .cursor/context-docs/ - Check for .aider/ directory → use .aider/context-docs/ - Check for .github/copilot/ directory → use .github/copilot/context-docs/ - Check environment variable AI_CONTEXT_DIR → use that value - Fallback to .ai-context/ (generic, agent-agnostic) - Store the determined directory path for use in all subsequent steps

  1. Check git changes: Run git status to see if there are any changes
  2. Ask user preference: If changes exist, ask whether to analyze:

- Staged changes only (git diff --cached) - cleaner, focused on what's ready to commit - All changes (git diff HEAD) - includes both staged and unstaged changes - Skip git analysis - use conversation context only

  1. Analyze git changes: If user wants git analysis, run the appropriate git diff command and analyze:

- Files modified - Nature of changes (added features, bug fixes, refactors) - Key code changes and patterns

  1. Ensure directory exists: Create <detected-context-dir>/[type]/ if needed (e.g., .cursor/context-docs/features/)
  2. Generate filename: Use provided name or derive from conversation/git changes
  3. Check for existing file: Read existing content if updating
  4. Capture context: Extract relevant information from:

- Conversation history - Git diff analysis (if available) - File changes and patterns

  1. Structure content: Use template format for consistency, integrating both conversation and code change insights
  2. Write/update file: Save to appropriate location
  3. Update CLAUDE.md index (PRESERVE ALL OTHER CONTENT):
  • Determine project root (parent of.git directory or current directory)
  • Check if CLAUDE.md exists at project root
  • If CLAUDE.md doesn't exist, create it using the template from claude-md-template.md
  • If CLAUDE.md exists, read and parse it:

- Identify the 6 context type sections: ## Features, ## Bugs, ## Architecture, ## Refactors, ## Performance, ## Security - Extract ONLY list entries (lines starting with - **) from these sections - PRESERVE ALL other content (headers, explanatory text, custom sections, user notes) - Store content boundaries (what comes before, between, and after each section)

  • Extract brief summary from the generated context file:

- Read the Overview section (first 1-2 sentences, max ~100 words) - This will be used as the indented description under the entry

  • Calculate relative path from project root to the context file:

- Example for Claude Code: .claude/context-docs/features/shopping-cart.md - Example for Cursor: .cursor/context-docs/features/shopping-cart.md - Use forward slashes (/) even on Windows for cross-platform compatibility

  • Create/update entry:

- Format: - **[Title]** (YYYY-MM-DD) - [Details](relative/path/to/file.md) - Next line (indented with 2 spaces): Brief summary from Overview section - Title: From context file header (remove markdown # symbols) - Date: From context file date field

  • Find or create the appropriate type section:

- If section doesn't exist, create it in standard order: Features, Bugs, Architecture, Refactors, Performance, Security - Preserve all surrounding content

  • Update context entries:

- Check if an entry with the same title already exists in that section - If yes, replace it (update scenario - don't duplicate) - If no, add as new entry - Sort all entries alphabetically by title within the section

  • Reconstruct CLAUDE.md:

- Preserve all content before the first context section - Write each context type section with updated entries - Preserve all content between sections - Preserve all content after the last context section

  • Write updated CLAUDE.md back to project root
  • CRITICAL: Only context list entries are modified, everything else stays intact
  1. Confirm: Report back with paths to both the detailed context file and CLAUDE.md (mention which agent directory was used)

Git Changes Analysis

When invoked, the skill will:

  1. Check for changes: Run git status to see if there are uncommitted changes
  2. Prompt for preference: If changes exist, ask you to choose:

- Staged changes only: Analyzes git diff --cached - Best for documenting specific commits or focused changes - All changes: Analyzes git diff HEAD - Best for comprehensive session documentation - Skip git analysis: Uses conversation context only - Best when working without git or discussing future plans

  1. Analyze the diff: Extract and understand:

- Files modified and their purposes - Functions/components added or changed - Patterns and architectural decisions visible in code - Test coverage changes - Configuration changes

This dual-context approach ensures documentation is both accurate (based on actual code) and meaningful (based on discussed reasoning).

Arguments

  • $0 (required): Context type

- Values: feature, bug, architecture, refactor, performance, security

  • $1 (optional): Name/identifier for the documentation file

- If not provided, I'll derive a name from the conversation context - Examples: shopping-cart, issue-123, auth-redesign

  • --output (optional): Custom output directory path

- Example: --output./docs/context or --output.custom/ai-docs - Overrides auto-detection

If no arguments are provided, I'll ask you what type of context to document.

Examples

Example 1: Document a Feature with Git Changes

/update-context feature data-grid-qis

I will:

  1. Detect AI agent (e.g., finds .cursor/ directory → will use .cursor/context-docs/)
  2. Check git status (finds uncommitted changes)
  3. Ask: "Would you like me to analyze: (1) Staged changes only, (2) All changes, or (3) Skip git analysis?"
  4. User selects "Staged changes only"
  5. Run git diff --cached and analyze the actual code changes
  6. Combine conversation context + git analysis
  7. Create: .cursor/context-docs/features/data-grid-qis.md with detailed implementation info

Example 2: Document a Bug Fix

/update-context bug connection-modal-crash

With git changes, the documentation will include:

  • Conversation: Root cause analysis and reasoning
  • Git diff: Exact lines changed, files affected, fix implementation
  • Result: Complete picture of the bug and its solution

Example 3: Document Architecture Decision

/update-context architecture websocket-communication

Auto-detects agent directory and creates documentation (e.g., .aider/context-docs/architecture/websocket-communication.md for Aider). Includes discussion of alternatives + actual implementation patterns from code changes.

Example 4: Update Existing Documentation

If the file already exists, I'll read it first and merge/update the content with new information from the conversation and any new git changes.

Example 5: Document Without Git (Planning Phase)

/update-context feature new-auth-system

If no git changes exist yet, or user selects "Skip git analysis", documentation will be based purely on conversation context - perfect for planning and design discussions.

Example 6: Custom Output Directory

/update-context refactor code-cleanup --output ./team-docs/ai-context

Creates: ./team-docs/ai-context/refactors/code-cleanup.md Useful for shared team documentation or custom project structures.

Example 7: Multi-Agent Project

In a project using both Claude and Cursor:

  • Claude: Creates docs in .claude/context-docs/
  • Cursor: Creates docs in .cursor/context-docs/

Each agent maintains its own context history. To share context across agents, set:

export AI_CONTEXT_DIR=".shared-context"

Example 8: CLAUDE.md Index Integration

After running:

/update-context feature shopping-cart

Two files are created/updated:

  1. Detailed documentation: .claude/context-docs/features/shopping-cart.md

- Full 14-section documentation - Complete code changes, decisions, testing details

  1. Index entry in CLAUDE.md (at project root): ## Features - **Shopping Cart** (2026-01-15) - [Details](.claude/context-docs/features/shopping-cart.md) Real-time shopping cart with WebSocket synchronization across multiple devices

When you run the skill again to update existing context:

/update-context feature shopping-cart

Both files are updated:

  • Detailed doc: Merged with new information
  • CLAUDE.md: Entry updated with new date and summary (not duplicated)

Benefit: AI agents can quickly scan CLAUDE.md to find relevant context, then read detailed docs only when needed. Users can also add custom content to CLAUDE.md (notes, explanations, etc.) and it will be completely preserved - only the context list entries are modified.

Tips

  • Use descriptive names: Choose clear, searchable names for your documentation
  • Document as you go: Invoke this skill during or right after implementation discussions
  • Stage your changes first: For cleanest documentation, stage (git add) the files you want to document before running the skill
  • Use staged-only for commits: When preparing a commit, use "staged changes only" to document exactly what's being committed
  • Use all changes for sessions: When documenting a full work session with multiple changes, use "all changes"
  • Reference explicitly: In future sessions, say "read.claude/context-docs/features/X.md" to load context
  • Searchable history: Use grep/glob to find relevant docs (e.g., "grep 'authentication' context-docs/")
  • Team onboarding: Primary value is for human developers to understand past decisions
  • Update when needed: Re-run the skill with the same name to append new findings
  • Commit to git: Include your context directory (e.g., .claude/context-docs/ or .ai-context/) in your repository for team visibility
  • Works with or without git: The skill adapts - use it for planning (no git) or post-implementation (with git)
  • Share across agents: Set AI_CONTEXT_DIR environment variable to use a shared context directory for multiple AI agents
  • Custom locations: Use --output flag to specify exactly where documentation should be saved
  • Multi-agent workflows: Each agent can maintain its own context, or share a common directory - your choice!
  • Quick context discovery: Check CLAUDE.md first to find relevant documentation without loading everything
  • Minimal index: CLAUDE.md stays lightweight - only brief summaries, not full details
  • AI agent scanning: AI agents can read CLAUDE.md to understand project history at a glance
  • Link to details: Always use the links in CLAUDE.md to read full detailed documentation
  • Preserve your notes: Feel free to add custom content to CLAUDE.md - only the context list entries are modified by the skill

Integration with Development Workflow

This skill complements your existing workflow by combining conversation insights with actual code changes:

Planning Phase (no git changes):

  • During architecture discussions → Record decisions and alternatives
  • Before implementing → Document the planned approach

Implementation Phase (with git changes):

  • While implementing → Stage changes and document incrementally
  • After implementing a feature → Document with actual code analysis
  • After fixing a bug → Capture root cause + exact fix from git diff
  • After refactoring → Document the changes with before/after code comparison
  • After performance improvements → Note the results with actual code changes

Review Phase:

  • Before committing → Document staged changes for commit context
  • After completing work session → Document all changes made

The documentation becomes a living record of your project's evolution, grounded in both reasoning (conversation) and reality (code changes).

平台分布

Codex

37.92%
按下载量换算54

Claude

29.8%
按下载量换算43

Cursor

20.84%
按下载量换算30

Gemini CLI

8.96%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills