ogt-cli-agent

Run Codex CLI, Claude Code, OpenCode, Gemini CLI, or Pi Coding Agent via background process for programmatic control. Balance load across providers.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ogt-cli-agent" with this command: npx skills add opendndapps/ogt-skills/opendndapps-ogt-skills-ogt-cli-agent

Coding Agent (bash-first)

Use bash (with optional background mode) for all coding agent work.

⚠️ Load Balancing Required!

Distribute work across multiple CLI tools to balance API usage and costs.

CLIAuthBest ForSpawn Weight
geminiGoogle OAuthFast tasks, bulk work, 1M context35%
claudeAnthropic OAuthComplex reasoning, code review35%
opencodeConfigurableFlexible backends20%
codexGitHub CopilotGeneral coding10%

Why balance? Claude/Gemini OAuth = included in Pro memberships. Don't overload one provider.

Quick Selection Guide

# Fast generation, bulk content (use gemini)
gemini -p "Generate 10 creature files"

# Complex reasoning, architecture (use claude)
echo "Review this codebase architecture" | claude -p

# TypeScript fixes, simple edits (rotate between all)
# Batch of 6? → 2 gemini, 2 claude, 1 opencode, 1 codex

⚠️ PTY Mode Required!

Coding agents are interactive terminal applications that need a pseudo-terminal.

Always use pty:true when running coding agents:

# ✅ Correct - with PTY
bash pty:true command:"codex exec 'Your prompt'"

# ❌ Wrong - no PTY
bash command:"codex exec 'Your prompt'"

Quick Reference by Tool

Gemini CLI (fast, 1M context, Google Search)

# One-shot
gemini -p "Your task"

# With model selection
gemini -p "Complex task" -m gemini-2.5-pro
gemini -p "Quick task" -m gemini-2.5-flash

# Background
bash pty:true background:true workdir:~/project command:"gemini -p 'Your task'"

Claude CLI (deep reasoning, extended thinking)

# One-shot (pipe preferred)
echo "Your task" | claude -p

# With model
echo "Complex analysis" | claude -p --model opus
echo "Standard task" | claude -p --model sonnet

# Background
bash pty:true background:true workdir:~/project command:"claude 'Your task'"

OpenCode CLI (flexible backends)

# One-shot
opencode run "Your task"

# Background
bash pty:true background:true workdir:~/project command:"opencode run 'Your task'"

Codex CLI (GitHub Copilot)

# Needs git repo!
bash pty:true workdir:~/project command:"codex exec 'Your task'"

# Full-auto mode
bash pty:true workdir:~/project command:"codex exec --full-auto 'Build feature X'"

Spawning Balanced Sub-Agents

When spawning multiple sub-agents, distribute across providers:

# Example: 6 TypeScript fix tasks
# Assign: 2 to gemini, 2 to claude, 1 to opencode, 1 to codex

# Task 1-2: Gemini
bash pty:true background:true workdir:~/project command:"gemini -p 'Fix TS errors in file1.ts file2.ts'"

# Task 3-4: Claude  
bash pty:true background:true workdir:~/project command:"claude -p 'Fix TS errors in file3.ts file4.ts'"

# Task 5: OpenCode
bash pty:true background:true workdir:~/project command:"opencode run 'Fix TS errors in file5.ts'"

# Task 6: Codex
bash pty:true background:true workdir:~/project command:"codex exec 'Fix TS errors in file6.ts'"

Bash Tool Parameters

ParameterTypeDescription
commandstringShell command to run
ptybooleanRequired for coding agents!
workdirstringWorking directory
backgroundbooleanRun in background
timeoutnumberTimeout in seconds

Process Tool Actions

ActionDescription
listList all sessions
pollCheck if running
logGet output
writeSend raw data
submitSend data + Enter
killTerminate

Rules

  1. Balance load — distribute across gemini/claude/opencode/codex
  2. Always use pty:true — coding agents need a terminal
  3. Respect tool choice — if user asks for specific tool, use it
  4. Be patient — don't kill slow sessions
  5. Monitor with process:log — check progress without interfering

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

ogt-cli-claude

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ogt-docs-rules-code

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ogt-docs-rules-code-back

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ogt-cli-gemini

No summary provided by upstream source.

Repository SourceNeeds Review