shinka-inspect
Load top-performing Shinka programs into agent context using `shinka.utils.load_programs_to_df`, and emit a compact Markdown…
Convert an existing codebase in the current working directory into a ShinkaEvolve task directory by snapshotting the relevant code, adding evolve blocks, and generating `evaluate.py` plus Shinka runner/config files. Use when the user wants to optimize existing code with Shinka
Claude Code
$ npx -y skills add sakanaai/shinkaevolve --skill shinka-convert --agent claude-code
Codex
$ npx skills add sakanaai/shinkaevolve --skill shinka-convert -a codex -y
Cursor
$ npx skills add sakanaai/shinkaevolve --skill shinka-convert -a cursor -y
Gemini CLI
$ npx skills add sakanaai/shinkaevolve --skill shinka-convert -a gemini-cli -y
GitHub Copilot
$ npx skills add sakanaai/shinkaevolve --skill shinka-convert -a github-copilot -y
OpenCode
$ npx skills add sakanaai/shinkaevolve --skill shinka-convert -a opencode -y
Windsurf
$ npx skills add sakanaai/shinkaevolve --skill shinka-convert -a windsurf -y
name: shinka-convert description: Convert an existing codebase in the current working directory into a ShinkaEvolve task directory by snapshotting the relevant code, adding evolve blocks, and generating `evaluate.py` plus Shinka runner/config files. Use when the user wants to optimize existing code with Shinka instead of creating a brand-new task from a natural-language description.
Use this skill to turn an existing project into a Shinka-ready task.
This is the alternative starting point to `shinka-setup`:
After conversion, the user should still be able to use `shinka-run`.
Invoke this skill when the user:
Do not use this skill when:
Start from freeform instructions, then ask follow-ups only if high-impact details are missing.
Collect:
Generate a sidecar task directory at `./shinka_task/` unless the user requests another path.
The task directory should contain:
Do not edit the original source tree unless the user explicitly requests in-place conversion.
1. Inspect the current working directory.
2. Infer the evolvable region from the user's instructions.
3. Choose the minimal runnable snapshot scope.
4. Create the sidecar task directory.
5. Rewrite the snapshot into a stable Shinka contract.
6. Generate the evaluator path.
7. Generate `run_evo.py` and `shinka.yaml`.
8. Smoke test before handoff.
9. Ask the user for the next step.
Metrics must include:
Correctness must include:
Higher `combined_score` values indicate better performance unless the user explicitly defines an inverted metric that you transform during aggregation.
Prefer shaping the copied program like this:
from __future__ import annotations
# EVOLVE-BLOCK-START
def optimize_me(...):
...
# EVOLVE-BLOCK-END
def run_experiment(random_seed: int | None = None, **kwargs):
...
return score, text_feedbackAnd the evaluator:
from shinka.core import run_shinka_eval
def main(program_path: str, results_dir: str):
metrics, correct, err = run_shinka_eval(
program_path=program_path,
results_dir=results_dir,
experiment_fn_name="run_experiment",
num_runs=3,
get_experiment_kwargs=get_kwargs,
aggregate_metrics_fn=aggregate_fn,
validate_fn=validate_fn,
)
if not correct:
raise RuntimeError(err or "Evaluation failed")Use `evaluate.py` to run the candidate and write outputs:
import json
import os
from pathlib import Path
def main(program_path: str, results_dir: str):
os.makedirs(results_dir, exist_ok=True)
metrics = {
"combined_score": 0.0,
"public": {},
"private": {},
"extra_data": {},
"text_feedback": "",
}
correct = {"correct": False, "error": ""}
(Path(results_dir) / "metrics.json").write_text(json.dumps(metrics, indent=2))
(Path(results_dir) / "correct.json")Load top-performing Shinka programs into agent context using `shinka.utils.load_programs_to_df`, and emit a compact Markdown…
Run existing ShinkaEvolve tasks with the `shinka_run` CLI from a task directory (`evaluate.py` + `initial.<ext>`). Use when an…
Create ShinkaEvolve task scaffolds from a target directory and task description, producing `evaluate.py` and `initial.<ext>`…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration