context-mate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Context Mate

Context Mate

A toolkit that works with Claude Code's natural flow. Use what helps, ignore what doesn't.

一个与Claude Code自然工作流适配的工具包。按需选用,无需勉强。

When This Skill Activates

本技能的激活时机

When context-mate is invoked, analyze the project first before recommending tools.
当调用context-mate时,先分析项目,再推荐工具。

Step 1: Quick Project Scan

步骤1:快速项目扫描

Check for these files (use Glob, don't read contents yet):
File/PatternIndicates
SESSION.md
Session tracking active
IMPLEMENTATION_PHASES.md
Phased planning in use
PROJECT_BRIEF.md
Project explored/planned
CLAUDE.md
or
.claude/
AI context exists
.claude/rules/
Correction rules present
package.json
or
requirements.txt
Has dependencies
tests/
or
*.test.*
Has test infrastructure
检查以下文件(使用Glob,暂不读取内容):
文件/模式代表含义
SESSION.md
已启用会话跟踪
IMPLEMENTATION_PHASES.md
正在使用分阶段规划
PROJECT_BRIEF.md
项目已完成探索/规划
CLAUDE.md
.claude/
存在AI上下文
.claude/rules/
存在修正规则
package.json
requirements.txt
包含依赖项
tests/
*.test.*
存在测试基础设施

Step 2: Git State (if git repo)

步骤2:Git状态(如果是Git仓库)

bash
git status --short            # Uncommitted changes?
git log --oneline -3          # Recent commit messages?
bash
git status --short            # 有无未提交更改?
git log --oneline -3          # 最近的提交信息?

Step 3: Assess Stage and Recommend

步骤3:评估阶段并推荐

Project Stages:
StageSignsRecommend
New ProjectNo CLAUDE.md, no phases
/explore-idea
or
/plan-project
Active DevelopmentSESSION.md or phases exist
/continue-session
, developer agents
Maintenance ModeDocs exist, no SESSION.md
/plan-feature
for new work,
project-health
for audits
Mid-SessionUncommitted changes + SESSION.mdContinue current work,
/wrap-session
when done
项目阶段:
阶段特征推荐操作
新项目无CLAUDE.md,无阶段文件
/explore-idea
/plan-project
活跃开发中存在SESSION.md或阶段文件
/continue-session
、开发者代理
维护模式存在文档,无SESSION.md新增工作用
/plan-feature
,审计用
project-health
会话进行中存在未提交更改 + SESSION.md继续当前工作,完成后用
/wrap-session

Step 4: Brief Output

步骤4:简洁输出

Tell the user:
  1. What's already set up (e.g., "You have SESSION.md and phases - mid-project")
  2. What would help now (e.g., "Run
    /continue-session
    to resume")
  3. What's available but not in use (e.g., "No tests yet -
    test-runner
    available")
Example:
Project Analysis
CLAUDE.md
- AI context configured ✓
SESSION.md
- Session tracking active (Phase 2 in progress) ✓
.claude/rules/
- 3 correction rules ○ No test files detected
Recommendations:
  • Run
    /continue-session
    to resume Phase 2 work
  • Use
    commit-helper
    agent when ready to commit
  • Consider
    test-runner
    agent when adding tests
Keep it under 10 lines. Don't overwhelm - just highlight what's relevant.

The name has a double meaning:
  1. Your friendly context companion (the toolkit)
  2. "It's all about the context, maaate!" (the philosophy)
This isn't "The Correct Way To Do Things" - these tools exist because context windows are real constraints, not because we're dictating methodology.

告知用户:
  1. 已配置的内容(例如:"你已拥有SESSION.md和阶段文件 - 项目进行中")
  2. 当前推荐的操作(例如:"运行
    /continue-session
    以恢复工作")
  3. 可用但未使用的工具(例如:"尚未配置测试 - 可使用
    test-runner
    ")
示例:
项目分析
CLAUDE.md
- 已配置AI上下文 ✓
SESSION.md
- 已启用会话跟踪(当前处于第2阶段) ✓
.claude/rules/
- 存在3条修正规则 ○ 未检测到测试文件
推荐操作:
  • 运行
    /continue-session
    以恢复第2阶段工作
  • 准备提交时使用
    commit-helper
    代理
  • 添加测试时可考虑
    test-runner
    代理
控制在10行以内。避免信息过载,仅突出相关内容。

名称的双重含义:
  1. 你的友好上下文伙伴(工具包本身)
  2. "一切都关乎上下文,伙计!"(核心理念)
这不是"正确的做事方式"——这些工具的存在是因为上下文窗口是真实的限制,而非我们要强行规定方法论。

Quick Reference

快速参考

Slash Commands (type these)

斜杠命令(直接输入)

CommandWhat it does
/context-mate
Analyze project, recommend tools
/explore-idea
Start with a vague idea
/plan-project
Plan a new project
/plan-feature
Plan a specific feature
/wrap-session
End work session
/continue-session
Resume from last session
/docs-init
Create project docs
/docs-update
Update docs after changes
/brief
Preserve context before clearing
/reflect
Capture learnings → rules, skills, memory
/release
Prepare for deployment
命令功能
/context-mate
分析项目,推荐工具
/explore-idea
从模糊想法开始
/plan-project
规划新项目
/plan-feature
规划特定功能
/wrap-session
结束工作会话
/continue-session
从上次会话恢复
/docs-init
创建项目文档
/docs-update
更改后更新文档
/brief
清除上下文前保存关键信息
/reflect
记录经验总结 → 规则、技能、记忆
/release
准备部署

Agents (Claude uses these automatically)

代理(Claude会自动调用)

AgentWhat it does
commit-helper
Writes commit messages
code-reviewer
Reviews code quality
debugger
Investigates bugs
test-runner
Runs/writes tests
build-verifier
Checks dist matches source
documentation-expert
Creates/updates docs
orchestrator
Coordinates multi-step work
代理功能
commit-helper
生成提交信息
code-reviewer
审查代码质量
debugger
排查Bug
test-runner
运行/编写测试
build-verifier
检查构建产物与源码是否匹配
documentation-expert
创建/更新文档
orchestrator
协调多步骤工作

Skills (background knowledge)

技能(背景知识)

SkillWhat it provides
project-planning
Phase-based planning templates
project-session-management
SESSION.md patterns
docs-workflow
Doc maintenance commands
deep-debug
Multi-agent debugging
project-health
AI-readability audits
developer-toolbox
The 7 agents above

技能提供的能力
project-planning
基于阶段的规划模板
project-session-management
SESSION.md使用模式
docs-workflow
文档维护命令
deep-debug
多代理联合调试
project-health
AI可读性审计
developer-toolbox
上述7种代理工具

The Toolkit at a Glance

工具包概览

┌─────────────────────────────────────────────────────────────┐
│                    PROJECT LIFECYCLE                        │
├─────────────────────────────────────────────────────────────┤
│  /explore-idea → /plan-project → [work] → /wrap-session    │
│       ↓              ↓              ↓           ↓          │
│  PROJECT_BRIEF   PHASES.md     SESSION.md   git checkpoint │
│                                     ↓                      │
│                              /continue-session             │
│                                     ↓                      │
│                              [resume work]                 │
│                                     ↓                      │
│                    /reflect → /release                     │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│                    项目生命周期                            │
├─────────────────────────────────────────────────────────────┤
│  /explore-idea → /plan-project → [工作] → /wrap-session    │
│       ↓              ↓              ↓           ↓          │
│  PROJECT_BRIEF   PHASES.md     SESSION.md   Git检查点       │
│                                     ↓                      │
│                              /continue-session             │
│                                     ↓                      │
│                              [恢复工作]                     │
│                                     ↓                      │
│                    /reflect → /release                     │
└─────────────────────────────────────────────────────────────┘

When To Use What

场景与工具匹配

You want to...Use this
Explore a vague idea
/explore-idea
Plan a new project
/plan-project
Plan a specific feature
/plan-feature
End a work session
/wrap-session
Resume after a break
/continue-session
Create/update docs
/docs-init
,
/docs-update
Debug something stubborn
deep-debug
skill
Review code quality
code-reviewer
agent
Run tests with TDD
test-runner
agent
Prepare a git commit
commit-helper
agent
Verify build output
build-verifier
agent
Check docs are AI-readable
context-auditor
agent
Validate workflows work
workflow-validator
agent
Check session handoff quality
handoff-checker
agent

你想要...使用这个
探索模糊的想法
/explore-idea
规划新项目
/plan-project
规划特定功能
/plan-feature
结束工作会话
/wrap-session
休息后恢复工作
/continue-session
创建/更新文档
/docs-init
/docs-update
排查顽固Bug
deep-debug
技能
审查代码质量
code-reviewer
代理
结合TDD运行测试
test-runner
代理
准备Git提交
commit-helper
代理
验证构建输出
build-verifier
代理
检查文档的AI可读性
context-auditor
代理
验证工作流有效性
workflow-validator
代理
检查会话交接质量
handoff-checker
代理

Component Skills

组件技能

Project Lifecycle (project-workflow)

项目生命周期(project-workflow)

Nine integrated commands for the complete project lifecycle:
CommandPurpose
/explore-idea
Brainstorm and validate project concepts
/plan-project
Generate phased implementation plan
/plan-feature
Plan a specific feature addition
/docs-init
Create initial project documentation
/docs-update
Update docs after changes
/wrap-session
End session with git checkpoint
/continue-session
Resume from SESSION.md
/reflect
Review progress and plan next steps
/release
Prepare for deployment/release
Invoke:
Skill(skill: "project-workflow")
覆盖完整项目生命周期的9个集成命令:
命令用途
/explore-idea
头脑风暴并验证项目概念
/plan-project
生成分阶段实施计划
/plan-feature
规划特定功能的添加
/docs-init
创建初始项目文档
/docs-update
更改后更新文档
/wrap-session
通过Git检查点结束会话
/continue-session
从SESSION.md恢复工作
/reflect
回顾进度并规划下一步
/release
准备部署/发布
调用方式
Skill(skill: "project-workflow")

Session Management (project-session-management)

会话管理(project-session-management)

Track progress across context windows using SESSION.md with git checkpoints.
  • Converts IMPLEMENTATION_PHASES.md into actionable tracking
  • Creates semantic git commits as recovery points
  • Documents concrete next actions for resumption
  • Prevents context loss between sessions
Invoke:
Skill(skill: "project-session-management")
通过SESSION.md和Git检查点跟踪跨上下文窗口的进度。
  • 将IMPLEMENTATION_PHASES.md转换为可执行的跟踪内容
  • 创建语义化Git提交作为恢复点
  • 记录恢复工作所需的具体后续操作
  • 防止会话间的上下文丢失
调用方式
Skill(skill: "project-session-management")

Developer Agents (developer-toolbox)

开发者代理(developer-toolbox)

Seven specialized agents for common development tasks:
AgentUse For
commit-helper
Generate meaningful commit messages
code-reviewer
Security, quality, architecture review
debugger
Systematic bug investigation
test-runner
TDD workflows, test creation
build-verifier
Verify dist/ matches source
documentation-expert
Create/update project docs
orchestrator
Coordinate multi-step projects
Invoke:
Skill(skill: "developer-toolbox")
用于常见开发任务的7种专业代理:
代理适用场景
commit-helper
生成有意义的提交信息
code-reviewer
安全、质量、架构审查
debugger
系统化Bug排查
test-runner
TDD工作流、测试用例编写
build-verifier
验证dist/目录与源码是否匹配
documentation-expert
创建/更新项目文档
orchestrator
协调多步骤项目
调用方式
Skill(skill: "developer-toolbox")

Deep Debugging (deep-debug)

深度调试(deep-debug)

Multi-agent investigation for stubborn bugs that resist normal debugging.
  • Spawns parallel investigation agents
  • Cross-references findings
  • Handles browser/runtime issues
  • Best when going in circles on a bug
Invoke:
Skill(skill: "deep-debug")
针对常规调试难以解决的顽固Bug,采用多代理联合排查。
  • 启动并行排查代理
  • 交叉引用排查结果
  • 处理浏览器/运行时问题
  • 适用于陷入僵局的Bug排查场景
调用方式
Skill(skill: "deep-debug")

Quality Auditing (project-health)

质量审计(project-health)

Three agents for AI-readability and workflow quality:
AgentPurpose
context-auditor
Check if docs are AI-readable (score 0-100)
workflow-validator
Verify documented processes work (score 0-100)
handoff-checker
Validate session continuity quality (score 0-100)
Invoke:
Skill(skill: "project-health")
用于AI可读性和工作流质量的3种代理:
代理用途
context-auditor
检查文档的AI可读性(评分0-100)
workflow-validator
验证文档化流程的有效性(评分0-100)
handoff-checker
验证会话连续性质量(评分0-100)
调用方式
Skill(skill: "project-health")

Documentation Lifecycle (docs-workflow)

文档生命周期(docs-workflow)

Four commands for documentation management:
CommandPurpose
/docs
Quick doc lookup
/docs-init
Create initial docs
/docs-update
Update after changes
/docs-claude
Generate AI-optimized CLAUDE.md
Invoke:
Skill(skill: "docs-workflow")

用于文档管理的4个命令:
命令用途
/docs
快速查找文档
/docs-init
创建初始文档
/docs-update
更改后更新文档
/docs-claude
生成AI优化的CLAUDE.md
调用方式
Skill(skill: "docs-workflow")

Core Concepts

核心概念

Sessions ≠ Phases

会话 ≠ 阶段

Sessions are context windows (2-4 hours of work before context fills up).
Phases are work units (logical groupings like "Phase 1: Database Setup").
A phase might span multiple sessions. A session might touch multiple phases. They're independent concepts.
会话指上下文窗口(工作2-4小时后上下文会被占满)。
阶段指工作单元(如"阶段1:数据库搭建"这类逻辑分组)。
一个阶段可能跨越多个会话,一个会话也可能涉及多个阶段。二者是独立的概念。

Checkpointed Progress

带检查点的进度

Git commits serve as semantic checkpoints, not just version control:
bash
undefined
Git提交作为语义化检查点,而非仅用于版本控制:
bash
undefined

Bad: commits as save points

错误:提交仅作为保存点

git commit -m "WIP" git commit -m "more changes"
git commit -m "WIP" git commit -m "more changes"

Good: commits as progress markers

正确:提交作为进度标记

git commit -m "Complete Phase 1: Database schema and migrations" git commit -m "Phase 2 partial: Auth middleware working, UI pending"

When resuming via `/continue-session`, these commits tell the story of where you are.
git commit -m "完成阶段1:数据库 schema 和迁移" git commit -m "阶段2部分完成:Auth中间件可用,UI待开发"

通过`/continue-session`恢复工作时,这些提交能清晰展示当前进度。

Progressive Disclosure

渐进式披露

Skills load incrementally to preserve context:
  1. Metadata (~50 tokens) - Always in context, triggers skill loading
  2. SKILL.md body (<5k words) - Loaded when skill activates
  3. Bundled resources - Loaded as needed (templates, references, scripts)
This means a 50-skill toolkit only costs ~2,500 tokens until you actually use something.
技能会逐步加载以节省上下文:
  1. 元数据(约50个Token)- 始终处于上下文中,触发技能加载
  2. SKILL.md主体(<5000字)- 技能激活时加载
  3. 捆绑资源 - 按需加载(模板、参考资料、脚本)
这意味着包含50个技能的工具包在实际使用前仅占用约2500个Token。

Skills Teach, Rules Correct

技能传授,规则修正

Two complementary knowledge systems:
SkillsRules
Location
~/.claude/skills/
.claude/rules/
(project)
ContentRich bundlesSingle markdown files
PurposeTeach how to use XCorrect outdated patterns
ExampleHow to set up Tailwind v4Fix v3 syntax Claude might suggest
Rules are project-portable - they travel with the repo so any Claude instance gets the corrections.
两个互补的知识系统:
技能规则
存储位置
~/.claude/skills/
.claude/rules/
(项目级)
内容丰富的资源包单个Markdown文件
用途教授如何使用某项功能修正过时的模式
示例如何设置Tailwind v4修复Claude可能推荐的v3语法
规则可随项目迁移——它们会随代码库一起被携带,因此任何Claude实例都能应用这些修正。

Sub-agents for Isolation

子代理隔离

Heavy tasks (code review, debugging, testing) run in sub-agents to:
  • Keep verbose output out of main context
  • Allow parallel execution
  • Provide specialized tool access
  • Return concise summaries

繁重任务(代码审查、调试、测试)通过子代理运行,以:
  • 避免冗长输出占用主上下文
  • 支持并行执行
  • 提供专用工具访问权限
  • 返回简洁的总结结果

Getting Started

快速开始

New Project

新项目

/explore-idea    # Optional: clarify what you're building
/plan-project    # Generate phased plan
                 # Work on Phase 1...
/wrap-session    # End with checkpoint
/explore-idea    # 可选:明确你要构建的内容
/plan-project    # 生成分阶段计划
                 # 开始第1阶段的工作...
/wrap-session    # 以检查点结束会话

Resuming Work

恢复工作

/continue-session    # Reads SESSION.md, suggests next steps
                     # Continue working...
/wrap-session        # Checkpoint again
/continue-session    # 读取SESSION.md,推荐下一步操作
                     # 继续工作...
/wrap-session        # 再次创建检查点

Adding a Feature

添加新功能

/plan-feature    # Plan the specific feature
                 # Implement...
/wrap-session    # Checkpoint
/plan-feature    # 规划特定功能
                 # 实现功能...
/wrap-session    # 创建检查点

Debugging Session

调试会话

undefined
undefined

If normal debugging isn't working:

如果常规调试无效:

Skill(skill: "deep-debug")
Skill(skill: "deep-debug")

Spawns investigation agents

启动排查代理


---

---

The Philosophy

核心理念

Context windows are real. They fill up. Work gets lost. Sessions end.
These tools don't fight that - they work with it:
  • SESSION.md captures state for next session
  • Git checkpoints create recovery points
  • Sub-agents keep heavy work isolated
  • Progressive disclosure preserves context budget
Use what helps. Ignore what doesn't.
This is the knifey-spooney school of project management:
Traditional PMContext Mate
"Follow the methodology""She'll be right"
"Update the Gantt chart"
/wrap-session
"Consult the RACI matrix""Oi Claude, what next?"
No ceremonies. No standups with your AI. No burndown charts.
If Homer Simpson can't figure it out in 30 seconds, it's too complicated.
It's all about the context, maaate. 🥄
上下文窗口是真实存在的限制。它们会被占满,工作内容会丢失,会话会结束。
这些工具不会对抗这种限制——而是与之适配:
  • SESSION.md 为下一次会话保存状态
  • Git检查点 创建恢复点
  • 子代理 隔离繁重工作
  • 渐进式披露 节省上下文额度
按需选用,无需勉强。
这是实用主义项目管理流派
传统项目管理Context Mate
"遵循方法论""没问题的"
"更新甘特图"
/wrap-session
"参考RACI矩阵""嘿Claude,下一步该做什么?"
没有繁琐的仪式。无需与AI开站会。没有燃尽图。
如果霍默·辛普森在30秒内搞不懂,那它就太复杂了。
一切都关乎上下文,伙计! 🥄