PluginBench
Skill
Review
Audit score 70

qwen-agent

thananon/9arm-skills

Delegate menial coding tasks to a cheap Qwen subagent via claude-9arm to preserve Claude tokens.

What is qwen-agent?

Offload self-contained, mechanical coding work (bulk renames, formatting, boilerplate, log summarization, test scaffolding, build/lint runs) to a Qwen-backed subagent instead of burning Claude quota. Use when the task is low-risk and doesn't require architectural judgment or conversation context.

  • Run menial tasks via the `claude-9arm` command with scoped tool access (Bash, Read, Edit, Write, Glob, Grep)
  • Delegate bulk renames, formatting, boilerplate generation, and find-replace operations
  • Summarize logs, condense files, and generate test/docstring/comment scaffolding
  • Execute builds, linters, and tests with pass-fail reporting
  • Support background/parallel execution for multiple independent tasks via log redirection

How to install qwen-agent

npx skills add https://github.com/thananon/9arm-skills --skill qwen-agent
Prerequisites
  • Claude Code or Cursor with the 9arm-skills package installed
  • Ability to run shell commands and use the `claude-9arm` alias
  • Understanding of absolute file paths for the target codebase
Claude Code
Cursor
Windsurf
Cline

How to use qwen-agent

  1. 1.Identify a menial, self-contained task that doesn't require architectural judgment or conversation context
  2. 2.Estimate the file footprint to ensure it fits within Qwen's 128k context window; split large jobs into smaller per-file or per-directory chunks if needed
  3. 3.Write a fully self-contained prompt with absolute file paths, explicit inputs/outputs, and clear acceptance criteria (no references to prior conversation turns)
  4. 4.Run `claude-9arm -p "<task>" --allowedTools Bash Read Edit Write Glob Grep` in the foreground, or redirect to a log file for background execution
  5. 5.Verify the output meets your acceptance criteria before confirming success

Use cases

Good for
  • Bulk rename variables or functions across a single file or small set of files
  • Reformat code or apply consistent import sorting without architectural changes
  • Generate test stubs, docstrings, or comments for existing code
  • Search and summarize logs or large text files
  • Run linters, formatters, or test suites and report results
Who it's for
  • Developers wanting to preserve Claude token quota for high-value reasoning
  • Teams delegating repetitive, low-risk coding chores
  • Anyone needing quick mechanical edits without burning expensive model capacity

qwen-agent FAQ

When should I NOT delegate to qwen?

Do not delegate architecture/design decisions, debugging that requires reasoning, security-sensitive edits, or anything needing this conversation's context. If a task needs whole-codebase understanding to do correctly, keep it yourself.

How do I handle large jobs that won't fit in 128k tokens?

Break the job into independent chunks—one file per run, one directory per run, or one log segment per run. Run each chunk as a separate `claude-9arm` invocation. Estimate footprint by calculating (file bytes ÷ 4 ≈ tokens) before delegating.

What if the subagent keeps asking for permission?

Use `--permission-mode acceptEdits` for edit-only tasks, or add a Bash allow rule via the `update-config` skill: `{ "permissions": { "allow": ["Bash(claude-9arm:*)"] } }` to stop per-call prompts.

How do I run multiple independent tasks in parallel?

Redirect each `claude-9arm` invocation to a separate log file with `> /tmp/qwen-<label>.log 2>&1` and use the Bash tool's `run_in_background: true`. Launch all tasks, then read each log when it completes.

Why is my prompt failing or producing truncated output?

The task likely overflowed Qwen's 128k context window. Check for truncated edits, ignored instructions, or incomplete summaries. Split the job into smaller chunks and retry each one separately.

Full instructions (SKILL.md)

Source of truth, from thananon/9arm-skills.


name: qwen-agent description: Delegate menial, well-scoped coding tasks to a cheap Qwen-backed subagent via the claude-9arm command instead of burning Claude tokens/quota. Use when the work is mechanical and low-risk — bulk renames, formatting, boilerplate, find-replace, grep-style search & summarization, reading/condensing logs or files, test/docstring/comment scaffolding, or running builds/linters/tests and reporting pass-fail. Also use when the user says "use qwen", "delegate this", "send it to 9arm/qwen", or "do this cheaply". Do NOT use for architecture, design, debugging judgment, security-sensitive edits, or anything needing this conversation's context.

qwen-agent

Offload menial, self-contained tasks to a Qwen model running inside a headless Claude Code instance (claude-9arm). Keeps expensive Claude reasoning for work that needs it.

