Delegate independent tasks to specialized agents working concurrently with isolated context.
Work Item Loop
collab-work-item-loop
The core orchestration loop that processes work items one at a time
SKILL.md
Full skill instructions
Work Item Loop
The core orchestration loop that processes work items one at a time.
Step 4: Work Item Loop
4.1 Read Design Doc
cat .collab/<name>/documents/design.md
4.2 Parse Work Items
Use parseWorkItems() helper to extract items from design doc:
- Find all
### Item N:sections - Extract Title, Type, and Status fields
- Return list of work items
See Helper Functions in main collab skill for parseWorkItems() implementation.
4.3 Find First Pending Item
pending_item = items.find(i => i.status == "pending")
If no pending items:
All work items documented. Proceeding to validation...
→ Invoke ready-to-implement skill → END (ready-to-implement takes over)
If pending item found: Continue to 4.4
4.4 Update State
Update collab state via MCP:
Tool: mcp__plugin_mermaid-collab_mermaid__update_session_state
Args: {
"project": "<absolute-path-to-cwd>",
"session": "<session-name>",
"currentItem": <item-number>
}
Note: lastActivity is automatically updated by the MCP tool.
4.5 Route by Type
If type is bugfix:
Processing bugfix: <item-title>
Invoking systematic-debugging for investigation...
→ Invoke skill: collab-compact → Invoke systematic-debugging skill
If type is task:
Processing task: <item-title>
Invoking brainstorming for planning...
→ Invoke skill: collab-compact → Invoke brainstorming skill → After brainstorming completes, invoke skill: collab-compact → After collab-compact completes, invoke task-planning skill
If type is code:
Processing code: <item-title>
Invoking brainstorming for design...
→ Invoke skill: collab-compact → Invoke brainstorming skill → After brainstorming completes, invoke skill: collab-compact → After collab-compact completes, invoke rough-draft skill (includes feature/refactor/spike work)
4.6 Mark Item Documented
After the invoked skill returns, use patch to update the work item status:
Tool: mcp__plugin_mermaid-collab_mermaid__patch_document
Args: {
"project": "<cwd>",
"session": "<name>",
"id": "design",
"old_string": "### Item <N>: <title>\n**Type:** <type>\n**Status:** pending",
"new_string": "### Item <N>: <title>\n**Type:** <type>\n**Status:** documented"
}
This is more efficient than reading and rewriting the entire document.
4.7 Clear Current Item
Update collab state via MCP:
Tool: mcp__plugin_mermaid-collab_mermaid__update_session_state
Args: {
"project": "<absolute-path-to-cwd>",
"session": "<session-name>",
"currentItem": null
}
Note: lastActivity is automatically updated by the MCP tool.
4.8 Continue Loop
→ Go back to Step 4.1 (continue processing next pending item)
More Other skills
brand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
