.agents/skills/oat-project-capture/SKILL.md
Use when work happened outside the OAT project workflow and needs retroactive project tracking. Creates a full project from an existing branch and conversation context.
npx skillsauth add tkstang/open-agent-toolkit oat-project-captureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Retroactively create an OAT project from work that happened outside the structured workflow. Populates discovery.md from conversation context and implementation.md from commit history, producing a tracked project ready for review or PR.
Use when:
Don't use when:
oat-project-reconcile insteadoat-project-quick-start or oat-project-newoat-project-reconcileOAT MODE: Capture
Purpose: Analyze existing commits and conversation context to create retroactive project artifacts. No new implementation code — only artifact population and state updates.
BLOCKED Activities:
plan.md template is acceptable)ALLOWED Activities:
oat project newdiscovery.md from conversation contextimplementation.md from commit historySelf-Correction Protocol: If you catch yourself:
plan.md → STOP (the scaffold template is fine, but don't write retroactive plan tasks)Recovery:
discovery.md and implementation.md from existing workWhen executing this skill, provide lightweight progress feedback so the user can tell what's happening after they confirm.
Print a phase banner once at start using horizontal separators, e.g.:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ OAT ▸ CAPTURE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Before multi-step work, print step indicators with the [N/N] format:
[1/7] Resolving branch context…[2/7] Inferring project name…[3/7] Analyzing branch commits…[4/7] Scaffolding project…[5/7] Synthesizing discovery from conversation…[6/7] Capturing implementation from commits…[7/7] Setting lifecycle state + refreshing dashboard…Resolve project root and detect branch context:
PROJECTS_ROOT="${OAT_PROJECTS_ROOT:-$(oat config get projects.root 2>/dev/null || echo ".oat/projects/shared")}"
PROJECTS_ROOT="${PROJECTS_ROOT%/}"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# Try main, then master, then remote HEAD as base
BASE_BRANCH=$(git rev-parse --verify main 2>/dev/null && echo main || (git rev-parse --verify master 2>/dev/null && echo master || git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}'))
COMMIT_COUNT=$(git rev-list --count "${BASE_BRANCH}..HEAD")
Validate:
COMMIT_COUNT is 0, inform the user: "No commits found beyond {BASE_BRANCH}. There's nothing to capture yet."main or master, warn: "You're on the base branch. Switch to a feature branch before capturing."Propose a project name based on conversation context — what was accomplished, not the branch name. The branch name is often a slug of the first message and doesn't reflect the actual work.
Process:
add-retry-middleware, fix-auth-token-refresh).AskUserQuestion:
Validate:
{PROJECTS_ROOT}/{name} does not already exist.Run branch analysis to understand scope:
git log --oneline "${BASE_BRANCH}..HEAD"
git diff --stat "${BASE_BRANCH}..HEAD"
git diff --name-only "${BASE_BRANCH}..HEAD"
Capture:
Store this analysis for use in Steps 4 and 5.
Create the project using the standard scaffolder:
oat project new "{name}" --mode quick
Then update state.md frontmatter to reflect capture-specific metadata:
oat_workflow_mode: quickoat_workflow_origin: capturedoat_phase: implementoat_phase_status: in_progressoat_hill_checkpoints: []oat_project_state_updated: "{ISO 8601 UTC timestamp}"Populate discovery.md from conversation context — this is the primary value of capture. The agent has context about why the work was done that commits alone can't provide.
Required sections to populate:
Populate if applicable:
Update frontmatter:
oat_status: completeoat_generated: trueoat_last_updated: {today}User validation: After drafting, present a summary of the discovery content to the user via AskUserQuestion:
If adjustments needed, ask what to change and update accordingly.
Populate implementation.md from commit history and conversation context.
Task creation strategy:
For each task, populate:
Status: completedCommit: {sha} (latest commit in the group)Outcome: 2-5 bullets describing what changed (behavior-level, not line-level)Files changed: list with purpose annotationVerification: test command + result (if tests were part of the task)Populate the Progress Overview table with phase/task counts (all completed).
Populate the Final Summary section:
Update frontmatter:
oat_status: complete (if all work is done) or in_progress (if still working)oat_current_task_id: null (if complete) or next task IDoat_generated: trueoat_last_updated: {today}Ask the user via AskUserQuestion:
If ready for review:
Update state.md:
oat_phase: implementoat_phase_status: completeoat_project_state_updated: "{ISO 8601 UTC timestamp}"Update implementation.md:
oat_status: completeoat_current_task_id: nullIf still in progress:
Update state.md:
oat_phase: implementoat_phase_status: in_progressoat_project_state_updated: "{ISO 8601 UTC timestamp}"Update implementation.md:
oat_status: in_progressoat state refresh
Print a summary:
Project captured: {name}
Branch: {branch}
Commits: {count}
Discovery: populated from conversation context
Implementation: {task_count} tasks across {phase_count} phase(s)
Status: {ready for review | in progress}
Suggest next actions based on lifecycle state:
oat-project-review-provide — run a self-review before sharingoat-project-pr-final — create a PR directlyoat-project-reconcile for new commits/oat-project-capture
We've been working on this retry middleware for the last hour. Let's capture this as a project so I can review it from my laptop later.
I did some work on the auth flow in a mobile session. Can you create a project from what we did?
oat_workflow_origin: captureddiscovery.md captures the "why" from conversation context, not just the "what" from commitsimplementation.md reflects actual work done with commit SHAsplan.md is acceptable)documentation
Use when OAT implementation changes and repository reference docs must be synchronized. Updates .oat/repo/reference to match current behavior.
business
Merge multiple analysis artifacts into a single coherent report with provenance tracking. Reads existing artifacts from /deep-research, /analyze, and /compare.
testing
Use when the user questions or suspects an agent claim is wrong. Adversarially gathers evidence to verify or refute the claim using the best sources available in the current environment.
tools
Use when prioritizing backlog work or evaluating a roadmap. Produces value-effort ratings, dependency mapping, and execution recommendations.