raphaelchristi/harness-evolver/setup
Claude Code and agent skill by raphaelchristi/harness-evolver
- community
Checking that the SKILL.md file is still in the repository.
Use when the user wants to set up the evolver in their project, optimize an LLM agent, improve agent performance, or mentions evolver for the first time in a project without .evolver.json.
Install
npx vskill@latest install raphaelchristi/harness-evolver/setupSKILL.md
/harness:setup
Set up the Harness Evolver v3 in a project. Explores the codebase, configures LangSmith, runs baseline evaluation.
Prerequisites
Check for LangSmith API key — it can be in the environment, the credentials file, or .env:
If MISSING: "Set your LangSmith API key: export LANGSMITH_API_KEY=lsv2_pt_... or run npx harness-evolver@latest to configure."
The tools auto-load the key from the credentials file, but the env var takes precedence.
Resolve Tool Path and Python
Use $EVOLVER_PY instead of python3 for ALL tool invocations. This ensures the venv with langsmith is used.
IMPORTANT: Never pass `LANGSMITH_API_KEY` inline in Bash commands. The key is loaded automatically by the SessionStart hook (from credentials file or environment) and by each Python tool's ensure_langsmith_api_key(). Passing it inline exposes it in the output. If the key is missing, tell the user to run export LANGSMITH_API_KEY=lsv2_pt_... instead.
Phase 1: Explore Project (automatic)
Monorepo detection: if the project root has multiple subdirectories with their own main.py or pyproject.toml, it's a monorepo. Use AskUserQuestion to ask WHICH app to optimize before proceeding — do NOT scan everything.
Look for:
- Entry points: files with
if __name__, or namedmain.py,app.py,agent.py,graph.py,pipeline.py - Existing LangSmith config:
LANGCHAIN_PROJECT/LANGSMITH_PROJECTin env or.env - Existing test data: JSON files with inputs, CSV files, etc.
- Dependencies:
requirements.txt,pyproject.toml
To identify the framework, read the entry point file and its immediate imports. The proposer agents will use Context7 MCP for detailed documentation lookup — you don't need to detect every library, just identify the main framework (LangGraph, CrewAI, OpenAI Agents SDK, etc.) from the imports you see.
Detect virtual environments — check for venvs in the project or parent directories:
If a venv is found, use it for the entry point instead of bare python. The agent's dependencies are likely installed there, not in the system Python. For example: ../.venv/bin/python agent.py {input} instead of python agent.py {input}.
Identify the run command — how to execute the agent. Use {input} as a placeholder for the JSON file path:
.venv/bin/python main.py {input}— if venv detected (preferred)python main.py {input}— agent reads JSON file from positional argpython main.py --input {input}— agent reads JSON file from--inputflagpython main.py --query {input_json}— agent receives inline JSON string
The runner writes {"input": "user question..."} to a temp .json file and replaces {input} with the file path. If the entry point already contains --input (without placeholder), the runner appends the file path as the next argument.
If no placeholder and no --input flag detected, the runner appends --input <path> --output <path>.
Phase 2: Confirm Configuration (interactive)
Present all detected configuration in one view with smart defaults and ask for confirmation.
Use AskUserQuestion:
If "Looks good, proceed": Use defaults — goals=accuracy, data=generate 30 with testgen. Skip straight to Phase 3.
If "Customize goals": Ask the goals question, then proceed to Phase 3 with testgen as default data source.
Use AskUserQuestion:
``json { "questions": [{ "question": "What do you want to optimize?", "header": "Goals", "multiSelect": true, "options": [ {"label": "Accuracy", "description": "Correctness of outputs — LLM-as-judge evaluator"}, {"label": "Latency", "description": "Response time — track and minimize"}, {"label": "Token efficiency", "description": "Fewer tokens for same quality"}, {"label": "Error handling", "description": "Reduce failures, timeouts, crashes"} ] }] } ``
Map selections to evaluator configuration for setup.py.
Phase 2.5: Mode Selection
Pass selection to setup.py as --mode light|balanced|heavy.
The mode determines testgen count:
light: generate 20 examplesbalanced: generate 30 examples (default, current behavior)heavy: generate 50 examples
If "I have test data": Ask the data source question, then proceed to Phase 3 with accuracy as default goal.
Use AskUserQuestion with preview:
``json { "questions": [{ "question": "Where should test inputs come from?", "header": "Test data", "multiSelect": false, "options": [ { "label": "Import from LangSmith", "description": "Use real production traces as test inputs", "preview": "## Import from LangSmith\n\nFetches up to 100 recent traces from your production project.\nPrioritizes traces with negative feedback.\nCreates a LangSmith Dataset with real user inputs.\n\nRequires: an existing LangSmith project with traces." }, { "label": "I have a file", "description": "Point to an existing file with test inputs", "preview": "## Provide Test Data\n\nSupported formats:\n- JSON array of inputs\n- JSON with {\"inputs\": {...}} objects\n- CSV with input columns\n\nExample:\n`json\n[\n {\"input\": \"What is Python?\"},\n {\"input\": \"Explain quantum computing\"}\n]\n`" } ] }] } ``
If "Import from LangSmith": discover projects and ask which one (same as v2 Phase 1.9). If "I have a file": ask for file path.
If "Let me adjust everything": Ask all three original questions in sequence — confirm detection (entry point, framework, run command), then goals, then data source — using the question formats above.
Phase 3: Run Setup
Build the setup.py command based on all gathered information:
If "Generate from code" was selected AND no test data file exists, first spawn the testgen agent to generate inputs, then pass the generated file to setup.py.
Phase 4: Generate Test Data (if needed)
If testgen is needed, spawn it:
Then pass --dataset-from-file test_inputs.json to setup.py.
Phase 5: Report
Gotchas
- If
.evolver.jsonalready exists, ask before overwriting. - If the agent needs a venv, the run command should activate it:
cd {dir} && .venv/bin/python main.py - No project venv detected: Before building the entry_point, check if
.venv/bin/pythonorvenv/bin/pythonexists in the project directory. If NOT, warn the user:
`` WARNING: No Python venv found in this project (.venv/ or venv/). The entry_point should use the project's own Python, not ~/.evolver/venv/bin/python. Create one first: python3 -m venv .venv && .venv/bin/pip install -r requirements.txt ` Do NOT use ~/.evolver/venv/bin/python` as the entry_point — that's for evolver tools only. Using it pollutes the evolver venv with agent dependencies.
- If LangSmith connection fails, check API key and network. The
ensure_langsmith_api_key()function validates key format and rejects dummy/test keys with a warning. - Eval concurrency defaults to 3 (runs 3 examples in parallel). If the agent can't handle parallel execution (writes to shared files, uses a fixed port, holds a DB lock), set
eval_concurrency: 1in.evolver.jsonafter setup. - Companion plugin: For full proposer observability, recommend installing
langsmith-tracingfromlangchain-ai/langsmith-claude-code-plugins. Each proposer's file reads, edits, and commits become visible in LangSmith.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/setup/SKILL.md
Popularity
- Repository stars
- 53
- Repository forks
- 6
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/raphaelchristi/harness-evolver/setup)