{
  "markdown": "# Advisor Strategy — Multi-Model Advisor Skill for AI Coding Agents\n\n> Give your AI coding agent a senior engineer on-call. Works with **Claude Code** | **Cursor** | **Gemini CLI** | **Cline** | **Codex** | **Aider** | **Continue** | **Windsurf**\n\n[![Claude Code](https://img.shields.io/badge/Claude_Code-plugin-blue)](https://docs.anthropic.com/en/docs/claude-code)\n[![Cursor](https://img.shields.io/badge/Cursor-compatible-green)](https://cursor.com)\n[![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-extension-orange)](https://github.com/google-gemini/gemini-cli)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA skill plugin that implements [Anthropic's Advisor Strategy](https://claude.com/blog/the-advisor-strategy) for any AI coding agent. When your agent faces complex decisions — architecture, security, performance, debugging — it automatically escalates to a stronger model for expert guidance, then returns the advice to your conversation.\n\n**No API setup. No MCP server. Just install and go.**\n\n## Why Use an Advisor?\n\nYour AI coding agent is fast, but sometimes it needs a second opinion. The Advisor Strategy pairs your current model with a more capable one:\n\n- **Claude Sonnet + Opus advisor** = near-Opus intelligence at a fraction of the cost\n- **Claude Haiku + Opus advisor** = 85% cheaper than Sonnet with competitive quality\n- **Any model + stronger advisor** = better decisions on the tasks that matter most\n\nBased on [Anthropic's research](https://claude.com/blog/the-advisor-strategy): Sonnet with Opus advisor showed **2.7% improvement on SWE-bench** while **reducing cost by 11.9%**.\n\n## Features\n\n- **Autonomous escalation** — detects when advisor consultation would help\n- **6 domain advisors** — Architecture, Security, Performance, Debugging, Code Quality, Context Management\n- **Multi-advisor** — dispatch multiple advisors in parallel for complex problems\n- **Context management** — structured protocol keeps advisor prompts under 3000 tokens\n- **Multi-platform** — one plugin, works across all major AI coding tools\n- **Zero dependencies** — pure markdown skills, no external services\n- **Configurable model** — default Opus 4.6, switch to any model your platform supports\n\n## Quick Start\n\n### Claude Code\n\n```bash\n# If plugin marketplace is available:\n/plugin install advisor-strategy\n\n# Manual install:\ngit clone https://github.com/aivsomkar/advisor-strategy-skill.git\ncp -r advisor-strategy-skill ~/.claude/skills/advisor-strategy\n```\n\n### Cursor\n\n```bash\ngit clone https://github.com/aivsomkar/advisor-strategy-skill.git\n# Add to your project's .cursor/rules/ or ~/.cursor/rules/\ncp advisor-strategy-skill/skills/advisor-strategy/SKILL.md .cursor/rules/advisor-strategy.md\n```\n\n### Gemini CLI\n\n```bash\n# If extension install is available:\ngemini extensions install https://github.com/aivsomkar/advisor-strategy-skill\n\n# Manual: clone and reference GEMINI.md in your config\n```\n\n### Cline / Continue / Aider\n\n```bash\ngit clone https://github.com/aivsomkar/advisor-strategy-skill.git\n\n# Cline: add SKILL.md content to your custom instructions\n# Continue: add to .continue/rules/\n# Aider: add to CONVENTIONS.md or .aider.conf.yml\n```\n\n### Any Other Agent\n\nCopy `skills/advisor-strategy/SKILL.md` into whatever instruction/rules/system-prompt mechanism your tool supports.\n\n## How It Works\n\n```\n┌─────────────────────────────────────────────────┐\n│  Your AI Coding Agent (any platform)            │\n│                                                 │\n│  1. Detects advisor trigger                     │\n│  2. Extracts relevant context (not full chat)   │\n│  3. Announces: \"Consulting advisor...\"          │\n│  4. Dispatches advisor (stronger model)         │\n│                                                 │\n│     ┌───────────────────────────────────┐       │\n│     │  Advisor (Opus / GPT-4o / etc.)   │       │\n│     │                                   │       │\n│     │  - Receives focused context       │       │\n│     │  - Analyzes with domain expertise │       │\n│     │  - Returns structured advice      │       │\n│     └───────────────────────────────────┘       │\n│                                                 │\n│  5. Presents advisor response (flagged)         │\n│  6. Synthesizes: advisor + own assessment       │\n│  7. Proceeds with best approach                 │\n└─────────────────────────────────────────────────┘\n```\n\n## When Does the Advisor Trigger?\n\n### Automatically\n\nThe skill detects these situations and escalates:\n\n| Trigger | Example |\n|---------|---------|\n| **Architectural decisions** | System design, API design, database schema, major refactors |\n| **Debugging dead-ends** | Stuck after 2+ failed attempts |\n| **Security-sensitive code** | Auth, crypto, permissions, input validation |\n| **High-stakes changes** | Production configs, data migrations, CI/CD |\n| **Performance-critical paths** | Hot loops, database queries, caching |\n| **Trade-off decisions** | Multiple valid approaches, unclear which is best |\n| **Context growing large** | Conversation needs summarization and refocus |\n\n### Explicitly\n\nJust tell your agent:\n- \"use advisor\" / \"consult advisor\" / \"get a second opinion\"\n- \"ask opus about this\" / \"escalate this\"\n- \"security review this code\" / \"architecture check\"\n\n## Domain Advisors\n\nEach domain advisor gets a tailored prompt focused on its area of expertise:\n\n| Domain | What It Reviews | When It Triggers |\n|--------|----------------|-----------------|\n| **Architecture** | System design, patterns, modularity, extensibility | \"design\", \"structure\", \"refactor\", \"scale\" |\n| **Security** | OWASP top 10, auth flows, input validation, secrets | \"auth\", \"security\", \"vulnerability\" |\n| **Performance** | Profiling, caching, algorithmic complexity, DB queries | \"slow\", \"optimize\", \"latency\", \"memory\" |\n| **Debugging** | Root cause analysis, hypothesis generation, test strategies | \"stuck\", \"failing\", \"root cause\" |\n| **Code Quality** | Readability, maintainability, testing, patterns | \"review\", \"clean up\", \"best practice\" |\n| **Context Manager** | Distill conversation, identify key decisions, compress | Auto-triggered when context is large |\n\n### Multi-Advisor Consultations\n\nFor complex problems, dispatch multiple advisors in parallel:\n\n```\n\"Consult architecture AND security advisors on this API design\"\n```\n\nThe skill dispatches both, then synthesizes — surfacing conflicts (security vs. performance trade-offs) for your decision.\n\n## Context Management\n\nThe skill enforces a strict context protocol. Your advisor gets focused signal, not noise:\n\n| Component | Token Budget |\n|-----------|-------------|\n| Problem statement | ~50-100 tokens (1-3 sentences) |\n| Relevant code | ~500-2000 tokens (specific files only) |\n| Failed approaches | ~100-200 tokens (brief summary) |\n| Constraints | ~50-100 tokens |\n| **Total per consultation** | **~1000-3000 tokens** |\n\nNo full conversation dumps. No irrelevant files. No tool call logs.\n\n## Configuration\n\n### Changing the Advisor Model\n\nTell your agent:\n```\n\"Use sonnet as advisor\"\n\"Advisor model: haiku\"\n```\n\n### When Opus Is Unavailable\n\nThe skill does **NOT** silently fall back. It:\n1. Informs you Opus is unavailable\n2. Explains the trade-offs of proceeding without it\n3. Asks whether to continue with the current model or wait\n\n### Skipping the Advisor\n\n```\n\"Don't use advisor\"\n\"Skip advisor for this\"\n```\n\n## Platform Compatibility\n\n| Platform | How the Advisor Is Invoked | Status |\n|----------|---------------------------|--------|\n| **Claude Code** | `Agent(model: \"opus\")` sub-agent dispatch | Fully supported |\n| **Cursor** | Model switching via agent mode | Compatible |\n| **Gemini CLI** | Gemini extension with model dispatch | Compatible |\n| **Cline** | Sub-agent with configurable model backend | Compatible |\n| **Continue** | Model switching in config | Compatible |\n| **Aider** | `/model` command switching | Compatible |\n| **Codex** | Agent dispatch mechanism | Compatible |\n| **Windsurf** | Cascade model selection | Compatible |\n\nEach platform uses its **native mechanism** — no external CLI, no MCP server, no API keys beyond what your tool already has.\n\n## Repository Structure\n\n```\nadvisor-strategy-skill/\n├── .claude-plugin/              # Claude Code plugin manifest\n│   ├── plugin.json\n│   └── marketplace.json\n├── gemini-extension.json        # Gemini CLI extension manifest\n├── CLAUDE.md                    # Claude Code platform instructions\n├── GEMINI.md                    # Gemini CLI platform instructions\n├── AGENTS.md                    # Generic agent instructions (Codex, etc.)\n├── hooks/                       # Platform hooks (if needed)\n├── skills/\n│   └── advisor-strategy/\n│       ├── SKILL.md             # The skill (triggers, templates, protocol)\n│       └── examples.md          # Usage examples for each domain\n├── package.json\n└── README.md\n```\n\n## Based On\n\n- [The Advisor Strategy](https://claude.com/blog/the-advisor-strategy) by Anthropic\n- Inspired by the [Superpowers](https://github.com/obra/superpowers) plugin architecture\n- Implements multi-platform skill distribution following the same pattern\n\n## Contributing\n\nPRs welcome. If you've adapted the advisor strategy for a platform not listed above, please contribute the adapter.\n\n## License\n\nMIT\n",
  "bytes": 9319,
  "sha": "7abc45edea401d4277dce11f5f6345aac7cab7b324eaee6c1bd0f6bc25654a3e",
  "repo_slug": "aivsomkar/advisor-strategy-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_aivsomkar_advisor_strategy_skill_ff5636d4/readme"
}