Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

contest

БесплатноБез исполняемых скриптовНе проверен

Competing implementations with judge evaluation. Use when comparing multiple approaches, picking the best solution, or running a bake-off.

drnот drn★ 23 звезды на GitHub

Об этом скилле

Competing Implementations

Spawn multiple implementers to build different solutions to the same problem. A judge evaluates and picks the best one.

Prerequisites

Agent teams must be enabled in Claude Code settings:

CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1

If agent teams are not enabled, report: "Agent teams required. Add CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 to your Claude Code settings (env section)." and stop.

Arguments

  • $ARGUMENTS - Required: the problem to solve, ideally with evaluation criteria (e.g., "optimize the search function -- prioritize readability over raw speed")

If no arguments are provided, ask the user what they want implemented.

Context

  • Current branch: !git branch --show-current
  • Git status: !git status --short
  • Base ref: !git branch -r 2>/dev/null | grep -oE 'origin/(main|master)' | head -1
  • Project root: !pwd
  • Project type: !find . -maxdepth 1 \( -name go.mod -o -name Gemfile -o -name package.json -o -name Cargo.toml -o -name pyproject.toml -o -name setup.py -o -name requirements.txt -o -name pom.xml -o -name build.gradle -o -name Makefile \) 2>/dev/null | head -5
  • Recent commits: !git log --oneline -5
  • Test files: !find . -maxdepth 4 -name "*_test.*" -o -name "*.test.*" -o -name "*_spec.*" 2>/dev/null | head -10

Overview

You are the contest coordinator. Your job is to frame the problem, assign it to multiple implementers working in separate worktrees, and have a judge pick the winner.

Problem: $ARGUMENTS

You do NOT implement or judge yourself. You coordinate the contest.

Why this works: For design problems with multiple valid solutions (performance optimization, API design, architecture choices), building 2-3 options and comparing is faster and more reliable than debating hypothetical trade-offs.


Phase 0: Setup

  1. Clean working tree: If there are uncommitted changes, commit them with message "WIP: pre-contest state" before proceeding.

  2. Analyze the problem and define evaluation criteria. If the user didn't specify criteria, propose them:

    • Correctness (tests pass)
    • Readability / maintainability
    • Performance (if relevant)
    • Simplicity (fewer lines, fewer dependencies)
    • Consistency with existing codebase

    Present criteria to the user for approval.

  3. Define 2-3 distinct approaches. Each should be:

    • A genuinely different solution strategy (not minor variations)
    • Viable given the codebase and constraints

    Present approaches to the user before proceeding.

  4. Create worktrees for each contestant (avoids branch checkout conflicts):

    git worktree add /tmp/contest-approach-1 -b contest/approach-1
    git worktree add /tmp/contest-approach-2 -b contest/approach-2
    git worktree add /tmp/contest-approach-3 -b contest/approach-3  # if 3 approaches
    
  5. Create the team (clean up stale session first if needed):

    TeamDelete() -- ignore if no existing team
    TeamCreate(team_name: "contest-session", description: "Contest: {brief problem summary}")
    
  6. Create the task list with TaskCreate:

    • "Implement approach 1: {brief}" -- for contestant-1
    • "Implement approach 2: {brief}" -- for contestant-2
    • "Implement approach 3: {brief}" -- for contestant-3 (if applicable)
    • "Judge implementations" -- for judge, blocked by all implementation tasks
  7. Spawn all agents in a single message. Use model: "sonnet" for contestants.


Phase 1: Implementation

Send each contestant their assignment via SendMessage:

PROBLEM: {full problem description from $ARGUMENTS}

YOUR APPROACH: {the specific approach assigned to this contestant}
YOUR WORKTREE: /tmp/contest-approach-{N}

OTHER APPROACHES (for awareness -- do NOT look at their code):
{list the other approaches and their contestants}

EVALUATION CRITERIA (in priority order):
{numbered list of criteria}

INSTRUCTIONS:
1. Work ONLY in your worktree directory: /tmp/contest-approach-{N}
2. Explore the codebase to understand the current state.
3. Implement your approach. Keep it focused.
4. Run existing tests to ensure nothing breaks.
5. Write new tests for your implementation.
6. Run a sanity check (compile, lint).
7. Commit your changes on your branch.
8. When done, message me (the lead) with:
   - Summary of your approach
   - Trade-offs you chose
   - Test results
   - Why you think your approach is best

DO NOT look at other contestants' worktrees or branches.

Mark your task as completed.

Wait for all contestants to finish.


Phase 2: Judging

Once all contestants complete:

  1. Gather all implementations: For each branch, run:

    git diff {default branch}...contest/approach-{N}
    git diff {default branch}...contest/approach-{N} --stat
    

    Read the changed files on each branch.

  2. Send the judge all implementations:

PROBLEM: {full problem description}

EVALUATION CRITERIA (in priority order):
{numbered list}

IMPL
Полный SKILL.md на GitHub

Установить contest в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл contest?

Competing implementations with judge evaluation. Use when comparing multiple approaches, picking the best solution, or running a bake-off.

Как установить скилл contest?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл contest запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить contest с