一键导入
task-folder-migrator
Use when migrating existing single-file tasks to folder-based structure - preserves content, creates organized folders, backs up originals
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when migrating existing single-file tasks to folder-based structure - preserves content, creates organized folders, backs up originals
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when creating Claude Code plugins - covers skills, commands, agents, hooks, MCP servers, and plugin configuration. Use when user says "create plugin", "make a skill", "add command", "add hooks", "skill authoring", "SKILL.md", "plugin components", "package reusable behavior", "distribute skills", "scaffold plugin", "plugin structure", "write a skill description". NOT for: using existing plugins, installing plugins, plugin marketplace browsing. !`ls .claude-plugin/ 2>/dev/null`
Use when starting a new development project — creates memory folder structure with project_state.md (including codePath), architecture scaffolding, and registers project. Accepts optional code_path argument.
Use when checking code quality, running security audits, testing coverage, finding SOLID/DRY violations, or setting up quality tools. Use when user says "audit this code", "check security", "run PHPStan", "code quality", "find violations", "SOLID check", "DRY check", "test coverage", "lint this", "security review", "is this production ready", "check for vulnerabilities", "code review", "grade this code", "watch mode lint", "deep review", "ultrareview", "schedule quality sweep". Supports Drupal (PHPStan, PHPMD, Psalm, Semgrep, Trivy, Gitleaks via DDEV) and Next.js (ESLint, Jest, Semgrep, Trivy, Gitleaks). Use proactively before deployment or after significant code changes.
Use when an orchestrator must run a task's work-orders CONCURRENTLY behind the same gate floor as the sequential loop — the DB-free parallel sibling of work-order-loop. Each round it reconciles from disk (L1-light), selects a disjoint-file ready batch (wo-parallel-batch.sh), builds every batched WO at once in its OWN ephemeral git worktree branched off the integration HEAD (N parallel build atoms in ONE message), runs /review --headless + the work-order-critique rung per worktree, derives every verdict from disk, and merges each CLEAN WO back into the integration branch with a LOCAL git merge (wo-merge-back.sh — NOT a PR merge), pruning each ephemeral worktree after its verdict. The per-WO retry cap stays the SOLE responsibility of wo-run-state.sh dispatch; terminal-HALT precedence, disk-is-truth, and no-auto-merge are preserved verbatim. At the end it runs ONE integrated /review on the integration branch and opens ONE PR through wo-pr-open.sh (re-runs the merge gate, NEVER merges). MUST be invoked inline (ne
Use when an orchestrator must run the autonomous per-task run-loop behind the gate floor — the thin native glue (③ lifecycle_controls). Resumes from disk (L1-light), drives a ready-queue over the work-orders (a WO is ready when all blocked_by are done), dispatches ONE build atom per WO in clean context, runs /review --headless + the work-order-critique rung per WO, owns EVERY WO status transition via wo-compile.sh set-status, bounds the verify→fix loop with a crash-safe retry cap (wo-run-state.sh), and at the end opens a PR through the wo-pr-open.sh choke point that re-runs the merge gate and NEVER merges. Reads every decision from disk; treats builder transcripts as untrusted data; honors a budget/kill-switch call-site. MUST be invoked inline (never Task-dispatched). Prints a ready-to-paste /goal string; never runs /goal itself.
Use when an orchestrator must run the opt-in adversarial-critique rung on ONE built work-order — the absent-human review layered ABOVE the deterministic gates. Derives the work-order's risk tier (wo-risk-classify.sh), decides whether critique is required (forced-on for high-risk-unattended; else the per-task/per-project dial), spawns risk-scaled INDEPENDENT fresh-context wo-critic agents that re-derive the verdict from artifacts (git diff + gate envelopes), aggregates fail-closed (wo-critique-aggregate.sh) into a per-WO _critique.json, and writes a wo-NN.HALT marker when blocking. Fan-out is the unattended primitive; never edits /review's _review.json. A judgment layer, not a gate — gates always run first.
| name | task-folder-migrator |
| description | Use when migrating existing single-file tasks to folder-based structure - preserves content, creates organized folders, backs up originals |
| version | 3.0.0 |
| user-invocable | false |
Migrate single-file tasks to the new v3.0.0 folder-based structure.
Activate when:
/ai-dev-assistant:migrate-tasks (manual mode)project-orchestrator when old format detected (automatic mode)Automatic Mode (when invoked by /next command):
/next and old format detectedManual Mode (when invoked by /migrate-tasks command):
Converts old-style single-file tasks into new folder structure:
Old Structure (v2.x):
implementation_process/in_progress/
└── settings_form.md # Everything in one file
New Structure (v3.0.0):
implementation_process/in_progress/settings_form/
├── task.md # Tracker with links
├── research.md # Phase 1 content
├── architecture.md # Phase 2 content
└── implementation.md # Phase 3 content
Check if invoked automatically or manually:
project-orchestrator agent (context includes automatic=true)/migrate-tasks command or user requestSet $automatic = true/false based on invocation context.
Get project path from project_state.md or ask user:
Where are your task files located?
Default: {cwd}/implementation_process/in_progress/
Use Glob to find single .md files:
{project_path}/implementation_process/in_progress/*.md
If no .md files found, report: "No old-style tasks found. All tasks already using v3.0.0 structure."
If Automatic Mode ($automatic = true):
Show brief message and proceed immediately:
Found {N} task(s) in v2.x format.
Auto-migrating: {list of task names}
Skip to Step 4 (no confirmation needed).
If Manual Mode ($automatic = false):
Show full migration plan and wait for confirmation:
## Tasks to Migrate
Found {N} task(s) in old format:
1. settings_form.md
2. content_entity.md
3. field_formatter.md
Proceed with migration? (Creates backups with .bak extension)
Wait for user confirmation. If user declines, exit gracefully.
For each task file:
Use Read on {task_name}.md to load full content.
Extract content by searching for markdown headers:
## Research or ## Phase 1 and next ## header## Architecture or ## Phase 2 and next ## header## Implementation or ## Phase 3 and next ## headerUse Bash to create directory:
mkdir -p "{project_path}/implementation_process/in_progress/{task_name}"
1. Create task.md (Tracker):
Use Write to create {task_name}/task.md:
# Task: {task_name}
**Created:** {original_date or today}
**Current Phase:** {detect from content}
## Goal
{extract from original Goal section}
## Phase Status
- [{x if research exists}] Phase 1: Research → See [research.md](research.md)
- [{x if architecture exists}] Phase 2: Architecture → See [architecture.md](architecture.md)
- [{x if implementation exists}] Phase 3: Implementation → See [implementation.md](implementation.md)
## Acceptance Criteria
{extract from original Acceptance Criteria section}
## Related Tasks
{extract from original Related Tasks section}
## Notes
{extract from original Notes section}
2. Create research.md (if content exists):
If Research section found, use Write to create {task_name}/research.md:
# Research: {task_name}
{paste Research section content here}
3. Create architecture.md (if content exists):
If Architecture section found, use Write to create {task_name}/architecture.md:
# Architecture: {task_name}
{paste Architecture section content here}
4. Create implementation.md (if content exists):
If Implementation section found, use Write to create {task_name}/implementation.md:
# Implementation: {task_name}
{paste Implementation section content here}
Use Bash to rename original file:
mv "{project_path}/implementation_process/in_progress/{task_name}.md" \
"{project_path}/implementation_process/in_progress/{task_name}.md.bak"
After migrating all tasks, report:
## Migration Complete ✓
Migrated {N} task(s) to v3.0.0 structure:
1. settings_form/ ✓
- task.md
- research.md
- architecture.md
- Backup: settings_form.md.bak
2. content_entity/ ✓
- task.md
- research.md
- Backup: content_entity.md.bak
Original files backed up with .bak extension.
**Next Steps:**
1. Verify migrated tasks: Check {project_path}/implementation_process/in_progress/
2. Delete backups when confident: rm *.md.bak
| Situation | Handling |
|---|---|
| No sections found | Create task.md only with all content |
| Task already migrated | Skip, report "already v3.0.0 format" |
| Empty sections | Don't create file for that phase |
| Backup file exists | Append timestamp: {task}.md.bak.{timestamp} |
| Permission error | Report error, skip task, continue |
In Manual Mode, STOP and ask user if:
In Automatic Mode, proceed but log warnings: