Execute assigned task as a parallel worker following workspace rules
Executes assigned coding tasks as a parallel worker following workspace conventions. Use this when you need an AI agent to independently implement features, fix bugs, or make changes while automatically exploring the codebase, following project rules, and creating PRs.
/plugin marketplace add ken2403/.claude-paralell-dev-plugin/plugin install pw@claude-parallel-dev-plugintask descriptionopus$ARGUMENTS
git branch --show-currentpwdbasename $(git rev-parse --show-toplevel 2>/dev/null)Check and follow project-specific CLAUDE.md:
if [ -f "CLAUDE.md" ]; then
echo "=== Project CLAUDE.md ==="
head -100 CLAUDE.md
fi
Detect the base branch from workspace configuration (NOT always main/master):
# Check CLAUDE.md for base branch specification
BASE_BRANCH=""
if [ -f "CLAUDE.md" ]; then
BASE_BRANCH=$(grep -i "base.branch\|default.branch\|primary.branch" CLAUDE.md | head -1 | grep -oE "(main|master|develop|dev|release[^[:space:]]*)" || echo "")
fi
# Fallback: check git remote HEAD or common branches
if [ -z "$BASE_BRANCH" ]; then
BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "")
fi
# Final fallback: check which exists
if [ -z "$BASE_BRANCH" ]; then
for branch in main master develop dev; do
if git show-ref --verify --quiet "refs/heads/$branch" 2>/dev/null; then
BASE_BRANCH="$branch"
break
fi
done
fi
echo "Base branch: ${BASE_BRANCH:-main}"
MANDATORY: Before any implementation, you MUST use subagents:
explorer subagent first to understand the codebase structureanalyzer subagent to assess impactMANDATORY: Use explorer subagent to understand the codebase:
Use explorer subagent to find relevant files and patterns for this task
For complex changes, also use analyzer:
Use analyzer subagent to understand the architecture and dependencies
Key questions to answer:
Before writing any code:
Follow workspace conventions:
Apply Quality Skills:
/pw:code-quality standards (readability, maintainability, error handling)/pw:security-review standards if handling auth, user input, or sensitive dataRun project-specific checks:
# Try common verification commands
if [ -f "Makefile" ] && grep -q "check" Makefile; then
make check
elif [ -f "package.json" ]; then
npm test 2>/dev/null || npm run test 2>/dev/null || true
elif [ -f "pyproject.toml" ]; then
uv run pytest 2>/dev/null || uv run mypy . 2>/dev/null || true
else
echo "No standard check command found - verify manually"
fi
Create atomic commit with conventional message:
git add .
git commit -m "$(cat <<'EOF'
feat: [brief description]
[Detailed description of changes]
- [Change 1]
- [Change 2]
š¤ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
# Push branch
git push -u origin $(git branch --show-current)
# Create PR
gh pr create --title "[type]: [brief description]" --body "$(cat <<'EOF'
## Summary
[What this PR does]
## Changes
- [Change 1]
- [Change 2]
## Testing
- [ ] [Test performed]
## Related Issues
Closes #[issue-number] (if applicable)
---
š¤ Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
When complete, provide:
# Worker Report
## Task Completed
[Description of what was implemented]
## Files Changed
- `path/to/file1` - [What changed]
- `path/to/file2` - [What changed]
## PR Created
- **URL**: [PR URL]
- **Title**: [PR Title]
- **Status**: Ready for review
## Verification
- [ ] Tests pass
- [ ] Lint/type check pass
- [ ] Changes are focused and minimal
## Notes
[Any issues encountered or decisions made]
If blocked: