AgentSkillsCN

workbench

当用户请求“跟踪项目”“开始工作会话”“从上次中断处继续”“切换会话”“列出我的项目”“展示我的工作台”“我在做什么”时,或讨论项目/会话编排时,应使用此技能。

SKILL.md
--- frontmatter
name: workbench
version: "0.1.0"
description: This skill should be used when the user asks to "track a project", "start a work session", "resume where I left off", "switch sessions", "list my projects", "show my workbench", "what am I working on", or discusses project/session orchestration.
user-invocable: true
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Glob
  - Grep

Project Workbench Skill

A skill for managing project registries and work sessions across multiple workspaces, with support for parallel sessions and session resume.

Configuration

The workbench registry is stored at ~/.claude/skills/project-workbench/workbench.json.

Read it before any operation:

bash
cat ~/.claude/skills/project-workbench/workbench.json

User Commands

CommandDescription
/workbenchShow dashboard with all projects and active sessions
/workbench add <name>Register a new project
/workbench add-dir <project> <label> <path>Add a workspace directory to a project
/workbench start <project> [options]Start a new work session
/workbench listList sessions (filter: --project, --status)
/workbench list projectsList all registered projects
/workbench switch <session_id>Switch to a different session (pauses current)
/workbench resume [session_id]Resume a paused session (default: most recent)
/workbench pause [--summary "..."]Pause current session with summary
/workbench done [--summary "..."]Mark session as done
/workbench archive <target>Archive a project or session
/workbench syncSync workbench.json to git

How to Use This Skill

Step 1: Read Registry

Always start by reading the workbench registry:

bash
cat ~/.claude/skills/project-workbench/workbench.json

If the file does not exist, create it by running:

bash
bash ~/.claude/skills/project-workbench/scripts/init-workbench.sh

Step 2: Parse Command

Parse the user's /workbench invocation to determine the sub-command and arguments.

Step 3: Execute Operation

Dashboard (/workbench)

  1. Read workbench.json
  2. For each project with status != "archived":
    • Count active/paused sessions
    • List workspace_dirs
  3. Print a formatted dashboard showing projects and their active sessions

Format:

code
  PROJECT-NAME (status)  ·  N workspaces  ·  N active sessions
  |- ses_..HHMM  [tool]  dir-label  "intent text"
  \- ses_..HHMM  [tool]  dir-label  "intent text"

Add Project (/workbench add <name>)

  1. Ask user for: description, workspace directories (label:path pairs), repo URL (optional)
  2. Generate slug from name (lowercase, hyphenated)
  3. Get timestamp: date -u +%Y-%m-%dT%H:%M:%SZ
  4. Create project entry in workbench.json with status "active"
  5. Write updated workbench.json

Add Workspace Dir (/workbench add-dir <project> <label> <path>)

  1. Validate project exists
  2. Add label: path to project's workspace_dirs
  3. Write updated workbench.json

Start Session (/workbench start <project>)

Options: --dir <label>, --tool <tool>, --intent "<text>", --branch <branch>

  1. Validate project exists and is active
  2. If --intent not provided, ask user what they plan to work on
  3. Generate session ID using date: ses_$(date +%Y%m%d_%H%M%S)
  4. Default --tool to claude-code if not specified
  5. Create session object, append to project.sessions[]
  6. Write updated workbench.json
  7. Print session context

Resume Session (/workbench resume [session_id])

  1. If no session_id, find most recent paused session (by updated timestamp, across all projects)
  2. Load session data
  3. Set status -> "active", update timestamp using date -u +%Y-%m-%dT%H:%M:%SZ
  4. Print full context block:
    • Project name, workspace dir path, intent, last summary
    • Branch, open files, next steps (if set)
  5. Write updated workbench.json
  6. This context block gives Claude Code / Codex enough info to continue

Switch Session (/workbench switch <session_id>)

  1. Find current active session (if any) and auto-pause it
    • If no summary set, note "auto-paused, no summary captured"
  2. Find target session, set status -> "active"
  3. Print resume context for target session
  4. Write updated workbench.json

Pause / Done (/workbench pause|done)

  1. Find current active session
  2. If --summary provided, use it; otherwise ask user for 1-3 sentence summary
  3. Set status -> "paused" (or "done")
  4. Update timestamp using date -u +%Y-%m-%dT%H:%M:%SZ
  5. Optionally ask for next_steps
  6. Write updated workbench.json

List Sessions (/workbench list)

Options: --project <slug>, --status <status>

  1. Read workbench.json
  2. Filter sessions by project and/or status
  3. Print table: ID | Project | Status | Tool | Dir | Intent

List Projects (/workbench list projects)

  1. Read workbench.json
  2. Print table: Slug | Name | Status | Workspaces | Active Sessions

Archive (/workbench archive <target>)

  1. Find project or session by slug/id
  2. Set status -> "archived"
  3. Write updated workbench.json

Sync (/workbench sync)

  1. Read config to check if a sync remote is configured
  2. cd to the directory containing workbench.json
  3. git add workbench.json && git commit -m "workbench sync $(date +%Y-%m-%d %H:%M)" && git push

Step 4: Write Back

After every mutation, write the updated workbench.json back to disk using the Write tool.

IMPORTANT: Use date command for all timestamps. Never guess or make up times.

Summary Guidelines

Summaries must be:

  • 1-3 sentences max -- high-level, not granular
  • Outcome-oriented -- what was accomplished or what state things are in
  • Actionable -- mention what's next if relevant

Good: "Implemented OAuth2 token refresh. Login flow works end-to-end. Logout endpoint still needs wiring up." Bad: "Edited oauth2.ts lines 45-120, added refreshToken function, modified token-store.ts..."

Session Object Schema

jsonc
{
  "id": "ses_20260209_143000",               // deterministic: ses_YYYYMMDD_HHMMSS
  "project": "openclaw",
  "status": "active",                        // active | paused | done | archived
  "tool": "claude-code",                     // claude-code | codex | cursor | manual
  "workspace_dir": "server",                 // key from project.workspace_dirs
  "created": "2026-02-09T14:30:00Z",
  "updated": "2026-02-09T16:45:00Z",
  "intent": "Implement OAuth2 flow for SSO",
  "summary": "",                             // filled on pause/done
  "branch": "",                              // optional: git branch
  "open_files": [],                          // optional: breadcrumbs for resume
  "blockers": [],                            // optional
  "next_steps": ""                           // optional: filled on pause/done
}

Integration with memo Skill

  • project-workbench handles what project/session am I in (orchestration)
  • memo handles what did I learn/decide/do (documentation)
  • They share the same project slug namespace
  • A session's intent and summary are NOT duplicated in memo -- they serve different purposes