The command

claude-9arm is a shell alias → claude --model qwen3.6-35b-a3b routed through the 9arm gateway. Run it headless with -p:

claude-9arm -p "<self-contained task prompt>" --allowedTools Bash Read Edit Write Glob Grep
  • This is the default invocation. The flag list scopes which tools the subagent may use without a prompt, so it can finish a menial job unattended. Without it the subagent stalls waiting for approval on the first edit or command.
  • The alias bakes in --allowedTools '*', which Claude Code silently ignores with a warning (Wildcard tool name "*" is not supported). That warning is expected and harmless — the --allowedTools you append is what takes effect.
  • For edit-only, lower-risk tasks you may instead use --permission-mode acceptEdits (auto-accepts file edits, but Bash still prompts — don't use it for verification/build/test runs).

Writing the task prompt (most important step)

The qwen subagent has zero context from this conversation. A vague prompt is the #1 failure mode. Every prompt must be standalone:

  • Absolute paths for every input and output file (/Users/tpatinya/proj/src/foo.ts, not foo.ts).
  • Explicit inputs, outputs, and acceptance criteria — what to change, what "done" looks like.
  • No references to "the file we discussed", "above", or prior turns.
  • Treat qwen as a capable-but-literal junior: spell out the steps, keep scope tight.

Bad: clean up the imports Good: In /Users/tpatinya/proj/src/api.ts, remove unused imports and sort the remaining import statements alphabetically. Do not change any other code. Confirm the file still parses.

Mind the context window (128k)

Qwen runs with a 128k-token context window — much smaller than Claude's. The whole job (your prompt + every file it reads + its own reasoning and edits) has to fit inside it. Size each delegated task to the model, not just to "is it menial":

  • Estimate the footprint before delegating: roughly the bytes of files it must read + open + write, ÷ 4 ≈ tokens. If a single task would pull in large files or many files at once, it won't fit.
  • Break large jobs into independent chunks that each touch a bounded slice — e.g. one file (or a few small ones) per run, one directory per run, one log segment per run. Run the chunks as separate claude-9arm invocations (foreground, or background-parallel per the Return contract section).
  • Don't make it read what it doesn't need. Point it at the exact files/paths required; never tell it to "scan the repo" or read a whole large tree.
  • Watch for context-exhaustion symptoms when verifying: truncated edits, ignored later instructions, or a summary that omits files it was told to touch usually mean the task overflowed — split it smaller and retry.

When a job is inherently too big to slice cleanly (it needs whole-codebase context to do correctly), that's a sign it isn't a qwen task — keep it yourself.

Working directory

The Bash tool's cd resets between calls and cd && can trip permission prompts. Don't rely on cwd:

  • Put absolute paths in the prompt, or
  • Pass --add-dir /abs/path to grant the subagent access to a directory.

Return contract

  • Default (text): qwen's final message prints to stdout — read it directly.

  • Need to parse the result: add --output-format json and extract the result field.

  • Background / parallel (run several at once): redirect to a log and run with the Bash tool's run_in_background: true, then read the log when it finishes:

    claude-9arm -p "<task>" --allowedTools Bash Read Edit Write Glob Grep > /tmp/qwen-<label>.log 2>&1
    

    Launch independent tasks as separate background runs; collect each log on completion. Use this when delegating 2+ unrelated menial jobs.

Workflow checklist

  1. Confirm the task is menial and low-risk (see description). If it needs design judgment or this chat's context, do it yourself — don't delegate.
  2. Check it fits qwen's 128k context window — estimate the file footprint and split large jobs into bounded per-file/per-dir chunks (see "Mind the context window").
  3. Write a fully self-contained prompt with absolute paths and acceptance criteria.
  4. Run claude-9arm -p "..." --allowedTools Bash Read Edit Write Glob Grep (foreground), or background-redirect for parallel jobs.
  5. Verify the output yourself — qwen is cheaper and less reliable. Check the file/result actually meets the acceptance criteria before reporting success.

One-time setup (optional, removes repeated prompts)

To stop per-call permission prompts on delegated runs, add a Bash allow rule for the command (via the update-config skill, or by editing settings):

{ "permissions": { "allow": ["Bash(claude-9arm:*)"] } }

When NOT to delegate

Architecture/design, debugging that needs reasoning, security-sensitive changes, anything requiring this conversation's context, or tasks where a wrong cheap-model edit is costly to catch. When in doubt, keep it.