import
npx machina-cli add skill skullninja/coco-workflow/import --openclawCoco Import Skill
Import a tasks.md into the coco tracker and optionally create matching issues in the configured issue tracker.
When to Use
- Importing tasks as part of the coco pipeline
- Called by
/coco:phase(Step D) or/coco:planning-session tactical - When tasks.md exists in
specs/{feature}/and needs to be loaded into the tracker
Prerequisites: tasks.md must exist. If missing, use the tasks skill first.
Prerequisites
- Completed
specs/{feature}/tasks.mdwith sub-phases and dependency info .coco/config.yamlexists with project configuration
Setup
- Read
.coco/config.yamlforproject.specs_dirandissue_trackerconfig. - Determine the current feature by:
- Checking the current git branch name
- Strip the
feature/prefix (or whateverpr.branch.feature_prefixis) from the branch name - Looking for the matching directory in
{specs_dir}/{stripped-name}/ - Or from conversation context if a feature was recently discussed
- Read
{specs_dir}/{feature}/tasks.md(required). If missing, instruct user to use thetasksskill first. - Each tracker command is a separate Bash tool call:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" <command> [args]
Execution
Step 1: Parse tasks.md
Extract:
- Feature name from the
# Tasks:header - Sub-Phases -- each
## Sub-Phase N:section becomes a tracker task - Parallel markers --
[P]tasks within a sub-phase - Dependencies -- parse "Dependencies & Execution Order" section
Step 2: Create Tracker Epic
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" epic-create "{feature-name}"
Step 3: Create Tracker Tasks (one per sub-phase)
IMPORTANT: All bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" create arguments MUST be single-line. Never put literal newlines inside --description, --title, or --metadata values. Use semicolons or commas to separate items within a description. Put each command on one line (no \ continuations).
For each sub-phase:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" create --epic "{epic-id}" --title "Sub-Phase {N}: {title}" --description "{single-line summary; task list}" --priority {priority} --metadata '{"sub_phase": N, "issue_key": null, "feature_branch": "{current-branch-name}"}'
If tasks.md includes owns_files annotations (file ownership per sub-phase), include them in metadata:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" create --epic "{epic-id}" --title "Sub-Phase {N}: {title}" --description "{single-line summary; task list}" --priority {priority} --metadata '{"sub_phase": N, "issue_key": null, "feature_branch": "{current-branch-name}", "owns_files": ["src/auth/**", "tests/auth/**"]}'
Step 4: Set Dependencies
For each dependency (one Bash tool call per dep-add):
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" dep-add {phase-1-id} --blocks {phase-2-id}
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" dep-add {phase-2-id} --blocks {phase-3-id}
Repeat for all user stories blocking Polish, etc.
Step 5: Issue Tracker Bridge
Read .coco/config.yaml issue_tracker.provider:
If "linear":
-
Create project:
Use: mcp__plugin_linear_linear__create_project Parameters: name: "{feature-name}" team: {from config issue_tracker.linear.team} summary: "{feature description from design.md}" labels: {from config issue_tracker.linear.labels} -
Create one issue per sub-phase:
Use: mcp__plugin_linear_linear__create_issue Parameters: title: "Sub-Phase {N}: {title}" description: "{purpose}\n\n## Tasks\n{checkbox list}" team: {from config} project: "{project-id}" labels: {from config} -
Store issue keys in tracker metadata:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" update {task-id} --metadata '{"issue_key": "{ISSUE-KEY}"}'
If "github":
Read issue_tracker.github.use_projects from config (default: true).
If Projects V2 enabled (use_projects: true):
-
Create a GitHub Project for the feature:
gh project create --owner {github.owner} --title "{feature-name}" --format jsonCapture the project number from output.
-
Link the project to the repository:
gh project link {project_number} --owner {github.owner} --repo {github.repo} -
Resolve Status field and option IDs:
gh project field-list {project_number} --owner {github.owner} --format jsonFind the "Status" field. Extract
field_idand option IDs for each status value (Todo, In Progress, In Review, Done). -
Cache project metadata to
.coco/state/gh-projects.json:{ "features": { "{feature-name}": { "project_number": {N}, "project_id": "PVT_...", "status_field_id": "PVTSSF_...", "status_options": { "Todo": "opt-id-1", "In Progress": "opt-id-2", "In Review": "opt-id-3", "Done": "opt-id-4" } } } }Ensure
.coco/state/directory exists. Ifgh-projects.jsonalready exists, merge into thefeatureskey. -
Create issues and add to project. Run each sub-phase as separate Bash tool calls (no loops).
IMPORTANT
gh issue createrules:- Use
--body-file - <<'EOF'for issue bodies (NOT--body "$(cat <<'EOF'...)"which triggers permission prompts) - Do NOT include
--repo—ghdetects the repo automatically when run from within it
a. Create the issue:
gh issue create --title "Sub-Phase {N}: {title}" --label {labels} --body-file - <<'EOF' {description} EOFb. Add issue to project (capture the item ID from output):
gh project item-add {project_number} --owner {github.owner} --url {issue_url}c. Set initial status to "Todo":
gh project item-edit --project-id {project_id} --id {item_id} --field-id {status_field_id} --single-select-option-id {status_options["Todo"]}d. Store issue number and project item ID in tracker metadata:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" update {task-id} --metadata '{"issue_key": "#{N}", "gh_project_item_id": "{item_id}", "gh_project_number": {project_number}}'Repeat steps a-d for each sub-phase. Steps a-d for a single sub-phase depend on each other (run sequentially), but separate sub-phases are independent.
- Use
If Projects V2 disabled (use_projects: false):
-
Create issues using
gh:gh issue create --title "Sub-Phase {N}: {title}" --label {labels} --body-file - <<'EOF' {description} EOF -
Store issue numbers in tracker metadata:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" update {task-id} --metadata '{"issue_key": "#{N}"}'
If "none":
Skip issue creation. Log "Issue tracker bridge skipped."
Step 6: Verify (GATE)
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" epic-status {epic-id}
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" list --json --epic {epic-id}
All must pass:
- Every tracker task exists with correct dependencies
- If issue tracker configured: every task has
issue_keyin metadata - Dependencies match sub-phase ordering from tasks.md
Step 7: Report
Output:
- Epic ID and name
- Number of tasks created
- Dependency graph summary
- Issue tracker project/issues (if applicable)
- First available task:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" ready --json --epic {epic-id} - Suggested next step (explain both options to the user):
/coco:execute-- Runs one task at a time, pausing after each for you to review. Best when you want to stay hands-on, inspect changes between tasks, or are working on something unfamiliar./coco:loop-- Runs all tasks autonomously in sequence with circuit-breaker protection (stops after repeated failures). Best when you're confident in the design and want to let Claude work through the epic unattended.
Design-Only Mode (Light Tier)
When tasks.md doesn't exist but design.md does (light-tier feature):
- Read the design from
{specs_dir}/{feature}/design.md(legacy fallback:spec.md) - Create a single-task epic directly from the design:
bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" epic-create "{feature-name}"bash "${CLAUDE_PLUGIN_ROOT}/lib/tracker.sh" create --epic "{epic-id}" --title "{feature-name}: {design overview}" --description "{single-line acceptance criteria}" --metadata '{"issue_key": null, "feature_branch": "{current-branch-name}", "light_tier": true}' - No dependencies to set (single task)
- Run issue tracker bridge (Step 5) as normal -- creates one issue
- Run verification (Step 6) and report (Step 7) as normal
Design-only mode is triggered by:
/coco:planning-session tacticalrouting to Light tier/coco:phaseclassifying the feature as Light tier- Explicit request when tasks.md is missing and design.md exists
Dry Run Mode
If the conversation context indicates a dry run is desired:
- Print what would be created (tasks, deps, issues)
- Show dependency graph as ASCII
- Ask for confirmation before proceeding
Source
git clone https://github.com/skullninja/coco-workflow/blob/main/skills/import/SKILL.mdView on GitHub Overview
Imports a tasks.md into the coco tracker as an epic with sub-phases and dependencies. It then optionally creates matching issues in the configured external issue tracker to keep planning artifacts synced. This enables end-to-end planning—from feature tasks to tracked issues—within Coco and across the issue tracker.
How This Skill Works
The skill reads .coco/config.yaml to locate project and issue tracker settings, determines the current feature from the git branch and specs directory, and reads specs/{feature}/tasks.md. It creates an epic via tracker.sh epic-create, then creates one tracker task per sub-phase with single-line titles and descriptions, including metadata like sub_phase and feature_branch. It applies dependencies using dep-add for any listed in the Dependencies & Execution Order section and, if an issue tracker is configured, bridges sub-phases to issues, storing issue keys in tracker metadata.
When to Use It
- Importing tasks as part of the coco pipeline
- Called by /coco:phase (Step D) or /coco:planning-session tactical
- When tasks.md exists in specs/{feature}/ and needs to be loaded into the tracker
- After completing specs/{feature}/tasks.md with sub-phases and dependencies
- When you want a synchronized bridge to the configured external issue tracker
Quick Start
- Step 1: Read .coco/config.yaml to confirm project.specs_dir and issue_tracker settings
- Step 2: Ensure specs/{feature}/tasks.md exists and then run the import flow to create the epic and sub-phase tasks
- Step 3: If configured, review the created issues in the external tracker and verify dependencies map to dep-add relationships
Best Practices
- Ensure specs/{feature}/tasks.md exists and contains a proper # Tasks: header and all sub-phases
- Keep sub-phase titles concise since they become tracker titles (Sub-Phase N: ... )
- Validate the Dependencies & Execution Order section before running to apply correct dep-adds
- Use single-line descriptions for tracker.create inputs; avoid newlines inside --description
- Verify metadata like feature_branch and owns_files are accurate; include owns_files when available
Example Use Cases
- Auth service: Import specs/auth/tasks.md to create an epic with 3 sub-phases (Login, Token refresh, Security review) and dependencies between stages
- Checkout flow: Load specs/checkout/tasks.md to model cart, payment, and order confirmation; enforce blocking relationships
- User onboarding: Import specs/user-onboarding/tasks.md to track welcome flow, profile setup, and email verification across sub-phases
- API refactor: Import specs/api-refactor/tasks.md to capture technical tasks and dependencies during a backend clean-up
- Mobile feature: Import specs/mobile/tasks.md for a feature split across front-end screens with an issue-tracker bridge configured