openJiuwen-ai/sciencediscovery / skills/evolve-design
evolve-design
VerifiedUse when the user wants to improve something by repeated search rather than one edit — a program, a prompt, a document, a pipeline, a configuration, an experimental protocol. Triggers on `/evolve-design`, "把这个做得更好", "搜索一个更好的方案", or any request to optimise against a measurable target. Runs a short checkpointed design conversation, verifies the scoring can rank candidates, then calls `create_evolve_run`. Not for a single fix, a refactor, or a question about existing code.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 22.7 KB |
| references/custom-script.md | markdown | 3.5 KB |
references/custom-script.md
View on GitHub# Writing a `custom_script` evaluator
Read this before writing the evaluator for mode `custom_script`. The mode is the fallback: use it
only when neither `dataset_metric` nor `test_gate` fits, because here you own the measuring
apparatus and the framework does none of the splitting or freezing for you.
## Contract
- Import the candidate as `candidate`.
- Score only the shards listed in `SCIENCE_AGENT_SHARDS` (comma-separated indices).
- Write `{"valid": true, "metrics": {"score": 0.83}}` to the path in `SCIENCE_AGENT_RESULT`. It is
a file, not stdout, because the candidate prints too.
- The score is 0–1, larger is better.
- The module docstring is the contract the search sees when it rewrites candidates, so say there
what the candidate must expose.
## The `error` field is the feedback channel
Whatever the evaluator puts in `error` is what the model writing the next candidate reads. For a
crash it has to say **where**, not just what: use a trimmed `traceback.format_exc()`, so the text
carries a file and a line. **The probe refuses an evaluator that reports an exception without
one.** `type(e).__name__` says nothing, and even `repr(e)` — a real message like
`ValueError('byte must be in range(0, 256)')` — leaves the next author hunting 200 lines for which
of a dozen appends it was, so it discards the whole approach and re-rolls with a fresh bug.
Measured: five candidates crashed in one run, the repair pass fired four times and landed once, and
two of the five were the same one-line bug found from scratch each time.
A *semantic* failure needs no line — "round trip does not match", "budget exhausted on 3 of 6" —
and the gate does not ask for one. Write the field even when the candidate is valid; that is how
the next one learns to stop.
## How it runs
As a script, with `__name__ == "__main__"` (`runpy.run_path`), and the scratch directory first on
`sys.path`. Top-level code runs, an `if __name__ == "__main__":` guard runs, and `import candidate`
resolves. You do not need to reverse-engineer this.
## The evaluator runs alone and reads nothing
It gets a scratch directory containing itself and the candidate — not the workspace, not the file
you read while designing, and there is no way to ship it one at run time. A shard is an *index*,
and what index `i` means is the evaluator's choice: it **builds** case `i` — an equation with a
known analytic solution, a generated input, a corpus drawn from a fixed seed, a property to check.
Anything it opens by path fails on every candidate. If the material genuinely lives in a file, that
is `dataset_metric`, which owns the splitting as well.
## Handing the script over: `evaluatorSource` or `evaluatorPath`
The script itself travels one of two ways. `evaluatorSource` carries it verbatim in the tool call,
which is the ordinary case. When the script is **too big to write in one call** — a frozen truth
table of thousands of points, where retyping it costs more tokens than most turns have — write it to
a workspace file with `run_shell`, run that file once to check it, and pass `evaluatorPath` instead.
The control plane reads the file **once**, at the moment `create_evolve_run` is called, checks the
contract above against its contents, and stores and freezes those bytes; editing the file afterwards
does not change the run. Exactly one of the two fields, never both.
The size ceiling is the same either way (200,000 characters). If the table alone is past it, the
evaluator still has to **build** each case from the shard index rather than carry the table — the
profile is not the exception to "reads nothing".
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |