agent-label-routing

Deterministic multi-agent task assignment via GitHub labels — classify, label, and generate queue views from `agent:` labels instead of manual queue files

5 stars

Best use case

agent-label-routing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Deterministic multi-agent task assignment via GitHub labels — classify, label, and generate queue views from `agent:` labels instead of manual queue files

Teams using agent-label-routing 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/agent-label-routing/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/coordination/agent-label-routing/SKILL.md"

Manual Installation

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

How agent-label-routing Compares

Feature / Agentagent-label-routingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Deterministic multi-agent task assignment via GitHub labels — classify, label, and generate queue views from `agent:` labels instead of manual queue files

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

# Agent Label Routing

Deterministic agent task assignment using GitHub `agent:` labels. Labels ARE the queue — separate markdown files are just filtered views.

## Label Schema

| Label | Color | Role |
|-------|-------|------|
| `agent:gemini` | F5A623 | Research, prep, large-doc ingestion, standards mapping |
| `agent:Codex` | DA552F | Heavy coding, architecture, orchestration, complex TDD |
| `agent:codex` | 3182CE | Bounded implementation, test writing, review, refactoring |
| `agent:any` | 8E54E9 | No strong preference — whichever agent has capacity |

## Workflow

### Step 1: Create Labels (if missing)
```bash
gh label create "agent:gemini" --color "F5A623" --description "Research, prep, large-doc ingestion"
gh label create "agent:Codex" --color "DA552F" --description "Heavy coding, architecture, orchestration"
gh label create "agent:codex" --color "3182CE" --description "Bounded implementation, tests, review"
gh label create "agent:any" --color "8E54E9" --description "No strong preference"
```

### Step 2: Classify Issues
Use rule-based scoring with keyword matching + category boosts:

```python
# GEMINI signals (+2 each)
keywords: literature, review, research, catalog, triage, summarize,
  standards gap, standards mapping, migrate literature, acquire, index,
  scrape, dedup, job market
category boost: cat:document-intelligence (+3), cat:data-pipeline + dark-intelligence (+2)

# Codex signals (+2 each)
keywords: architecture, orchestration, governance, credit utilization,
  work queue, model switching, dispatch, integration, concept selection,
  capex/opex, facility sizing, production profile, floating platform,
  stability, gyradius, trim ballast, epic
category boost: cat:ai-orchestration (+3), cat:engineering + dark-intelligence (+1)

# CODEX signals (+2 each)
keywords: test coverage, bug fix, solver queue, extract metadata,
  batch-at-stop, config-protection hook, convert agent to skill,
  deduplicate skill, provider config
category boost: cat:engineering-calculations + domain:code-promotion (+2)
```

### Step 3: Batch Label (parallel)
Never use sequential `gh issue edit` — it is SLOW and hits rate limits.

**Parallel background shell (recommended):**
```bash
GEMINI=(1863 1862 1860 ... 68 issues)
for n in "${GEMINI[@]}"; do
  gh issue edit "$n" --add-label "agent:gemini" 2>/dev/null &
done
wait  # blocks until all complete, then move to next agent
```
175 issues labeled in ~15s vs 300s+ sequential.

**Alternative: one-liner per batch**
Same approach — background all `gh issue edit` calls for one agent, `wait`, then next.

### Step 4: Generate Queue View
```bash
# Query live from GitHub — never manually maintain
gh issue list -L 100 --label "agent:gemini,priority:high" --json number,title
gh issue list -L 100 --label "agent:Codex,priority:high" --json number,title
gh issue list -L 100 --label "agent:codex,priority:high" --json number,title
```

### Step 5: Refresh Script
`scripts/refresh-agent-work-queue.sh` regenerates `notes/agent-work-queue.md` from live label queries. Run weekly on Sunday via cron.

## How to Reassign
```bash
# Move issue from Gemini to Codex
gh issue edit 1234 --remove-label "agent:gemini" --add-label "agent:codex"
```

## Gemini Batch Execution Pattern

After labeling, execute research tasks in batches of 5-6 per Gemini session:

```bash
h-router-gemini -t terminal,file -q "You are ACE Engineer advance scout.
Working directory: /mnt/local-analysis/workspace-hub.
Execute ALL 5 tasks. Commit after each. Do NOT push. Close each issue.

TASK 1: <issue-title> (#number)
- Use search_files or terminal to gather data
- Create: <output path>
- Commit: git add <file> && git commit -m '<msg>'
- Close: gh issue close <number> -c '<close comment>'

TASK 2-5: same pattern...
"
```

