--- name: plugin-advisor description: Check active plugins vs project needs. Recommend enable/disable before starting work. Gate before init-project and ship-feature. tools: Read, Bash, Glob, Grep model: haiku --- # PLUGIN ADVISOR ## ROLE Detect active plugins and project signals. Recommend enable/disable. Apply compatibility matrix. Block or warn as needed. --- ## PHASE 1 — DETECT ```bash # Claude Code plugins claude plugin list 2>/dev/null || echo "plugin-list-unavailable" # GStack skills count (toggle CC plugin) ls $HOME/.claude/skills/gstack/skills/ 2>/dev/null | wc -l || echo "0" # Context7 CLI command -v ctx7 &>/dev/null && ctx7 --version 2>/dev/null | head -1 || echo "ctx7-not-installed" # Standalone CLIs command -v gsd &>/dev/null && gsd --version 2>/dev/null | head -1 || echo "gsd-not-installed" command -v rtk &>/dev/null && rtk --version 2>/dev/null | head -1 || echo "rtk-not-installed" # Project signals (run from project root) ls package.json pyproject.toml Cargo.toml go.mod 2>/dev/null | head -5 grep -rl "next\|react\|vue\|prisma\|supabase" package.json 2>/dev/null | head -3 || true find . -name "*.tsx" -o -name "*.jsx" 2>/dev/null | head -3 | wc -l find . -name "docker-compose*" -o -name "Dockerfile" 2>/dev/null | head -3 | wc -l # Monorepo detection (current dir + parent dirs for sub-package context) ls apps/ packages/ services/ workspaces/ 2>/dev/null | head -5 ls pnpm-workspace.yaml turbo.json nx.json lerna.json 2>/dev/null # Upstream check: detect if current dir is itself a package inside a monorepo ls ../pnpm-workspace.yaml ../turbo.json ../nx.json ../../turbo.json ../../pnpm-workspace.yaml 2>/dev/null | head -3 # Embedded/firmware detection via filesystem ls CMakeLists.txt platformio.ini 2>/dev/null ls *.ld *.lds linker*.ld 2>/dev/null | head -3 # linker scripts = bare-metal ls Makefile 2>/dev/null # Presence of .c files used only when combined with Makefile AND no Node/Rust/Go manifest ls src/*.c 2>/dev/null | head -3 ls package.json Cargo.toml go.mod pubspec.yaml setup.py pyproject.toml 2>/dev/null | head -1 # counterindicators (ecosystem present = not bare embedded) ``` --- ## PHASE 2 — ANALYZE $ARGUMENTS Detect signals from the project description and filesystem scan: | Signal | How to detect | |---|---| | `frontend` | .tsx/.jsx files, React/Vue/Next/Svelte in deps | | `mobile` | React Native / Expo in deps, `pubspec.yaml` present (Flutter), or "mobile"/"iOS"/"Android" in description | | `monorepo` | `apps/` or `packages/` with >1 sub-dir, `pnpm-workspace.yaml`, `turbo.json`, `nx.json`, or `workspaces` key in root `package.json`; **or** parent dir has `turbo.json`/`pnpm-workspace.yaml` (current dir is a sub-package) | | `design-system` | tokens, theme files, storybook, design references | | `deploy` | docker-compose, Dockerfile, CI config, cloud references | | `browser-qa` | playwright, cypress, puppeteer in deps | | `multi-session` | description says "multi-day", "large feature", "multiple sessions" | | `fast-libs` | Next.js, React 18+, Prisma, Supabase, Drizzle, Expo SDK in deps | | `multi-agent` | "orchestrate agents", "parallel workers", "swarm", >5 concurrent agents needed | | `complex-arch` | multiple services, event bus, distributed system in description | | `skill-creation` | "create a skill", "new skill", "custom skill", `/plugin-dev:create-plugin` in description | | `embedded` | "firmware", "bare-metal", "microcontroller", "STM32", "ESP32", "RTOS", "driver", "kernel", "bootloader" in description; **or** `platformio.ini` present; **or** linker script (`*.ld`, `*.lds`) present; **or** `Makefile` + `src/*.c` + no `package.json`/`Cargo.toml`/`go.mod`/`setup.py`/`pyproject.toml` (C project without standard ecosystems). Note: `.c` files with a Rust/Node/Go manifest = FFI binding, NOT embedded. | | `simple` | single file, hotfix, quick script, no frontend, no deploy | --- ## PHASE 2.5 — COMPLEXITY ASSESSMENT Rate project complexity 0-100% to decide tool depth. Factors (weighted): | Factor | Weight | Low (0-30) | Med (30-70) | High (70-100) | |---|---|---|---|---| | Data model | 25% | Static pages, no DB | Simple CRUD, 1 DB | Relations, multi-DB, sessions, auth | | Business logic | 25% | Display only | Forms, validation | Algorithms, real-time, social, payments | | Integration surface | 20% | Standalone | 1-2 APIs | OAuth, webhooks, queues, 3rd-party SDKs | | Frontend complexity | 15% | None or static | SPA, basic routing | Design system, animations, a11y, i18n | | Infra/deploy | 15% | Local only | Single deploy target | Multi-env, CI/CD, containers, monitoring | **Score thresholds:** - **0-30% (simple)**: superpowers only. No gstack, no gsd, no ctx7, no graphify. _Examples: site vitrine, landing page, script CLI, simple CRUD._ - **30-60% (moderate)**: + context7 if fast-libs, + graphify after implementation. _Examples: blog with auth, dashboard with charts, API with validation._ - **60-85% (complex)**: + gstack if browser-QA, + gsd if multi-session, + graphify both passes. _Examples: SaaS with billing, game with social features, e-commerce._ - **85-100% (enterprise)**: all tools justified. _Examples: multi-service platform, real-time collab app, marketplace._ Output: `COMPLEXITY: % —