ai-research-arm: Command for Claude Code

.claude/commands/gen-research-route.md

gen-research-route is a command for Claude Code from guzus/ai-research-arm. It costs 29 tokens per session (799 once invoked), scanned A, original, MIT.

A command that sends a research topic to a GitHub Actions workflow, GitHub's system for running automated jobs. The workflow researches the topic and publishes a full HTML article to the repository.

In plain words
What is it for?
It helps start a deep, source-backed research article from a supplied topic and reports the workflow run and output location.
Why use it?
It moves a long research process to a self-hosted runner so the current chat is available immediately.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

This is guzus/ai-research-arm's own configuration. It tells Claude Code how to work on ai-research-arm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-research-arm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to guzus/ai-research-arm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/guzus/ai-research-arm/main/.claude/commands/gen-research-route.md
Clone the repo
git clone --depth 1 https://github.com/guzus/ai-research-arm

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gen-research-route

README.md
[![agentmods](https://agentmods.dev/badge/commands/guzus/ai-research-arm/gen-research-route/github.svg)](https://agentmods.dev/commands/guzus/ai-research-arm/gen-research-route)
Your own site
<a href="https://agentmods.dev/commands/guzus/ai-research-arm/gen-research-route"><img src="https://agentmods.dev/badge/commands/guzus/ai-research-arm/gen-research-route/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gen-research-route

Your own site · 80×15
<a href="https://agentmods.dev/commands/guzus/ai-research-arm/gen-research-route"><img src="https://agentmods.dev/badge/commands/guzus/ai-research-arm/gen-research-route.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00799
Opus 5 $0.00015 $0.00400
Sonnet 5 $0.00006 $0.00160
Haiku 4.5 $0.00003 $0.00080

Measured 11d ago against content hash 01f9ccb33034, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

gen-research-route scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/gen-research-route.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generative Research — Route to GitHub Workflow

User-supplied topic: $ARGUMENTS

If the topic is empty or just whitespace, ask the user for a topic and stop until they answer.

What this does

Dispatches the generative-research.yml GitHub Actions workflow with backend=claude by default (Claude Opus 4.7 via anthropics/claude-code-action@v1). Use backend=deepseek-v4-flash for the DeepSeek V4 Pro comparison baseline (DeepSeek's Anthropic-compatible endpoint). The workflow runs on the self-hosted Linux runner and executes the full deep pipeline documented in the workflow file:

  • 16–32 evidence-collection sub-agents (waves of ≤8)
  • 5–10 section-writer sub-agents (waves of ≤4)
  • Verifier sub-agent + bounded revision pass
  • Quality targets: ≥90% claims cited, ≥50% primary sources, ≥12 cites per 1000 words, ≥20 references, 4500–7000 words

Article writes to research/generative/ via the canonical writer and the runner pushes the commit directly to main. Your local chat is freed immediately.

Runtime is typically 20–45 min depending on topic complexity.

Steps

  1. Verify gh auth (one-liner; if this errors, stop and ask the user to fix their gh auth before continuing):

    gh auth status >/dev/null
    
  2. Dispatch the workflow. Quote the topic so spaces and special characters survive the shell:

    gh workflow run generative-research.yml \
      -f topic="$ARGUMENTS" \
      -f backend=claude
    

    If the user passed a brief in their topic that mentions backend: deepseek-v4-flash (or backend: deepseek), honor it by switching -f backend=deepseek-v4-flash instead. Otherwise default to claude.

    If the user's entire argument is a Twitter/X status URL, prefer the dedicated Twitter-seed input instead of stuffing the URL into topic:

    gh workflow run generative-research.yml \
      -f twitter_url="$ARGUMENTS" \
      -f backend=claude
    
  3. Wait a few seconds for the run to register, then look it up. GitHub takes a moment to enqueue dispatched runs:

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 94 lines · 29 tokens per session scan A 01f9ccb33034

Subscribe to this mod's changes

gen-research-route is a command published in the GitHub repository guzus/ai-research-arm (11 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 799 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.