api-design
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
Capture a snapshot of the current session — tool sequences, files touched, corrections, and context
$ npx -y skills add Tibsfox/gsd-skill-creator --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/observeContext preview
What this command does when you run it.
Capture a snapshot of the current session — tool sequences, files touched, corrections, and context
name: sc:observe description: Capture a snapshot of the current session — tool sequences, files touched, corrections, and context allowed-tools: - Read - Write - Bash - Glob
<objective> Capture a point-in-time snapshot of the current session by reconstructing activity from git history and existing session data. Display tool sequences, files touched, corrections detected, and session metrics. Optionally append the observation to sessions.jsonl for pattern detection. </objective>
<process>
Read `.planning/skill-creator.json` using the Read tool. Check the `integration.observe_sessions` field.
> Session observation is disabled in config. Enable `observe_sessions` in `.planning/skill-creator.json` to capture observations. Then stop.
Since Claude does not have persistent memory between tool calls, reconstruct the session state from available artifacts.
Run via Bash:
git log --oneline -20 --since="8 hours ago"
Extract: commit count, commit types (conventional prefix before `:` or `(`), and messages.
Run via Bash:
git diff --name-only HEAD~10..HEAD 2>/dev/null | sort -u
Also run:
git status --short
Combine into a deduplicated list. Note which files have uncommitted changes.
Read `.planning/patterns/sessions.jsonl` using the Read tool.
Look for patterns in recent commits that suggest corrections:
This is heuristic, not exact. Report what is found or "No correction patterns detected."
Read `.planning/STATE.md` using the Read tool. Extract:
Display all gathered data as a structured observation:
## Session Observation Snapshot **Captured:** [ISO 8601 timestamp] **GSD Context:** Phase [N] -- [name], Plan [M] ### Tool Sequences (last 8h) [commit type sequence: feat -> test -> fix -> feat] [or] No commits in the last 8 hours. ### Files Touched ([N] files) - [file1] (modified in [N] commits) - [file2] (new) - [file3] (uncommitted changes) ### Corrections Detected - [file]: feat -> fix pattern (possible bug fix after implementation) - [or] No correction patterns detected ### Session Metrics - Commits: [N] - Files changed: [N] - Dominant commit type: [type] - Session duration estimate: [first commit time] to [last commit time]
Ask the user: "Append this observation to sessions.jsonl? (yes/no)"
If yes, construct a JSON entry:
{
"type": "observation",
"timestamp": "[ISO 8601]",
"source": "manual",
"phase": [N or null],
"tool_sequences": ["feat", "test", "fix"],
"files_touched": ["file1", "file2"],
"corrections": [N],
"commits": [N],
"duration_minutes": [M]
}Append to `.planning/patterns/sessions.jsonl` via Bash:
echo '<compact JSON>' >> .planning/patterns/sessions.jsonl
If `.planning/patterns/` does not exist, create it first:
mkdir -p .planning/patterns
**Important:** This command is inherently heuristic. It reconstructs session activity from git history and JSONL data. Tool calls that did not result in commits will not be captured. This is a known limitation.
</process>
<success_criteria>
</success_criteria>
An adaptive learning and coprocessor architecture for Claude Code, built as an extension to GSD (open-gsd)
Repo: Tibsfox/gsd-skill-creator
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
Reviews code for bugs, style, and best practices. Use when reviewing PRs or checking code quality.
Creates context handoff documents for session continuity. Use when ending sessions, switching tasks, or handing off work.
Thinking frameworks for decisions and problem analysis. Use when evaluating options, root causes, or prioritizing.
Environment configuration and secrets management. Use when setting up .env files, managing secrets, or configuring environments.
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.