Just shippedBest skills for each job.See the picks →

Stack1 workflow + 3 skills

Label-driven dev loop with review skills

The label-driven triage, plan, implement, and red-team loop, with the code-review, testing-strategy, and debug skills named for the agents doing that work. The workflow has not been executed; cost on the workflow page is still an estimate.

GitHub event

Label

Workflow

Decides when the agent runs

  • .github/workflows/label-driven-dev-loop.yml

Skills

Decide how it does the job

  • .claude/skills/code-review/SKILL.md
  • .claude/skills/testing-strategy/SKILL.md
  • .claude/skills/debug/SKILL.md

The workflow decides when the agent runs. Claude Code does triage, the plan, and the implementation. Codex, read-only, does the red-team pass. They are different vendors on purpose. Each skill decides how that job is done. Put the skill in the repo as a SKILL.md file. The workflow YAML does not contain the skill.

The Codex red-team step has its own prompt and does not point at a skill file. The skill folders are for the Claude Code steps.

Let your agent do it

Copy a prompt for Claude Code, Codex, or Cursor.

Paste it into your coding agent in this repo. It does the setup and asks before anything leaves your machine.

Runs in GitHub Actions on your Claude Pro or Max plan through an OAuth token from claude setup-token. No API credits.

This is the "Label-driven dev loop with review skills" stack (https://agentflows.sh/stacks/label-driven-dev-loop-review): The label-driven triage, plan, implement, and red-team loop, with the code-review, testing-strategy, and debug skills named for the agents doing that work. The workflow has not been executed; cost on the workflow page is still an estimate.

Set up the "Label-driven dev loop: triage → plan → implement → red-team → human merge" GitHub workflow from AgentFlows (https://agentflows.sh/flows/label-driven-dev-loop) so it runs on my Claude Pro or Max subscription instead of API credits.

Install these agent skills first. Download each SKILL.md from its source (respect its license) into .claude/skills/<name>/SKILL.md, or wherever this agent loads skills from:
- Code review: https://github.com/anthropics/knowledge-work-plugins/blob/main/engineering/skills/code-review/SKILL.md (Apache-2.0), notes at https://agentflows.sh/skills/code-review
- Testing strategy: https://github.com/anthropics/knowledge-work-plugins/blob/main/engineering/skills/testing-strategy/SKILL.md (Apache-2.0), notes at https://agentflows.sh/skills/testing-strategy
- Debug: https://github.com/anthropics/knowledge-work-plugins/blob/main/engineering/skills/debug/SKILL.md (Apache-2.0), notes at https://agentflows.sh/skills/debug

Save this file as .github/workflows/label-driven-dev-loop.yml:

```yaml
name: Dev Loop
on:
  issues:
    types: [opened, labeled]
  pull_request:
    types: [labeled]
permissions:
  contents: write
  issues: write
  pull-requests: write
  id-token: write
jobs:
  triage:  # new issue -> label triage/planning
    if: github.event_name == 'issues' && github.event.action == 'opened'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: anthropics/claude-code-action@v1
        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          prompt: |
            REPO: ${{ github.repository }}  ISSUE: ${{ github.event.issue.number }}
            Triage this issue. If it is actionable, run:
            gh issue edit ${{ github.event.issue.number }} --add-label planning
            Otherwise comment asking for missing info and add label triage.
          claude_args: |
            --allowedTools "Bash(gh issue view:*),Bash(gh issue edit:*),Bash(gh issue comment:*)"

  plan:  # label planning -> post plan, then label ready (human can veto)
    if: github.event_name == 'issues' && github.event.label.name == 'planning'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            REPO: ${{ github.repository }}  ISSUE: ${{ github.event.issue.number }}
            Read the code and post an implementation plan as an issue comment (files, steps, tests).
            Do NOT add the ready label; a human adds it to approve the plan.
          claude_args: |
            --allowedTools "Read,Grep,Glob,Bash(gh issue view:*),Bash(gh issue comment:*)"

  implement:  # human adds ready -> Claude implements and opens PR
    if: github.event_name == 'issues' && github.event.label.name == 'ready'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          label_trigger: "ready"
          branch_prefix: "claude/"
          prompt: |
            Implement the approved plan in the issue comments. Run tests.
            Open a PR that says "Closes #${{ github.event.issue.number }}" and add label review-red-team to the PR.

  red_team:  # PR labeled review-red-team -> a DIFFERENT agent attacks it
    if: github.event_name == 'pull_request' && github.event.label.name == 'review-red-team'
    runs-on: ubuntu-latest
    permissions:
      contents: read
    outputs:
      verdict: ${{ steps.codex.outputs.final-message }}
    steps:
      - uses: actions/checkout@v5
        with:
          ref: refs/pull/${{ github.event.pull_request.number }}/merge
          persist-credentials: false
      - id: codex
        uses: openai/codex-action@v1
        with:
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          permission-profile: ":read-only"
          prompt: |
            You are a red-team reviewer. Try to break PR #${{ github.event.pull_request.number }}:
            edge cases, security, missing tests, plan drift. End with a line VERDICT: PASS or VERDICT: FAIL.

  hand_off:  # post verdict, move to in-review; a human merges
    needs: red_team
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - env:
          GH_TOKEN: ${{ github.token }}
          VERDICT: ${{ needs.red_team.outputs.verdict }}
          PR: ${{ github.event.pull_request.number }}
        run: |
          gh pr comment "$PR" -R "${{ github.repository }}" --body "$VERDICT"
          if echo "$VERDICT" | grep -q "VERDICT: PASS"; then
            gh pr edit "$PR" -R "${{ github.repository }}" --remove-label review-red-team --add-label in-review
          fi
          # No auto-merge: a human reviews in-review PRs and merges.
```

It authenticates with CLAUDE_CODE_OAUTH_TOKEN. Tell me to run `claude setup-token` in my own terminal to create it, then run `gh secret set CLAUDE_CODE_OAUTH_TOKEN` and let me paste it. Never write the token into a file.

It runs on: issues/pull_request: labeled. Runs count against my subscription's usage limits, and GitHub Actions minutes still apply.

Show me the diff, then commit on a new branch and open a pull request.

Setup

Copy-paste setup

  1. Create .github/workflows/label-driven-dev-loop.yml and paste the workflow below.
  2. Add the repository secrets ANTHROPIC_API_KEY, OPENAI_API_KEY.
  3. For each skill, create the folder and paste that SKILL.md.

.github/workflows/label-driven-dev-loop.yml

name: Dev Loop
on:
  issues:
    types: [opened, labeled]
  pull_request:
    types: [labeled]
permissions:
  contents: write
  issues: write
  pull-requests: write
  id-token: write
jobs:
  triage:  # new issue -> label triage/planning
    if: github.event_name == 'issues' && github.event.action == 'opened'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            REPO: ${{ github.repository }}  ISSUE: ${{ github.event.issue.number }}
            Triage this issue. If it is actionable, run:
            gh issue edit ${{ github.event.issue.number }} --add-label planning
            Otherwise comment asking for missing info and add label triage.
          claude_args: |
            --allowedTools "Bash(gh issue view:*),Bash(gh issue edit:*),Bash(gh issue comment:*)"

  plan:  # label planning -> post plan, then label ready (human can veto)
    if: github.event_name == 'issues' && github.event.label.name == 'planning'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            REPO: ${{ github.repository }}  ISSUE: ${{ github.event.issue.number }}
            Read the code and post an implementation plan as an issue comment (files, steps, tests).
            Do NOT add the ready label; a human adds it to approve the plan.
          claude_args: |
            --allowedTools "Read,Grep,Glob,Bash(gh issue view:*),Bash(gh issue comment:*)"

  implement:  # human adds ready -> Claude implements and opens PR
    if: github.event_name == 'issues' && github.event.label.name == 'ready'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          label_trigger: "ready"
          branch_prefix: "claude/"
          prompt: |
            Implement the approved plan in the issue comments. Run tests.
            Open a PR that says "Closes #${{ github.event.issue.number }}" and add label review-red-team to the PR.

  red_team:  # PR labeled review-red-team -> a DIFFERENT agent attacks it
    if: github.event_name == 'pull_request' && github.event.label.name == 'review-red-team'
    runs-on: ubuntu-latest
    permissions:
      contents: read
    outputs:
      verdict: ${{ steps.codex.outputs.final-message }}
    steps:
      - uses: actions/checkout@v5
        with:
          ref: refs/pull/${{ github.event.pull_request.number }}/merge
          persist-credentials: false
      - id: codex
        uses: openai/codex-action@v1
        with:
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}
          permission-profile: ":read-only"
          prompt: |
            You are a red-team reviewer. Try to break PR #${{ github.event.pull_request.number }}:
            edge cases, security, missing tests, plan drift. End with a line VERDICT: PASS or VERDICT: FAIL.

  hand_off:  # post verdict, move to in-review; a human merges
    needs: red_team
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - env:
          GH_TOKEN: ${{ github.token }}
          VERDICT: ${{ needs.red_team.outputs.verdict }}
          PR: ${{ github.event.pull_request.number }}
        run: |
          gh pr comment "$PR" -R "${{ github.repository }}" --body "$VERDICT"
          if echo "$VERDICT" | grep -q "VERDICT: PASS"; then
            gh pr edit "$PR" -R "${{ github.repository }}" --remove-label review-red-team --add-label in-review
          fi
          # No auto-merge: a human reviews in-review PRs and merges.

.claude/skills/code-review/SKILL.md

---
name: code-review
description: Review code changes for security, performance, and correctness. Trigger with a PR URL or diff, "review this before I merge", "is this code safe?", or when checking a change for N+1 queries, injection risks, missing edge cases, or error handling gaps.
argument-hint: "<PR URL, diff, or file path>"
---

# /code-review

> If you see unfamiliar placeholders or need to check which tools are connected, see [CONNECTORS.md](../../CONNECTORS.md).

Review code changes with a structured lens on security, performance, correctness, and maintainability.

## Usage

```
/code-review <PR URL or file path>
```

Review the provided code changes: @$1

If no specific file or URL is provided, ask what to review.

## How It Works

```
┌─────────────────────────────────────────────────────────────────┐
│                      CODE REVIEW                                   │
├─────────────────────────────────────────────────────────────────┤
│  STANDALONE (always works)                                       │
│  ✓ Paste a diff, PR URL, or point to files                      │
│  ✓ Security audit (OWASP top 10, injection, auth)               │
│  ✓ Performance review (N+1, memory leaks, complexity)           │
│  ✓ Correctness (edge cases, error handling, race conditions)    │
│  ✓ Style (naming, structure, readability)                        │
│  ✓ Actionable suggestions with code examples                    │
├─────────────────────────────────────────────────────────────────┤
│  SUPERCHARGED (when you connect your tools)                      │
│  + Source control: Pull PR diff automatically                    │
│  + Project tracker: Link findings to tickets                     │
│  + Knowledge base: Check against team coding standards           │
└─────────────────────────────────────────────────────────────────┘
```

## Review Dimensions

### Security
- SQL injection, XSS, CSRF
- Authentication and authorization flaws
- Secrets or credentials in code
- Insecure deserialization
- Path traversal
- SSRF

### Performance
- N+1 queries
- Unnecessary memory allocations
- Algorithmic complexity (O(n²) in hot paths)
- Missing database indexes
- Unbounded queries or loops
- Resource leaks

### Correctness
- Edge cases (empty input, null, overflow)
- Race conditions and concurrency issues
- Error handling and propagation
- Off-by-one errors
- Type safety

### Maintainability
- Naming clarity
- Single responsibility
- Duplication
- Test coverage
- Documentation for non-obvious logic

## Output

```markdown
## Code Review: [PR title or file]

### Summary
[1-2 sentence overview of the changes and overall quality]

### Critical Issues
| # | File | Line | Issue | Severity |
|---|------|------|-------|----------|
| 1 | [file] | [line] | [description] | 🔴 Critical |

### Suggestions
| # | File | Line | Suggestion | Category |
|---|------|------|------------|----------|
| 1 | [file] | [line] | [description] | Performance |

### What Looks Good
- [Positive observations]

### Verdict
[Approve / Request Changes / Needs Discussion]
```

## If Connectors Available

If **~~source control** is connected:
- Pull the PR diff automatically from the URL
- Check CI status and test results

If **~~project tracker** is connected:
- Link findings to related tickets
- Verify the PR addresses the stated requirements

If **~~knowledge base** is connected:
- Check changes against team coding standards and style guides

## Tips

1. **Provide context** — "This is a hot path" or "This handles PII" helps me focus.
2. **Specify concerns** — "Focus on security" narrows the review.
3. **Include tests** — I'll check test coverage and quality too.

.claude/skills/testing-strategy/SKILL.md

---
name: testing-strategy
description: Design test strategies and test plans. Trigger with "how should we test", "test strategy for", "write tests for", "test plan", "what tests do we need", or when the user needs help with testing approaches, coverage, or test architecture.
---

# Testing Strategy

Design effective testing strategies balancing coverage, speed, and maintenance.

## Testing Pyramid

```
        /  E2E  \         Few, slow, high confidence
       / Integration \     Some, medium speed
      /    Unit Tests  \   Many, fast, focused
```

## Strategy by Component Type

- **API endpoints**: Unit tests for business logic, integration tests for HTTP layer, contract tests for consumers
- **Data pipelines**: Input validation, transformation correctness, idempotency tests
- **Frontend**: Component tests, interaction tests, visual regression, accessibility
- **Infrastructure**: Smoke tests, chaos engineering, load tests

## What to Cover

Focus on: business-critical paths, error handling, edge cases, security boundaries, data integrity.

Skip: trivial getters/setters, framework code, one-off scripts.

## Output

Produce a test plan with: what to test, test type for each area, coverage targets, and example test cases. Identify gaps in existing coverage.

.claude/skills/debug/SKILL.md

---
name: debug
description: Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
argument-hint: "<error message or problem description>"
---

# /debug

> If you see unfamiliar placeholders or need to check which tools are connected, see [CONNECTORS.md](../../CONNECTORS.md).

Run a structured debugging session to find and fix issues systematically.

## Usage

```
/debug $ARGUMENTS
```

## How It Works

```
┌─────────────────────────────────────────────────────────────────┐
│                       DEBUG                                        │
├─────────────────────────────────────────────────────────────────┤
│  Step 1: REPRODUCE                                                │
│  ✓ Understand the expected vs. actual behavior                   │
│  ✓ Identify exact reproduction steps                             │
│  ✓ Determine scope (when did it start? who is affected?)        │
│                                                                    │
│  Step 2: ISOLATE                                                   │
│  ✓ Narrow down the component, service, or code path             │
│  ✓ Check recent changes (deploys, config changes, dependencies) │
│  ✓ Review logs and error messages                                │
│                                                                    │
│  Step 3: DIAGNOSE                                                  │
│  ✓ Form hypotheses and test them                                 │
│  ✓ Trace the code path                                           │
│  ✓ Identify root cause (not just symptoms)                      │
│                                                                    │
│  Step 4: FIX                                                       │
│  ✓ Propose a fix with explanation                                │
│  ✓ Consider side effects and edge cases                          │
│  ✓ Suggest tests to prevent regression                           │
└─────────────────────────────────────────────────────────────────┘
```

## What I Need From You

Tell me about the problem. Any of these help:
- Error message or stack trace
- Steps to reproduce
- What changed recently
- Logs or screenshots
- Expected vs. actual behavior

## Output

```markdown
## Debug Report: [Issue Summary]

### Reproduction
- **Expected**: [What should happen]
- **Actual**: [What happens instead]
- **Steps**: [How to reproduce]

### Root Cause
[Explanation of why the bug occurs]

### Fix
[Code changes or configuration fixes needed]

### Prevention
- [Test to add]
- [Guard to put in place]
```

## If Connectors Available

If **~~monitoring** is connected:
- Pull logs, error rates, and metrics around the time of the issue
- Show recent deploys and config changes that may correlate

If **~~source control** is connected:
- Identify recent commits and PRs that touched affected code paths
- Check if the issue correlates with a specific change

If **~~project tracker** is connected:
- Search for related bug reports or known issues
- Create a ticket for the fix once identified

## Tips

1. **Share error messages exactly** — Don't paraphrase. The exact text matters.
2. **Mention what changed** — Recent deploys, dependency updates, and config changes are top suspects.
3. **Include context** — "This works in staging but not prod" or "Only affects large payloads" narrows things fast.