Use when a task has a large solution space and a measurable quality signal and the goal is to generate many candidates and select the best — naming/branding, UX/UI variants, marketing copy, code optimization, prompt tuning. Triggers: "brainstorm and pick the best", "explore and exploit", "simulated annealing", "tournament of options", "generate N options and rank them", iterate-until-score loops, or /explore-exploit.
Ships in sejas-ai-code-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Domain-agnostic search harness: takes a goal, a frozen rubric, and a budget, then orchestrates subagents through hot exploration → clustering → successive-halving tournament → stochastic-beam refinement → Swiss-pod final. Returns top 3 finalists with scores, strengths, weaknesses, and reasoning. Every round is appended to a markdown log before the next round starts.
The pipeline is a hybrid of the 3 winners of a judged 20-metaheuristic search (2026-06-12, see run log): successive halving (8.82/10) is the budget backbone, Gumbel-top-k beam (7.80) is the refinement engine, Swiss pairwise pods (7.90) decide the final order. Classic simulated annealing ranked 14/20 — sequential accept/reject chains waste a parallel-agent substrate; its temperature idea survives as the rung schedule and decaying selection noise.
Violating the letter of these rules is violating their spirit.
Write to the log: goal, frozen rubric + anchors, hard constraints as numbers, budget split, competitors, candidate JSON schema, and the verbatim judge prompt. This file is the contract; everything later references it.
Default log path: ~/claude.nosync/explore-exploit/<YYYY-MM-DD>-<slug>.md (fall back to ./explore-exploit-runs/ outside that workspace).
10–12 parallel generator agents, each locked to a distinct creative lens/persona (diversity beats volume — 8 generators on one prompt produce 8× the same pun). Each emits 6–8 cheap candidates with self-reported constraint fields. Orchestrator JS then dedupes and kills hard-constraint violators for free.
Group survivors into motif/approach families (by shared root word, layout archetype, algorithmic idea). Cap survivors per family per rung so one seductive motif can't flood the field before judging. This is the quality-diversity guard.
Repeat until ≤8 alive: judge in comparative fields of 5–10 → keep top 50%.
Beam = Gumbel-top-k over frozen scores: score + τ·(-ln(-ln(u))), τ decaying 2.0 → 0.3 per round (selection randomness needs no logits). Per beam member: 2–3 expander agents with assigned mutation lenses + 1 unconditioned wildcard agent per round as the exploration floor. Judge new candidates only, with frozen beam anchors displayed for calibration. A variant replaces its parent only if it beats it inside the same field. Prompt-level cooling: expander instructions go from "radical reinvention" → "minimal polish".
Real verification lookups on ≤6 finalists; collision = dead regardless of rank. Then one round-robin pod: a judge receives all survivors and returns a strict ordering (pairwise, drift-immune); JS expands to pairwise results and aggregates by Borda count. Frozen Phase-3/4 scores break ties.
Final log section + in-message summary:
Use the Workflow tool (one workflow can run multiple phases; or one workflow per phase with the main loop writing the log between phases). Generic parameterized script: see workflow-template.js in this skill directory.
Two Workflow-runtime gotchas the template handles:
Math.random() throws in workflow scripts — pass a pre-generated noise: [...] array via args for Gumbel noise.agent() call per round, or the main loop writes between phase-workflows.Cost caps. Two layers: the budget input caps agent calls structurally, and a +300k-style token directive in the user prompt becomes a hard ceiling enforced by the Workflow runtime. The template degrades gracefully against that ceiling via budget.remaining() — shedding generators, extra rungs, refine rounds, then verification, in that order, always keeping reserve to reach the Final phase and always logging what was shed. Below ~250k expect a shallow run; an unverified winner is flagged verified: false.
When the signal is deterministic (execution accuracy, benchmark ms, test pass rate), it replaces the LLM judge — it is drift-immune by construction. Adjustments:
| Domain | Candidates | Cheap rung proxy | Expensive final eval |
|---|---|---|---|
| Naming/branding | names | memorability + fit only | trademark/domain/language lookups |
| UX/UI | design directions | one-line concept critique | coded prototype + design-review rubric |
| Code optimization | patch variants | micro-benchmark | full suite + production-shaped profile |
| Copy/content | drafts | hook strength only | full rubric + fact-check |
| Mistake | Reality / Fix |
|---|---|
| "Fresh judges for the final round, no earlier context" | That's score drift. Same frozen judge prompt; final comparison via pairwise ordering pods. |
| Whole process lives in-message | Unauditable, unrepeatable. Append to the log file every round, before the next round. |
| One-shot exploration, then pure exploitation | Converged pool, local optimum. Wildcard agent every refinement round + Gumbel τ floor. |
| Dedup only, no clustering | One seductive motif floods the field. Cap survivors per family per rung. |
| Scoring candidates in isolation | Everything scores ~7. Fields of 5–10, comparative, always. |
| Hardcoding the domain into the plan | Goal, rubric, lenses, mutation operators are parameters; phases never change. |
| "Brand risk looks fine" without lookups | Verify with real searches on finalists; evidence links in the log; collision = dead. |
| Re-scoring survivors each round "for fairness" | Score drift kills good early candidates. Scores freeze at first judgment. |
| Agent computes weighted totals | LLM arithmetic drifts. Orchestrator JS computes everything. |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
40 skills in this plugin
/ai-prsList all open PRs targeting the Studio AI command with draft status, approval state, and requested reviewers/ai-radarUse when Antonio wants to catch up on frontier AI — "what's new in AI", "AI radar", "what is karpathy working on", "AI trends", "research digest", "what should I learn next", "where to invest learning time", or /ai-radar./blog-postThis skill should be used when the user asks to "write a blog post", "draft a blog post", "create a blog post", "write an article about", or wants to produce a markdown blog post on any topic. Outputs to ~/claude.nosync/posts/./brainstorming-namesUse when the user wants to name or rename something — a product, feature, brand, project, command, or company — or asks to "brainstorm names", "find a better name", "naming ideas", or invokes /brainstorming-names./chrome-doctorUse when Claude in Chrome doesn't work or the user wants Claude to drive their real Chrome — "chrome doesn't work", "browser tools missing", "it fails from T3", "troubleshoot chrome", "control my browser", or /chrome-doctor [task]. Diagnoses why the mcp__claude-in-chrome__* tools are missing or failing (headless/T3 launches without --chrome, extension not connected, wrong browser), fixes what it can, then runs the optional task in their Chrome./commitWrite a commit message and create a git commit. Use when the user wants to commit changes, asks for a commit message, or says "commit this" or "make a commit"./sejas-ai-code-skills:explore-exploitfrom sejas-ai-code-skills
sejas-ai-code-skills@cascade-code-general-misc-3 is listed by joshuarweaver/cascade-code-general-misc-3 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-3 --plugin sejas-ai-code-skills