Agent Skills Catalog/kiro-puter-subagents
AI EngineeringSKILL.md // RUNBOOKAGY • Claude Code • Cursor

kiro-puter-subagents

Use this skill to delegate subtasks, code refactoring, file analysis, or live web search to external CLI subagents (kiro-pool with multi-account rotation and puter-ai-cli/mycli). Contains model-selection strategies to minimize token/credit burn and handles quota limits.

Pull into workspace:skills-sync pull kiro-puter-subagents

Kiro & Puter Multi-Account Subagent Delegation Guide

This skill guides the primary agent on delegating secondary tasks (code generation, file reviews, boilerplate writing, syntax checks, or live web search) to local CLI sub-agents powered by `kiro-pool` and `mycli` (Puter AI CLI).

Both tools feature multi-account token pools to multiply free credits and avoid single-account rate limits.


Subagent Routing Matrix: Which Engine to Choose?

Task RequirementRecommended EngineCommand PatternWhy?
Autonomous Workspace File Editskiro-poolkiro-pool chat --v3 --model <model> --no-interactive --trust-all-tools "..."Has direct tool permissions to inspect and edit files in the workspace.
Real-time Live Web Searchputer (mycli)mycli ask -m gpt-4o -w "..."Puter has native serverless web search (-w / --web-search) with live citations.
Ultra-cheap Bulk Code Generationkiro-poolkiro-pool chat --v3 --model qwen3-coder-next ...Consumes only 0.05x credits (20x cheaper than standard models).
Everyday Quick Q&A / Text Lookupsputer (mycli)mycli ask -m gpt-5-nano "..."Near-zero token latency (< 1s), uses Puter's serverless pool.
Precision Refactoring / Bug Findingkiro-poolkiro-pool chat --v3 --model claude-haiku-4.5 ...Claude Haiku 4.5 is extremely accurate on code at only 0.40x credits.
Deep Architecture / System Designputer (mycli)mycli ask -m gpt-5.4 "..."Full frontier GPT-5.4 reasoning capacity.

Model Selection & Credit Optimization

To avoid exhausting credits rapidly, match your subtask to the lowest-cost model that can accomplish it:

1. Kiro Account Pool Models (kiro-pool)

Kiro charges credits per request based on a model multiplier:

Model IDMultiplierCredit BurnOptimal Use Case
`qwen3-coder-next`0.05xExtremely lowScaffolding repetitive boilerplate, bulk file scanning, regex generation.
`minimax-m2.1`0.15xVery lowQuick summarization, syntax formatting.
`deepseek-3.2`0.25xLowAlgorithmic logic, Python/Go/TS script generation, unit test cases.
`claude-haiku-4.5`0.40xModerateDefault Workhorse: High-precision code refactoring, targeted bug hunting, diff analysis.
`glm-5`0.50xModerateBroad technical explanations.
`claude-sonnet-4.5`1.30xHigh*Reserve for critical tasks*: Complex multi-file architectural reasoning or subtle concurrency bugs.
IMPORTANT
Always use `kiro-pool` instead of `kiro-cli` directly. Running kiro-cli exhausts your single default account. kiro-pool multiplexes requests across enrolled Google and GitHub accounts with SQLite pre-flight authentication checks, headless safety (auto-skipping unauthenticated accounts), auto-failover, and 60-minute cooldown recovery. Run kiro-pool prune anytime to purge unauthenticated sessions from disk.

2. Puter AI CLI Models (mycli)

Puter provides 1,000 monthly credits per account (pooled across configured tokens):

Model IDSpeedWeb Search?Optimal Use Case
`gpt-5-nano` *(Default)*Ultra-fast (< 1s)NoFast code snippets, error explanation, formatting, small helper functions.
`gpt-4o`Fast (~2s)Yes (`-w`)Live web research, package documentation verification, balanced coding.
`gpt-5.4`Frontier reasoningNoComplex system architecture, performance optimization strategy.
`claude-haiku-4.5`High speedNoRapid precision coding, refactoring, and lint resolution.
`claude-sonnet-4.5`High qualityNoState-of-the-art coding and technical documentation. *(Auto-resolves from claude-3-5-sonnet / claude-3.5)*.
`deepseek-chat`FastNoGeneral reasoning and script generation.
TIP
Run mycli models to list all supported models, active providers, and alias mappings live from Puter AI.

Execution Methods

Option A: Using the Unified Delegation Runner (Recommended)

