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

maintaining-project-context维护项目背景

Agent Skill

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

总安装

318

周安装

13

GitHub Stars

176

下载量

103
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/ed3dai/ed3d-plugins --skill maintaining-project-context

简介

maintaining-project-context 用于查找和筛选相关信息。

  • 适合在关键词搜索或任务场景中快速定位候选结果。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前应确认权限范围、维护状态及是否触发联网或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Maintaining Project Context

REQUIRED SUB-SKILL: Use ed3d-extending-claude:writing-claude-md-files for all context file creation and updates.

Core Principle

Context files (CLAUDE.md or AGENTS.md) document contracts and architectural intent. When code changes contracts, the documentation must update. Stale documentation is worse than no documentation.

Trigger: End of development phase, branch completion, or any work that changed contracts, APIs, or domain structure.

Format Detection (MANDATORY FIRST STEP)

Before any updates, detect what format this repository uses:

# Check for AGENTS.md at root
ls -la AGENTS.md 2>/dev/null

# Check for CLAUDE.md at root
ls -la CLAUDE.md 2>/dev/null
Root AGENTS.md?FormatAction
YesAGENTS.md-canonicalUpdate AGENTS.md files, create companion CLAUDE.md
NoCLAUDE.md-canonicalUpdate CLAUDE.md files directly

Key principle: We use OUR format structure (Purpose, Contracts, Dependencies, Invariants, etc.) regardless of filename. AGENTS.md is just for cross-platform AI agent compatibility.

AGENTS.md-Canonical Repos

When the repo uses AGENTS.md:

  1. Read AGENTS.md first before making any updates
  2. Write content to AGENTS.md using our standard structure
  3. Create companion CLAUDE.md next to each AGENTS.md with exactly this content:
Read @./AGENTS.md and treat its contents as if they were in CLAUDE.md

When to Update Context Files

Change TypeUpdate Required?What to Update
New domain/moduleYesCreate domain context file
API/interface changeYesContracts section
Architectural decisionYesKey Decisions section
Invariant changeYesInvariants section
Dependency changeYesDependencies section
Bug fix (no contract change)No-
Refactor (same behavior)No-
Test additionsNo-

The Process

Step 1: Identify What Changed

Diff against the base (branch start or phase start):

# Get changed files
git diff --name-only <base-sha> HEAD

# Get detailed changes
git diff <base-sha> HEAD --stat

Categorize changes:

  • Structural: New directories, moved files
  • Contract: Changed exports, interfaces, public APIs
  • Behavioral: Changed invariants, guarantees
  • Internal: Implementation details only

Step 2: Map Changes to Context Files

For each significant change, determine which context file should document it:

Change LocationContext File Location
Project-wide patternRoot context file
New domain<domain>/ context file (create)
Existing domain contract<domain>/ context file (update)
Cross-domain dependencyBoth affected domains

Hierarchy rule: Information belongs at the lowest level where it applies. Domain-specific contracts go in domain files, not root.

For AGENTS.md-canonical repos: When creating new domain context files, create both AGENTS.md (with content) and CLAUDE.md (companion pointer).

Step 3: Verify Contracts Still Hold

For each affected context file, verify:

  1. Contracts section: Do exposes/guarantees/expects match current code?
  2. Dependencies section: Are uses/used-by/boundary accurate?
  3. Invariants section: Are all invariants still enforced?
  4. Key Decisions section: Any new decisions to document?
# Find domain's public exports
grep -r "export" <domain>/index.ts

# Find domain's imports (dependencies)
grep -r "from '\.\." <domain>/

Step 4: Update or Create Context Files

For updates:

  1. Read existing file first (especially for AGENTS.md)
  2. Update freshness date via date +%Y-%m-%d
  3. Update affected sections
  4. Remove stale content
  5. Verify under token budget (<100 lines for domain files)

For new domains (CLAUDE.md-canonical repos):

  1. Create <domain>/CLAUDE.md using template from writing-claude-md-files
  2. Document purpose, contracts, dependencies, invariants
  3. Set freshness date

For new domains (AGENTS.md-canonical repos):

  1. Create <domain>/AGENTS.md using template from writing-claude-md-files
  2. Document purpose, contracts, dependencies, invariants
  3. Set freshness date
  4. Create companion <domain>/CLAUDE.md: Read @./AGENTS.md and treat its contents as if they were in CLAUDE.md

Step 5: Commit Documentation Updates

git add <affected CLAUDE.md files>
git commit -m "docs: update project context for <branch-name>"

Decision Tree

Has code changed?
├─ No → Skip (nothing to update)
└─ Yes → Detect format first (AGENTS.md at root?)
    │
    └─ What changed?
        ├─ Only tests/internal details → Skip
        └─ Contracts/APIs/structure → Continue
            │
            ├─ New domain created?
            │   ├─ AGENTS.md repo → Create AGENTS.md + companion CLAUDE.md
            │   └─ CLAUDE.md repo → Create CLAUDE.md
            │
            ├─ Existing domain changed?
            │   └─ Update domain context file (read first!)
            │
            └─ Project-wide pattern changed?
                └─ Update root context file

Quick Reference

Always update when:

  • New public exports added
  • Interface signatures changed
  • Invariants added/removed
  • Dependencies changed
  • Architectural decisions made

Never update for:

  • Internal refactoring
  • Bug fixes that don't change contracts
  • Test file changes
  • Comment/documentation-only changes

Common Mistakes

MistakeFix
Updating for every changeOnly update for contract changes
Forgetting freshness dateAlways use date +%Y-%m-%d
Documenting implementationDocument contracts and intent
Putting domain info in rootUse domain context files for domain contracts
Skipping verificationRead the code, confirm contracts hold
Skipping format detectionAlways check for AGENTS.md first
Writing AGENTS.md without readingAlways read existing content before updating
Forgetting companion CLAUDE.mdAGENTS.md repos need both files

Integration Points

Called by:

  • project-claude-librarian agent - Uses this skill to coordinate updates
  • executing-an-implementation-plan (Step 5b) - After all tasks complete
  • finishing-a-development-branch (Step 4b) - Before merge/PR

Uses:

  • writing-claude-md-files - For actual context file creation/updates (works for both CLAUDE.md and AGENTS.md)

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

38.85%
按下载量换算40

Claude

30.45%
按下载量换算31

Cursor

18.7%
按下载量换算19

Gemini CLI

8.47%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills