跳到正文
Skillpedia
智能体48k · #4257

context-management-context-save

它能做什么

这个工具帮助 AI 保存并整理关于项目或对话的重要信息。它会记录细节、决定和当前状态,让 AI 之后能够记住并使用这些信息,即使在很长的对话中或多人协作时也一样。

适用场景

  • ✓开始一个新项目时,记录它的基本特征。
  • ✓在项目进行过程中,保存进度和重要决定。
  • ✓团队协作时,确保每个人都掌握相同的信息。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/context-management-context-save/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/context-management-context-save/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请保存这个项目的上下文,包括文件夹结构、架构决策和语义标签。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会分析项目,找出关键信息(比如决定和当前状态),并以有条理的方式保存下来。之后需要时,它可以调取这些信息,确保不会遗漏重要内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Context Save Tool: Intelligent Context Management Specialist

Use this skill when

  • Working on context save tool: intelligent context management specialist tasks or workflows
  • Needing guidance, best practices, or checklists for context save tool: intelligent context management specialist

Do not use this skill when

  • The task is unrelated to context save tool: intelligent context management specialist
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.

Role and Purpose

An elite context engineering specialist focused on comprehensive, semantic, and dynamically adaptable context preservation across AI workflows. This tool orchestrates advanced context capture, serialization, and retrieval strategies to maintain institutional knowledge and enable seamless multi-session collaboration.

Context Management Overview

The Context Save Tool is a sophisticated context engineering solution designed to:

  • Capture comprehensive project state and knowledge
  • Enable semantic context retrieval
  • Support multi-agent workflow coordination
  • Preserve architectural decisions and project evolution
  • Facilitate intelligent knowledge transfer

Requirements and Argument Handling

Input Parameters

  • $PROJECT_ROOT: Absolute path to project root
  • $CONTEXT_TYPE: Granularity of context capture (minimal, standard, comprehensive)
  • $STORAGE_FORMAT: Preferred storage format (json, markdown, vector)
  • $TAGS: Optional semantic tags for context categorization

Context Extraction Strategies

1. Semantic Information Identification

  • Extract high-level architectural patterns
  • Capture decision-making rationales
  • Identify cross-cutting concerns and dependencies
  • Map implicit knowledge structures

2. State Serialization Patterns

  • Use JSON Schema for structured representation
  • Support nested, hierarchical context models
  • Implement type-safe serialization
  • Enable lossless context reconstruction

3. Multi-Session Context Management

  • Generate unique context fingerprints
  • Support version control for context artifacts
  • Implement context drift detection
  • Create semantic diff capabilities

4. Context Compression Techniques

  • Use advanced compression algorithms
  • Support lossy and lossless compression modes
  • Implement semantic token reduction
  • Optimize storage efficiency

5. Vector Database Integration

Supported Vector Databases:

  • Pinecone
  • Weaviate
  • Qdrant

Integration Features:

  • Semantic embedding generation
  • Vector index construction
  • Similarity-based context retrieval
  • Multi-dimensional knowledge mapping

6. Knowledge Graph Construction

  • Extract relational metadata
  • Create ontological representations
  • Support cross-domain knowledge linking
  • Enable inference-based context expansion

7. Storage Format Selection

Supported Formats:

  • Structured JSON
  • Markdown with frontmatter
  • Protocol Buffers
  • MessagePack
  • YAML with semantic annotations

Code Examples

1. Context Extraction

def extract_project_context(project_root, context_type='standard'):
    context = {
        'project_metadata': extract_project_metadata(project_root),
        'architectural_decisions': analyze_architecture(project_root),
        'dependency_graph': build_dependency_graph(project_root),
        'semantic_tags': generate_semantic_tags(project_root)
    }
    return context

2. State Serialization Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "project_name": {"type": "string"},
    "version": {"type": "string"},
    "context_fingerprint": {"type": "string"},
    "captured_at": {"type": "string", "format": "date-time"},
    "architectural_decisions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "decision_type": {"type": "string"},
          "rationale": {"type": "string"},
          "impact_score": {"type": "number"}
        }
      }
    }
  }
}

3. Context Compression Algorithm

def compress_context(context, compression_level='standard'):
    strategies = {
        'minimal': remove_redundant_tokens,
        'standard': semantic_compression,
        'comprehensive': advanced_vector_compression
    }

…
常见问题

什么是“语义标签”?

它们是能智能描述内容的关键词或标签,帮助 AI 理解并查找相关信息。

为什么要保存上下文?

这样 AI 就不会忘记已经完成或决定的事情,工作可以从上次中断的地方继续,保持前后一致,也便于协作。

有哪些保存格式?

信息可以保存为 JSON(适合结构化数据)、Markdown(适合文本和笔记),也可以使用向量数据库(适合智能相似度搜索)。

详情

作者的原始描述

Use when working with context management context save

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4257
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能