A helper script is provided at scripts/delegate.py inside this skill directory. It automatically filters out internal daemon/node logs and formats clean responses:

bash
# 1. Quick refactor with Claude Haiku 4.5 via Kiro Pool
python3 ~/.gemini/config/skills/kiro-puter-subagents/scripts/delegate.py \
  --engine kiro \
  -m claude-haiku-4.5 \
  "Refactor the following function for readability: <code snippet>"

# 2. Ultra-cheap bulk generation with Qwen3 Coder
python3 ~/.gemini/config/skills/kiro-puter-subagents/scripts/delegate.py \
  --engine kiro \
  -m qwen3-coder-next \
  "Write mock test fixtures for the user auth endpoints."

# 3. Live Web Search with Puter AI CLI
python3 ~/.gemini/config/skills/kiro-puter-subagents/scripts/delegate.py \
  --engine puter \
  -m gpt-4o \
  -w \
  "What is the latest release version and breaking changes of Next.js?"

Option B: Direct Shell Invocation

If calling the CLI binaries directly via run_command:

Kiro Pool Invocation

bash
kiro-pool chat --v3 --model claude-haiku-4.5 --no-interactive --trust-all-tools "<prompt>"
  • Note: Output may contain server progress lines ([INFO] kas.server...); inspect the final lines for the assistant answer.
  • Puter CLI Invocation

    bash
    # Standard query
    mycli ask -m gpt-5-nano "<prompt>"
    
    # With live web search
    mycli ask -m gpt-4o -w "<prompt>"
    
    # Pipe files into Puter
    cat src/config.go | mycli ask "Check this configuration for potential race conditions."

    Quota Exhaustion & Error Handling Protocol

    When delegating tasks, monitor exit codes and stderr for quota exhaustion:

    1. Kiro Account Pool Limit Exhaustion & Re-login

    If all accounts in kiro-pool are throttled, in cooldown, or require login, the command returns code 1 with:

    bash
    [kiro-pool ERROR] All active accounts are currently in cooldown (rate limited).

    or

    bash
    [kiro-pool ERROR] All pooled accounts require re-login. Re-enroll with 'kiro-pool add/import' or run 'kiro-pool prune'.

    Automated Safety & Failover:

    kiro-pool automatically detects unauthenticated or expired accounts and benches them without hanging or opening browser popups. When an account hits quota limits or HTTP 429 throttling, kiro-pool benches it for 60 minutes and automatically fails over to the next healthy account of the same provider. If all accounts are exhausted, run kiro-pool status to check status, or kiro-pool prune to clean up invalid profiles.

    Required Action:

    Immediately halt further Kiro calls and inform the user if all accounts are exhausted:

    > *"The Kiro CLI multi-account pool is currently exhausted or all accounts are in cooldown/need re-login. Please wait for the cooldown window to reset or add additional accounts via kiro-pool import <name> or kiro-pool add <name>."*

    Then seamlessly fall back to mycli (gpt-5-nano or gpt-4o) or Antigravity's direct tools.

    2. Puter CLI Token Pool Exhaustion

    If all tokens in Puter's rotation pool hit rate limits:

    bash
    Error: Puter rate limit exceeded. Please wait a moment and try again.

    Required Action:

    Alert the user:

    > *"Puter AI CLI token pool limit is exhausted across all configured accounts."*

    Fall back to kiro-pool or Antigravity's built-in reasoning.

    Related Runbooks in AI Engineering

    View all skills →
    agent-observatory-workflowStandard ProtocolAI Engineering

    Step-by-step instructions for building and extending Python AI agent services: adding LangChain/LiteLLM tools, Tool-Calling RAG workflows, enforcing Human-in-the-Loop approvals, multi-key model failover, and pgvector embeddings.

    AGYClaude CodeCursor
    skills-sync pull agent-observatory-workflow
    Runbook
    doc-synchronizationStandard ProtocolAI Engineering

    High-priority rules and automated procedures for continuously keeping repository documentation, API references, architecture guides, changelogs, and agent skills synchronized with code changes autonomously without requiring human reminders.

    AGYClaude CodeCursor
    skills-sync pull doc-synchronization
    Runbook
    jules-ai-engineering-workflowStandard ProtocolAI Engineering

    Standard operating procedures for the autonomous Jules AI engineering review-improve-converge loop, evaluating code across 38 architectural dimensions and preparing merge-ready PRs for the human Technical Lead.

    AGYClaude CodeCursor
    skills-sync pull jules-ai-engineering-workflow
    Runbook