github-swarm-pr-1-pr-based-swarm-creation

Sub-skill of github-swarm-pr: 1. PR-Based Swarm Creation (+7).

5 stars

Best use case

github-swarm-pr-1-pr-based-swarm-creation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of github-swarm-pr: 1. PR-Based Swarm Creation (+7).

Teams using github-swarm-pr-1-pr-based-swarm-creation should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/1-pr-based-swarm-creation/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/development/github/github-swarm-pr/1-pr-based-swarm-creation/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/1-pr-based-swarm-creation/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How github-swarm-pr-1-pr-based-swarm-creation Compares

Feature / Agentgithub-swarm-pr-1-pr-based-swarm-creationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of github-swarm-pr: 1. PR-Based Swarm Creation (+7).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 1. PR-Based Swarm Creation (+7)

## 1. PR-Based Swarm Creation


```bash
# Get comprehensive PR data
PR_DATA=$(gh pr view 123 --json title,body,labels,files,additions,deletions,reviews)
PR_DIFF=$(gh pr diff 123)

# Analyze PR complexity for swarm topology
ADDITIONS=$(echo "$PR_DATA" | jq '.additions')
DELETIONS=$(echo "$PR_DATA" | jq '.deletions')
TOTAL_CHANGES=$((ADDITIONS + DELETIONS))

# Determine topology based on size
if [ $TOTAL_CHANGES -gt 500 ]; then
  TOPOLOGY="hierarchical"
  MAX_AGENTS=8
elif [ $TOTAL_CHANGES -gt 100 ]; then
  TOPOLOGY="mesh"
  MAX_AGENTS=5
else
  TOPOLOGY="ring"
  MAX_AGENTS=3
fi

echo "PR #123: $TOTAL_CHANGES changes, using $TOPOLOGY topology with $MAX_AGENTS agents"
```


## 2. Multi-Agent PR Review


```bash
# Get changed files by type
FILES=$(gh pr view 123 --json files --jq '.files[].path')

# Categorize files for agent assignment
JS_FILES=$(echo "$FILES" | grep -E '\.(js|ts|tsx)$' || true)
PY_FILES=$(echo "$FILES" | grep -E '\.py$' || true)
TEST_FILES=$(echo "$FILES" | grep -E '(test|spec)\.' || true)
CONFIG_FILES=$(echo "$FILES" | grep -E '\.(json|yaml|yml)$' || true)

# Generate comprehensive review
REVIEW_BODY="## Multi-Agent PR Review


## Code Review

$([ -n "$JS_FILES" ] && echo "**JavaScript/TypeScript**: Files reviewed")
$([ -n "$PY_FILES" ] && echo "**Python**: Files reviewed")


## Test Coverage

$([ -n "$TEST_FILES" ] && echo "Test files detected and validated" || echo "No test files found")


## Configuration Changes

$([ -n "$CONFIG_FILES" ] && echo "Configuration changes reviewed" || echo "No config changes")


## Summary

- Total files: $(echo "$FILES" | wc -l)
- Recommendation: Approve with minor suggestions

---
Generated by Swarm PR Agent"

gh pr review 123 --comment --body "$REVIEW_BODY"
```


## 3. PR Comment Commands


Use these commands in PR comments to control swarms:

```markdown
<!-- Initialize swarm -->
/swarm init mesh 6

<!-- Spawn specific agents -->
/swarm spawn coder "Implement the authentication logic"
/swarm spawn tester "Write comprehensive tests"
/swarm spawn security "Review for vulnerabilities"

<!-- Check swarm status -->
/swarm status

<!-- Get analysis -->
/swarm analyze

<!-- Complete swarm work -->
/swarm complete
```


## 4. Automated PR Validation


```bash
# Run comprehensive PR validation
validate_pr() {
  local PR_NUM=$1

  # Get PR details
  PR=$(gh pr view $PR_NUM --json state,mergeable,reviews,statusCheckRollup)

  # Check merge status
  MERGEABLE=$(echo "$PR" | jq -r '.mergeable')

  # Check CI status
  CI_STATUS=$(echo "$PR" | jq -r '.statusCheckRollup[0].conclusion // "pending"')

  # Check review status
  APPROVALS=$(echo "$PR" | jq '[.reviews[] | select(.state == "APPROVED")] | length')

  # Validation report
  cat << EOF

Related Skills

wave-based-parallel-plan-execution

5
from vamseeachanta/workspace-hub

Orchestrate phase execution by discovering dependencies, grouping into waves, spawning subagents, and collecting results with optional wave filtering

tax-filing-session-setup-with-github-tracking

5
from vamseeachanta/workspace-hub

Structured workflow for preparing and tracking a tax filing session using prepared documents, task checklist, and GitHub issue cross-referencing

tax-filing-session-setup-with-github-traceability

5
from vamseeachanta/workspace-hub

Structured workflow for setting up a multi-file tax filing session with GitHub issue tracking and prepared-file validation

staged-issue-tree-creation-with-deduplication

5
from vamseeachanta/workspace-hub

Pattern for creating hierarchical GitHub issue trees from phased project plans while checking for duplicate/overlapping issues

github-issue-structure-for-personal-finance-tracking

5
from vamseeachanta/workspace-hub

Pattern for organizing financial analysis work across multiple repos (data/config vs. logic separation)

batch-syntax-fix-with-regex-line-based-fallback

5
from vamseeachanta/workspace-hub

Fix repeated syntax errors across many files using regex, then fall back to line-based parsing when regex fails

interactive-Codex-to-file-based-fallback

5
from vamseeachanta/workspace-hub

Switch from tmux/interactive Codex to file-based Codex -p execution when interactive runs fail with upstream errors or analysis-only stalls, then verify landing from git/GitHub state.

github-actions-trigger-and-shell-gotchas

5
from vamseeachanta/workspace-hub

Prevent false verification gaps in GitHub Actions by checking push path filters, shell compatibility, and shared CI environment failures before concluding a workflow fix worked or failed.

github-actions-cross-platform-validation-gotchas

5
from vamseeachanta/workspace-hub

Execution-time GitHub Actions pitfalls discovered while fixing cross-platform CI workflows — path-filter non-triggers, Windows shell parsing mismatches, and job-scoped validation.

github-visual-planning-issues

5
from vamseeachanta/workspace-hub

Create review-friendly GitHub planning issues that supersede stale/seasonal issues and include source-backed image thumbnails for faster human review.

github-roadmap-anchor-reuse

5
from vamseeachanta/workspace-hub

Reuse and reopen existing roadmap/epic GitHub issues instead of fragmenting work across duplicate replacement epics; retarget children and link active issues for continuity.

github-repo-management

5
from vamseeachanta/workspace-hub

Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.