AgentSkillsCN

project-context-management

为软件项目管理 AI 代理的上下文。适用于代理需要项目指南、合同、模式、文档,或需要聚焦于特定会话时使用。可通过提及“项目上下文”、“指南”、“合同”、“模式”、“文档”、“会话”、“检查点”等短语触发。

SKILL.md
--- frontmatter
name: project-context-management
description: Manages AI agent context for software projects. Use when agents need project guidelines, contracts, patterns, documentation, or session focus. Triggers on mentions of: project context, guidelines, contracts, patterns, documentation, session, checkpoint.

Project Context Management Skill

Quick Start

Initialize context at conversation start:

typescript
// 1. Identify project
identify_context({ file_path: "current/working/path" })

// 2. Load guidelines
get_merged_guidelines({ context: "backend" })

// 3. Start session
start_session({ context: "backend", current_focus: "task description" })

Core Operations

Session Management: See SESSION-WORKFLOW.md Contract Validation: See CONTRACT-REFERENCE.md
Documentation: See DOCUMENTATION-WORKFLOW.md Patterns: See PATTERNS-REFERENCE.md

Tool Quick Reference

OperationToolWhen
Start workidentify_context + start_sessionEvery conversation
Load rulesget_merged_guidelinesBefore coding
Check contractsget_contractsBefore implementing interfaces
Save progresscreate_checkpointAfter completing steps
End workcomplete_sessionWhen task done

Workflow Checklist

Copy and track progress:

code
Task Progress:
- [ ] identify_context called
- [ ] guidelines loaded
- [ ] session started
- [ ] work completed
- [ ] checkpoint created
- [ ] session completed

Decision Tree

code
Need to write code?
├─ YES → Load guidelines first
│        ├─ Implementing interface? → Check contracts
│        └─ Using patterns? → Get patterns
└─ NO → Just reading/researching
         └─ No special tools needed

Anti-Patterns

❌ Starting code without identify_context

❌ Implementing interfaces without checking contracts ❌ Long sessions without checkpoints ❌ Creating docs without checking duplicates