claudish-usage
Claudish-usage guides AI agents on delegating Claude Code execution to sub-agents when working with external models via OpenRouter (Grok, GPT-5, Gemini, MiniMax). Use this skill when users mention alternative AI models, OpenRouter, or Claudish CLI to prevent context window pollution by routing requests through designated sub-agents rather than executing directly in the main conversation context.
git clone --depth 1 https://github.com/MadAppGang/claude-code /tmp/claudish-usage && cp -r /tmp/claudish-usage/plugins/code-analysis/skills/claudish-usage ~/.claude/skills/claudish-usageSKILL.md
# Claudish Usage Skill
**Version:** 1.1.0
**Purpose:** Guide AI agents on how to use Claudish CLI to run Claude Code with OpenRouter models
**Status:** Production Ready
## ⚠️ CRITICAL RULES - READ FIRST
### 🚫 NEVER Run Claudish from Main Context
**Claudish MUST ONLY be run through sub-agents** unless the user **explicitly** requests direct execution.
**Why:**
- Running Claudish directly pollutes main context with 10K+ tokens (full conversation + reasoning)
- Destroys context window efficiency
- Makes main conversation unmanageable
**When you can run Claudish directly:**
- ✅ User explicitly says "run claudish directly" or "don't use a sub-agent"
- ✅ User is debugging and wants to see full output
- ✅ User specifically requests main context execution
**When you MUST use sub-agent:**
- ✅ User says "use Grok to implement X" (delegate to sub-agent)
- ✅ User says "ask GPT-5 to review X" (delegate to sub-agent)
- ✅ User mentions any model name without "directly" (delegate to sub-agent)
- ✅ Any production task (always delegate)
### 📋 Workflow Decision Tree
```
User Request
↓
Does it mention Claudish/OpenRouter/model name? → NO → Don't use this skill
↓ YES
↓
Does user say "directly" or "in main context"? → YES → Run in main context (rare)
↓ NO
↓
Find appropriate agent or create one → Delegate to sub-agent (default)
```
## 🤖 Agent Selection Guide
### Step 1: Find the Right Agent
**When user requests Claudish task, follow this process:**
1. **Check for existing agents** that support proxy mode or external model delegation
2. **If no suitable agent exists:**
- Suggest creating a new proxy-mode agent for this task type
- Offer to proceed with generic `general-purpose` agent if user declines
3. **If user declines agent creation:**
- Warn about context pollution
- Ask if they want to proceed anyway
### Step 2: Agent Type Selection Matrix
> **Note:** External models are invoked via Bash+claudish CLI with `--model` flag.
> The `--agent` flag gives the external model specialized capabilities.
| Task Type | Recommended `--agent` | Alternatives | Notes |
|-----------|----------------------|--------------|-------|
| **Investigation** | `dev:researcher` | `code-analysis:detective` | For finding bugs, tracing issues |
| **Code review** | `agentdev:reviewer` | `frontend:reviewer` | Check if plugin has review agent |
| **Architecture** | `dev:architect` | `frontend:architect` | Design and planning tasks |
| **Implementation** | `dev:developer` | `frontend:developer` | Building features |
| **Testing** | `dev:test-architect` | — | Test strategy and coverage |
| **Debugging** | `dev:debugger` | — | Error analysis and tracing |
| **Documentation** | `dev:researcher` | — | Simple task, researcher works |
| **UI/Design** | `dev:ui` | `frontend:designer` | Visual and UX tasks |
### Step 3: Agent Creation Offer (When No Agent Exists)
**Template response:**
```
I notice you want to use [Model Name] for [task type].
RECOMMENDATION: Create a specialized [task type] agent with proxy mode support.
This would:
✅ Provide better task-specific guidance
✅ Reusable for future [task type] tasks
✅ Optimized prompting for [Model Name]
Options:
1. Create specialized agent (recommended) - takes 2-3 minutes
2. Use generic general-purpose agent - works but less optimized
3. Run directly in main context (NOT recommended - pollutes context)
Which would you prefer?
```
### Step 4: Common Agents by Plugin
**Frontend Plugin:**
- `typescript-frontend-dev` - Use for UI implementation with external models
- `frontend-architect` - Use for architecture planning with external models
- `senior-code-reviewer` - Use for code review (can delegate to external models)
- `test-architect` - Use for test planning/implementation
**Bun Backend Plugin:**
- `backend-developer` - Use for API implementation with external models
- `api-architect` - Use for API design with external models
**Code Analysis Plugin:**
- `codebase-detective` - Use for investigation tasks with external models
**No Plugin:**
- `general-purpose` - Default fallback for any task
### Step 5: Example Agent Selection
**Example 1: User says "use Grok to implement authentication"**
```
Task: Code implementation (authentication)
Plugin: Bun Backend (if backend) or Frontend (if UI)
Decision:
1. Check for backend-developer or typescript-frontend-dev agent
2. Found backend-developer? → Use it with Grok proxy
3. Not found? → Offer to create custom auth agent
4. User declines? → Use general-purpose with file-based pattern
```
**Example 2: User says "ask GPT-5 to review my API design"**
```
Task: Code review (API design)
Plugin: Bun Backend
Decision:
1. Check for api-architect or senior-code-reviewer agent
2. Found? → Use it with GPT-5 proxy
3. Not found? → Use general-purpose with review instructions
4. Never run directly in main context
```
**Example 3: User says "use Gemini to refactor this component"**
```
Task: Refactoring (component)
Plugin: Frontend
Decision:
1. No specialized refactoring agent exists
2. Offer to create component-refactoring agent
3. User declines? → Use typescript-frontend-dev with proxy
4. Still no agent? → Use general-purpose with file-based pattern
```
## Team Mode Integration
When used with the `/team` command for multi-model blind voting:
**External models are invoked via Bash+claudish CLI (deterministic, 100% reliable):**
```bash
claudish --model x-ai/grok-code-fast-1 --stdin --quiet \
< "ai-docs/sessions/team-xyz/vote-prompt.md" \
> "ai-docs/sessions/team-xyz/grok-result.md" \
2>"ai-docs/sessions/team-xyz/grok-stderr.log"; \
echo $? > "ai-docs/sessions/team-xyz/grok.exit"
```
The `--agent` flag is **required** to give the external model specialized capabilities
(e.g., claudemem search, structured investigation workflow).
## Overview
**Claudish** is a CLI tool that allows running Claude Code with any OpenRouter model (Grok, GPT-5, MiniMax, Gemini, etc.) by proxying requests through a localArchitecture Decision Records (ADR) documentation practice. Use when documenting architectural decisions, recording technical trade-offs, creating decision logs, or establishing architectural patterns. Trigger keywords - "ADR", "architecture decision", "decision record", "trade-offs", "architectural decision", "decision log".
Use when deciding whether to launch an agent, selecting which agent to use, or coordinating multiple agents. Covers delegation criteria, external-model patterns, task isolation, and agent selection strategies.
Use when designing REST or GraphQL APIs, defining endpoints, implementing pagination/filtering, handling API versioning, or establishing API documentation with OpenAPI/Swagger.
Use when integrating Apidog + OpenAPI specifications with your React app. Covers MCP server setup, type generation, and query layer integration. Use when setting up API clients, generating types from OpenAPI, or integrating with Apidog MCP.
Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. Use when implementing API integrations, debugging API errors (400, 401, 404), replacing mock APIs, verifying data types, or when user mentions endpoints, API calls, or backend integration.
Use when analyzing architecture and system design. Find design patterns, map layers, identify core abstractions via PageRank. Uses claudemem AST structural analysis for efficient architecture investigation.
On-demand security and code quality audit. Use when checking for vulnerabilities, security issues, code smells, or compliance problems. Trigger keywords - "audit", "security check", "vulnerability scan", "code quality", "compliance", "security audit".
Use when implementing authentication (JWT, sessions, OAuth), authorization (RBAC, ABAC), password hashing, MFA, or security best practices for backend services.