Skip to content
Development
Command

/context

上下文管理,加载项目信息(会话级,另见 /cc-best:memory 管理持久记忆)

From plugin
4944 skills8 agents44 commands20 hooks
shell
$ npx -y skills add xiaobei930/cc-best --agent claude-code

Ships with cc-best. Installing the plugin gets this command.

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/context

Context preview

What this command does when you run it.

上下文管理,加载项目信息(会话级,另见 /cc-best:memory 管理持久记忆)

Command definition

context.md
description: 上下文管理,加载项目信息(会话级,另见 /cc-best:memory 管理持久记忆)
argument-hint: "[load|save|show]"
allowed-tools: Read, Write, Edit, Glob, Grep

/context - 上下文管理

管理 AI 对话上下文,确保信息连续性。

上下文层级

1. 项目上下文(固定)

**始终需要了解的信息**:

  • 项目目标和核心功能
  • 技术栈选型
  • 关键约束条件

2. 阶段上下文(阶段内固定)

**当前阶段需要的信息**:

  • 当前 Phase 和 Step
  • 阶段目标和验收标准
  • 相关的设计文档

3. 任务上下文(任务内)

**当前任务需要的信息**:

  • 具体任务描述
  • 相关代码文件
  • 依赖和接口

新会话启动流程

1. 读取 memory-bank/progress.md
   → 了解当前状态、已完成工作和下一步任务

2. 读取当前任务相关文件(按需)
   → 代码文件、设计文档

3. 确认任务并继续
   → 更新 TodoWrite

上下文文件清单

必读(每次会话)

| 文件 | 内容 | 优先级 | | ------------------------- | ---------- | ------ | | `memory-bank/progress.md` | 状态和进度 | P0 | | `CLAUDE.md` | 项目说明 | P1 |

按需读取

| 文件 | 何时读取 | | ----------------------------- | -------------- | | `memory-bank/architecture.md` | 涉及架构设计时 | | `memory-bank/tech-stack.md` | 技术决策时 |

上下文压缩策略

长会话时

1. 定期同步状态到 progress.md 2. 完成的任务只保留摘要 3. 相关代码只保留接口定义

会话切换时

1. 保存当前状态到 progress.md 2. 记录未完成任务 3. 记录关键决策

命令

  • `/cc-best:context load` - 加载项目上下文
  • `/cc-best:context save` - 保存当前状态
  • `/cc-best:context show` - 显示当前上下文范围

> **记住**: 上下文是 AI 协作的核心资产,花时间维护上下文就是在为未来的效率投资。

Read it on GitHub ↗
Ships withcc-best

Role-Driven Development Workflow for Claude Code Transform Claude into a complete development team. From product requirements to code review — one plugin, full workflow. Quick Start • Features • Workflow • Commands • FAQ

Get the whole plugin, auto-invoked
Stats
49
Stars
0
Views
3
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
1mo ago
Last commit
6mo ago
Created

Repo: xiaobei930/cc-best