Claim and complete teamwork tasks (one-shot or continuous loop)
Claims and completes teamwork tasks in one-shot or continuous loop mode
/plugin marketplace add mnthe/hardworker-marketplace/plugin install teamwork@hardworker-marketplace[--project NAME] [--team NAME] [--role ROLE] [--loop] | --helpWorkers claim and complete tasks from a teamwork project. Can run in one-shot mode (default) or continuous loop mode.
Execute the worker setup script:
"${CLAUDE_PLUGIN_ROOT}/scripts/worker-setup.sh" $ARGUMENTS
Parse the output to get:
If no project found: Show error and suggest /teamwork "goal" first.
If --loop mode:
Register loop state for this terminal:
"${CLAUDE_PLUGIN_ROOT}/scripts/loop-state.sh" start "{PROJECT}" "{SUB_TEAM}" "{ROLE}"
Read task files to find available work:
ls {TEAMWORK_DIR}/{PROJECT}/{SUB_TEAM}/tasks/
Count:
If no open tasks:
No open tasks available.
Project complete or all tasks claimed.
Use /teamwork-status to check progress.
ACTION REQUIRED - Call Task tool with:
TEAMWORK_DIR: {teamwork_dir}
PROJECT: {project}
SUB_TEAM: {sub_team}
Options:
- role_filter: {role or null}
Wait for worker to complete using TaskOutput.
Display what happened:
# Task Completed
## Task
{task.subject}
## Status
{resolved or failed}
## Evidence
{list of evidence}
## Progress
{resolved}/{total} tasks complete
If --loop was set and there are more open tasks:
Output the continue marker:
__TEAMWORK_CONTINUE__
The hook reads state from loop-state.sh and triggers the next iteration with saved context.
If no more tasks:
"${CLAUDE_PLUGIN_ROOT}/scripts/loop-state.sh" stop
Exit and report completion.
| Option | Description |
|---|---|
--project NAME | Override project name (default: git repo name) |
--team NAME | Override sub-team name (default: branch name) |
--role ROLE | Only claim tasks with this role |
--loop | Continuous mode - keep claiming tasks |
| Role | Description |
|---|---|
frontend | UI, components, styling |
backend | API, services, database |
test | Tests, fixtures, mocks |
devops | CI/CD, deployment |
docs | Documentation |
security | Auth, permissions |
review | Code review |
# One-shot: complete one task
/teamwork-worker
# Continuous: keep working until done
/teamwork-worker --loop
# Specialized: only frontend tasks
/teamwork-worker --role frontend
# Specialized continuous
/teamwork-worker --role backend --loop
# Specific project
/teamwork-worker --project myapp --team feature-x