- Each batch: ~2 minutes, closes 5 issues
- Toolsets: `-t terminal,file` for filesystem writes, add `web` for web search
- ~$0.00 consumed per batch from $20/mo Gemini Pro subscription
- Gemini handles search_files, read_file, write_file, terminal, gh CLI natively

## Pitfalls
- `gh issue list --json` outputs a JSON array, not newline-delimited JSON. Use `--jq` for clean output.
- Sequential `gh issue edit` hits API rate limits and is very slow. Always use background parallelism for bulk operations.
- The `gh` CLI may return exit 1 on error even for individual failures in parallel. Use `2>/dev/null` per call and `wait` to sync.
- Classification is heuristic — always review the output before bulk labeling. Some issues need manual override.
- Labels are the source of truth. Never manually edit the queue file without regenerating from labels.
- After Gemini sessions, verify files on disk with `ls -la` since sandbox isolation can sometimes prevent writes from persisting.
- Free providers (`h-nemotron`, `h-qwen`) timeout after 5 min — too short for 5+ task batches. Gemini via OpenRouter takes ~2 min per session of 5 tasks.

## Output Artifacts
- GitHub issues with `agent:` labels applied
- `notes/agent-work-queue.md` (auto-generated view)
- `docs/plans/overnight-prompts-YYYY-MM-DD.md` (weekly overnight plan)
- `scripts/refresh-agent-work-queue.sh` (cron-ready refresh script)

## Session Record (2026-04-04 to 2026-04-05)
6 live Gemini sessions + 4 cron batches = 30+ research documents, 14 issues closed, ~12 min total compute, ~$0 from $20/mo Gemini Pro subscription. Sprint issues created for Codex (#1897 field dev, #1898 naval arch, #1899 governance) and Codex (#1908 test coverage).

Related Skills

llm-wiki-public-private-routing

5
from vamseeachanta/workspace-hub

Firewall between the public llm-wiki repo (vamseeachanta/llm-wiki, MIT + CC-BY-4.0) and per-client private wikis (vamseeachanta/llm-wiki-<client>, e.g. llm-wiki-mkt-a per #2746). Use when (1) deciding whether a converted wiki page lands in public or private surface, (2) applying the project-name abstraction rule to public-bound content, (3) evaluating the public- availability exception that lets actual project names pass through unmodified, (4) promoting content from private to public after sanitization. Encodes the 2026-05-20 user routing directive verbatim: exact client results → private; abstracted (project-name only) → public; project name + all key data publicly available → exception applies. Companion to research/llm-wiki-page-shape-contract (which calls this skill at Rule 8) and research/llm-wiki-source-extraction-coverage (which produces the source pages this skill decides where to send).

label-driven-prompt-generation-architecture

5
from vamseeachanta/workspace-hub

Pattern for building automation scripts that classify GitHub issues into prompt templates using label-based routing and extract contextual data for batch processing

github-issue-label-existence-audit

5
from vamseeachanta/workspace-hub

Prevent GitHub issue creation failures by auditing exact label existence, duplicate titles, and partial-create risk before calling gh issue create.

github-issue-label-audit-and-command-bundles

5
from vamseeachanta/workspace-hub

Safely turn drafted issue bodies into reusable gh issue create commands by auditing repo labels, exact duplicates, and auth first.

github-label-approval-reconciliation

5
from vamseeachanta/workspace-hub

Reconcile issue workflow state when the user approves plans by applying GitHub labels directly, then surface remaining user-input work without misclassifying approved issues.

trello-api-4-labels-management

5
from vamseeachanta/workspace-hub

Sub-skill of trello-api: 4. Labels Management (+1).

todoist-api-3-labels-management

5
from vamseeachanta/workspace-hub

Sub-skill of todoist-api: 3. Labels Management (+1).

calendly-api-6-scheduling-links-and-routing

5
from vamseeachanta/workspace-hub

Sub-skill of calendly-api: 6. Scheduling Links and Routing.

test-oversized-skill

5
from vamseeachanta/workspace-hub

A test fixture skill that exceeds 200 lines with multiple H2/H3 sections for split testing.

interactive-report-generator

5
from vamseeachanta/workspace-hub

Generate interactive HTML reports with Plotly visualizations from data analysis results. Supports dashboards, charts, and professional styling.

data-validation-reporter

5
from vamseeachanta/workspace-hub

Generate interactive validation reports with quality scoring, missing data analysis, and type checking. Combines Pandas validation, Plotly visualization, and YAML configuration for comprehensive data quality reporting.

agent-os-framework

5
from vamseeachanta/workspace-hub

Generate standardized .agent-os directory structure with product documentation, mission, tech-stack, roadmap, and decision records. Enables AI-native workflows.