context-mate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseContext 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/Pattern | Indicates |
|---|---|
| Session tracking active |
| Phased planning in use |
| Project explored/planned |
| AI context exists |
| Correction rules present |
| Has dependencies |
| Has test infrastructure |
检查以下文件(使用Glob,暂不读取内容):
| 文件/模式 | 代表含义 |
|---|---|
| 已启用会话跟踪 |
| 正在使用分阶段规划 |
| 项目已完成探索/规划 |
| 存在AI上下文 |
| 存在修正规则 |
| 包含依赖项 |
| 存在测试基础设施 |
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:
| Stage | Signs | Recommend |
|---|---|---|
| New Project | No CLAUDE.md, no phases | |
| Active Development | SESSION.md or phases exist | |
| Maintenance Mode | Docs exist, no SESSION.md | |
| Mid-Session | Uncommitted changes + SESSION.md | Continue current work, |
项目阶段:
| 阶段 | 特征 | 推荐操作 |
|---|---|---|
| 新项目 | 无CLAUDE.md,无阶段文件 | |
| 活跃开发中 | 存在SESSION.md或阶段文件 | |
| 维护模式 | 存在文档,无SESSION.md | 新增工作用 |
| 会话进行中 | 存在未提交更改 + SESSION.md | 继续当前工作,完成后用 |
Step 4: Brief Output
步骤4:简洁输出
Tell the user:
- What's already set up (e.g., "You have SESSION.md and phases - mid-project")
- What would help now (e.g., "Run to resume")
/continue-session - What's available but not in use (e.g., "No tests yet - available")
test-runner
Example:
Project Analysis✓- AI context configured ✓CLAUDE.md- Session tracking active (Phase 2 in progress) ✓SESSION.md- 3 correction rules ○ No test files detected.claude/rules/Recommendations:
- Run
to resume Phase 2 work/continue-session- Use
agent when ready to commitcommit-helper- Consider
agent when adding teststest-runner
Keep it under 10 lines. Don't overwhelm - just highlight what's relevant.
The name has a double meaning:
- Your friendly context companion (the toolkit)
- "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.
告知用户:
- 已配置的内容(例如:"你已拥有SESSION.md和阶段文件 - 项目进行中")
- 当前推荐的操作(例如:"运行以恢复工作")
/continue-session - 可用但未使用的工具(例如:"尚未配置测试 - 可使用")
test-runner
示例:
项目分析✓- 已配置AI上下文 ✓CLAUDE.md- 已启用会话跟踪(当前处于第2阶段) ✓SESSION.md- 存在3条修正规则 ○ 未检测到测试文件.claude/rules/推荐操作:
- 运行
以恢复第2阶段工作/continue-session- 准备提交时使用
代理commit-helper- 添加测试时可考虑
代理test-runner
控制在10行以内。避免信息过载,仅突出相关内容。
名称的双重含义:
- 你的友好上下文伙伴(工具包本身)
- "一切都关乎上下文,伙计!"(核心理念)
这不是"正确的做事方式"——这些工具的存在是因为上下文窗口是真实的限制,而非我们要强行规定方法论。
Quick Reference
快速参考
Slash Commands (type these)
斜杠命令(直接输入)
| Command | What it does |
|---|---|
| Analyze project, recommend tools |
| Start with a vague idea |
| Plan a new project |
| Plan a specific feature |
| End work session |
| Resume from last session |
| Create project docs |
| Update docs after changes |
| Preserve context before clearing |
| Capture learnings → rules, skills, memory |
| Prepare for deployment |
| 命令 | 功能 |
|---|---|
| 分析项目,推荐工具 |
| 从模糊想法开始 |
| 规划新项目 |
| 规划特定功能 |
| 结束工作会话 |
| 从上次会话恢复 |
| 创建项目文档 |
| 更改后更新文档 |
| 清除上下文前保存关键信息 |
| 记录经验总结 → 规则、技能、记忆 |
| 准备部署 |
Agents (Claude uses these automatically)
代理(Claude会自动调用)
| Agent | What it does |
|---|---|
| Writes commit messages |
| Reviews code quality |
| Investigates bugs |
| Runs/writes tests |
| Checks dist matches source |
| Creates/updates docs |
| Coordinates multi-step work |
| 代理 | 功能 |
|---|---|
| 生成提交信息 |
| 审查代码质量 |
| 排查Bug |
| 运行/编写测试 |
| 检查构建产物与源码是否匹配 |
| 创建/更新文档 |
| 协调多步骤工作 |
Skills (background knowledge)
技能(背景知识)
| Skill | What it provides |
|---|---|
| Phase-based planning templates |
| SESSION.md patterns |
| Doc maintenance commands |
| Multi-agent debugging |
| AI-readability audits |
| The 7 agents above |
| 技能 | 提供的能力 |
|---|---|
| 基于阶段的规划模板 |
| SESSION.md使用模式 |
| 文档维护命令 |
| 多代理联合调试 |
| AI可读性审计 |
| 上述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 | |
| Plan a new project | |
| Plan a specific feature | |
| End a work session | |
| Resume after a break | |
| Create/update docs | |
| Debug something stubborn | |
| Review code quality | |
| Run tests with TDD | |
| Prepare a git commit | |
| Verify build output | |
| Check docs are AI-readable | |
| Validate workflows work | |
| Check session handoff quality | |
| 你想要... | 使用这个 |
|---|---|
| 探索模糊的想法 | |
| 规划新项目 | |
| 规划特定功能 | |
| 结束工作会话 | |
| 休息后恢复工作 | |
| 创建/更新文档 | |
| 排查顽固Bug | |
| 审查代码质量 | |
| 结合TDD运行测试 | |
| 准备Git提交 | |
| 验证构建输出 | |
| 检查文档的AI可读性 | |
| 验证工作流有效性 | |
| 检查会话交接质量 | |
Component Skills
组件技能
Project Lifecycle (project-workflow)
项目生命周期(project-workflow)
Nine integrated commands for the complete project lifecycle:
| Command | Purpose |
|---|---|
| Brainstorm and validate project concepts |
| Generate phased implementation plan |
| Plan a specific feature addition |
| Create initial project documentation |
| Update docs after changes |
| End session with git checkpoint |
| Resume from SESSION.md |
| Review progress and plan next steps |
| Prepare for deployment/release |
Invoke:
Skill(skill: "project-workflow")覆盖完整项目生命周期的9个集成命令:
| 命令 | 用途 |
|---|---|
| 头脑风暴并验证项目概念 |
| 生成分阶段实施计划 |
| 规划特定功能的添加 |
| 创建初始项目文档 |
| 更改后更新文档 |
| 通过Git检查点结束会话 |
| 从SESSION.md恢复工作 |
| 回顾进度并规划下一步 |
| 准备部署/发布 |
调用方式:
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:
| Agent | Use For |
|---|---|
| Generate meaningful commit messages |
| Security, quality, architecture review |
| Systematic bug investigation |
| TDD workflows, test creation |
| Verify dist/ matches source |
| Create/update project docs |
| Coordinate multi-step projects |
Invoke:
Skill(skill: "developer-toolbox")用于常见开发任务的7种专业代理:
| 代理 | 适用场景 |
|---|---|
| 生成有意义的提交信息 |
| 安全、质量、架构审查 |
| 系统化Bug排查 |
| TDD工作流、测试用例编写 |
| 验证dist/目录与源码是否匹配 |
| 创建/更新项目文档 |
| 协调多步骤项目 |
调用方式:
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:
| Agent | Purpose |
|---|---|
| Check if docs are AI-readable (score 0-100) |
| Verify documented processes work (score 0-100) |
| Validate session continuity quality (score 0-100) |
Invoke:
Skill(skill: "project-health")用于AI可读性和工作流质量的3种代理:
| 代理 | 用途 |
|---|---|
| 检查文档的AI可读性(评分0-100) |
| 验证文档化流程的有效性(评分0-100) |
| 验证会话连续性质量(评分0-100) |
调用方式:
Skill(skill: "project-health")Documentation Lifecycle (docs-workflow)
文档生命周期(docs-workflow)
Four commands for documentation management:
| Command | Purpose |
|---|---|
| Quick doc lookup |
| Create initial docs |
| Update after changes |
| Generate AI-optimized CLAUDE.md |
Invoke:
Skill(skill: "docs-workflow")用于文档管理的4个命令:
| 命令 | 用途 |
|---|---|
| 快速查找文档 |
| 创建初始文档 |
| 更改后更新文档 |
| 生成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
undefinedGit提交作为语义化检查点,而非仅用于版本控制:
bash
undefinedBad: 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:
- Metadata (~50 tokens) - Always in context, triggers skill loading
- SKILL.md body (<5k words) - Loaded when skill activates
- Bundled resources - Loaded as needed (templates, references, scripts)
This means a 50-skill toolkit only costs ~2,500 tokens until you actually use something.
技能会逐步加载以节省上下文:
- 元数据(约50个Token)- 始终处于上下文中,触发技能加载
- SKILL.md主体(<5000字)- 技能激活时加载
- 捆绑资源 - 按需加载(模板、参考资料、脚本)
这意味着包含50个技能的工具包在实际使用前仅占用约2500个Token。
Skills Teach, Rules Correct
技能传授,规则修正
Two complementary knowledge systems:
| Skills | Rules | |
|---|---|---|
| Location | | |
| Content | Rich bundles | Single markdown files |
| Purpose | Teach how to use X | Correct outdated patterns |
| Example | How to set up Tailwind v4 | Fix v3 syntax Claude might suggest |
Rules are project-portable - they travel with the repo so any Claude instance gets the corrections.
两个互补的知识系统:
| 技能 | 规则 | |
|---|---|---|
| 存储位置 | | |
| 内容 | 丰富的资源包 | 单个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
调试会话
undefinedundefinedIf 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 PM | Context Mate |
|---|---|
| "Follow the methodology" | "She'll be right" |
| "Update the Gantt chart" | |
| "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 |
|---|---|
| "遵循方法论" | "没问题的" |
| "更新甘特图" | |
| "参考RACI矩阵" | "嘿Claude,下一步该做什么?" |
没有繁琐的仪式。无需与AI开站会。没有燃尽图。
如果霍默·辛普森在30秒内搞不懂,那它就太复杂了。
一切都关乎上下文,伙计! 🥄