用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/opencobra/cobratoolbox --skill speckit-agent-assign-assign命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Execute tasks by spawning the assigned agent for each task
Validate that all agent assignments are correct and agents exist
Orchestrate GitHub Spec Kit's core commands as bundled, human-gated phases tailored to Claude/Cowork. Use when the user wants semi-automated spec-driven development: requirements preparation, implementation preparation, an explicit approval gate before any source-code change, scoped implementation, then verification and closeout. This skill embeds and invokes the installed core Spec Kit skills (constitution, specify, clarify, checklist, plan, tasks, analyze, implement) rather than replacing them. It uses Claude-native affordances: AskUserQuestion for gates, the task list for progress, the MATLAB MCP server for verification, and subagents for independent review.
基于 SOC 职业分类
正在显示 SKILL.md
| name | speckit-agent-assign-assign |
| description | Scan available Claude Code agents and assign them to tasks in tasks.md |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"agent-assign:commands/assign.md"} |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Setup: Run .specify/scripts/bash/check-prerequisites.sh --json --require-tasks from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot").
Scan Agent Definitions: Discover all available Claude Code agent definition files following the official hierarchy. Higher-priority levels override lower-priority agents with the same name.
Scanning priority order (highest to lowest):
.claude/agents/*.md in the repository root~/.claude/agents/*.md in the user's home directoryFor each agent file found:
name (filename without .md if not in frontmatter) and descriptionBuild an Agent Registry table:
| # | Agent Name | Source | Description |
|---|-----------------|---------|------------------------------------------|
| 1 | backend-dev | project | Backend development specialist |
| 2 | frontend-dev | project | Frontend React/TypeScript specialist |
| 3 | test-writer | user | Unit and integration test author |
If no agent definition files are found at any level, STOP and report: "No agent definition files found at any hierarchy level. Since there are no specialized agents available, it is recommended to use /speckit.implement directly for task execution."
Load Tasks: Read tasks.md from FEATURE_DIR. Parse each task line following the checklist format:
- [ ] [TaskID] [P?] [Story?] Description with file path
Extract: Task ID, parallel marker, story label, description, and file paths mentioned.
Auto-Match Agents to Tasks: For each task, analyze its description and file paths against each agent's description and capabilities. Consider:
src/api/ → API agent, src/models/ → backend agent, tests/ → test agent)Produce a proposed assignment for every task. If no agent is a good fit, assign default.
Present Assignments for Confirmation: Display a summary table of all proposed assignments:
| Task ID | Description (truncated) | Assigned Agent | Reason |
|---------|----------------------------------|-----------------|---------------------------|
| T001 | Create project structure... | default | General setup task |
| T002 | Implement User model in src/... | backend-dev | Data model creation |
| T003 | Write API endpoint in src/api/... | backend-dev | API implementation |
| T004 | Create React component in src/... | frontend-dev | UI component development |
| T005 | Write unit tests for... | test-writer | Test authoring |
Ask the user: "Review the proposed agent assignments above. You can:
Wait for user response. Apply any requested changes before proceeding.
Write Agent Assignments File: Generate agent-assignments.yml in FEATURE_DIR with the following structure:
# Agent Assignments
# Feature: <feature-name from plan.md or branch name>
# Generated: <timestamp>
# Command: /speckit.agent-assign.assign
agents_scanned:
- name: "backend-dev"
source: "project"
description: "Backend development specialist"
- name: "frontend-dev"
source: "project"
description: "Frontend React/TypeScript specialist"
assignments:
T001:
agent: "default"
reason: "General setup task, no specialized agent needed"
T002:
agent: "backend-dev"
reason: "Task involves data model creation, matches backend-dev capabilities"
T003:
agent: "backend-dev"
reason: "API endpoint implementation aligns with backend-dev skills"
Write this file to FEATURE_DIR/agent-assignments.yml.
Report: Output a summary:
agent-assignments.ymldefault/speckit.agent-assign.validate to verify assignmentsNote: This command requires tasks.md to exist. If it does not exist, suggest running /speckit.tasks first.