mine
Skill0 starsChanged 37 days agoMITView on GitHub
Mine the repo's merged PRs (or local commits) into verified Crucible benchmark tasks. The CLI lists, verifies, scaffolds and proves; this skill only writes each task's prose and picks its kind. Spends usage, so it confirms first.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- hurleywgly/skillstheir own version, first seen Nov 8, 2026
- dcbruck/claude-skillstheir own version, first seen Oct 20, 2026
- wulfmeister/nookplot-bottheir own version, first seen Oct 11, 2026
- ohad6k/emulotheir own version, first seen Jul 16, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- ohad6k/emulo★ 292same name
- dcbruck/claude-skills★ 1same name
- hurleywgly/skills★ 1same name
- wulfmeister/nookplot-bot★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- create-taskSkill
- initSkill
- reportSkill
- runSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 68
Run crucible mine calibrate --json <list flags> (add --suite NAME for one suite, --candidates N for a bigger sample, default 3).
- Very specific: line 87
Run crucible mine --json <list flags>.
- Very specific: line 99
Run crucible mine --verify <ids...> <list flags>.
- Distinctive: line 116
Do nothing further until the user says yes.
- Very specific: line 141
Leave repo, ref, source, check and the other front matter alone.
- Very specific: line 142
No secrets, and nothing copied from non_test_diff.
- Very specific: line 146
Run crucible mine leakcheck .crucible/tasks/<slug> (add --json to read flags programmatically).
- Very specific: line 162
If either fails, show the error, remove that task directory (rm -r .crucible/tasks/<slug>) and report why.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mine tasks from merged PRs
Arguments: $ARGUMENTS. They are passed through to crucible mine and its subcommands as
--limit, --local and --max-lines (call them the list flags). Every deterministic step is a
crucible command (on PATH while the plugin is enabled); run them all from the repo root. Your
only jobs are the prose of each task and its kind. Never start a benchmark run and never commit.
0. Home and config
- No
.crucible/directory: runcrucible init(needs a git repo). - No
.crucible/mine.yaml: runcrucible mine. It writes a commentedmine.yaml(suites auto-detected from the repo, or an empty template) and exits 0. Read the file, show the detected suites (name, test paths, cwd, setup, test command), and ask the user to confirm or edit it before going on (it is a guess; steps 1 and 2 correct it). With no suites detected, help fill one in:test_paths,cwd,setup, and atest_command({tests}with optional|filters, or no placeholder to run the whole suite; see docs/design.md, "Placeholders"). Use only dummy values inenv. Ifcrucible mineprints config errors (exit 1), fix the file and rerun.
1. Discover how this repo runs tests
The detected suites are only a guess from marker files. Before trusting them, read what the repo really does (CI is the strongest signal) and list the files you read:
- CI:
.github/workflows/*,.gitlab-ci.yml,Jenkinsfile,.circleci/config.yml,azure-pipelines.yml,bitbucket-pipelines.yml. - Task runners:
Makefile,justfile,Taskfile.yml,package.jsonscripts,tox.ini,noxfile.py. - Build files (
pom.xml,build.gradle*,Cargo.toml,go.mod,*.csproj,mix.exs,Gemfile,composer.json),README/CONTRIBUTING,Dockerfile*,docker-compose*.ymland test containers.
Compare with the suites in .crucible/mine.yaml and correct them from what CI runs: cwd,
setup (install and build steps), test_command, test_paths, runnable (which changed files
are passed to the runner), env, timeout / setup_timeout. If the runner can't take a file
list directly, write a wrapper under .crucible/scripts/; crucible exports it as
$CRUCIBLE_SCRIPTS and gives it the PR's runnable test files in $CRUCIBLE_TEST_FILES
(newline-separated, repo-relative; $CRUCIBLE_TEST_FILES_CWD is relative to the suite cwd):
# .crucible/scripts/run-tests.sh (mine.yaml: test_command: bash "$CRUCIBLE_SCRIPTS/run-tests.sh")
set -euo pipefail
files=()
while IFS= read -r f; do [ -n "$f" ] && files+=("$f"); done <<< "$CRUCIBLE_TEST_FILES_CWD"
[ "${#files[@]}" -gt 0 ] || { echo "no test files" >&2; exit 2; } # never pass an empty argument
exec ./tools/run_tests --only "${files[@]}"setup runs before the PR's test files are copied in, so it must not need them (compile main
code only: Maven compile, Gradle classes). If the toolchain is not installed on this machine
(a JDK of another version, Go, an old Ruby), run it in a container from a wrapper script and
note that the task then needs Docker wherever it runs. Tested recipes (Go via Docker, Gradle
with JDK toolchains, Maven with JAVA_HOME, Ruby with vendor/bundle) are in
docs/mining-recipes.md.
Rules: use only dummy values in env, never real secrets; prefer the repo's own test setup (for
a database or queue, start the compose service in setup); keep every command non-interactive;
touch nothing but .crucible/ (never edit tracked repo files). Show the user what you changed.
2. Calibrate
Run crucible mine calibrate --json <list flags> (add --suite NAME for one suite,
--candidates N for a bigger sample, default 3). It runs setup at HEAD and verifies the
newest candidates per suite, and takes minutes (use run_in_background: true). Output:
{"ok", "suites": [{"name", "status", "detail", "setup": {"ok", "seconds", "log", "tail"},
"samples": [{"id", "outcome", "reason", "tail", "logs"}], "hints": [{"id", "hint"}]}]}. Status is
ok, no-candidates (nothing to sample: not a failure, but tell the user that suite is
untested), or a failure: setup-failed, no-tests-ran, not-selective, failing, timeout,
mixed. For each failing suite read its status, hints (each names the mine.yaml field to
change) and the log tails (open the log files for more), fix .crucible/mine.yaml or the
wrapper script, and rerun. At most 5 rounds. If a suite still fails, stop and ask the user,
quoting the suite name, status, hint and the last 20 log lines. Continue to step 3 once every
suite is ok or no-candidates; with no-candidates only, calibration proved nothing yet, so
say so and offer to continue anyway.
Per-candidate progress lines go to stderr as each finishes. If the list looks short, the walk may
have been cut by --limit (the CLI hints when so); raise it.
3. List candidates
Run crucible mine --json <list flags>. Output is {"candidates": [...], "excluded": [...]};
each candidate has id, title, suites (several for a full-stack PR; it is verified across all of them), suggested_kind, lines_changed, test_files,
other_files, source. (With a GitHub remote and a working gh it lists merged PRs, otherwise
local commits; a gh source unavailable line on stderr is normal. --local forces local git.)
Show a short table: id, title, suggested kind, lines changed, test files. Say how many
candidates were excluded and why in one line (run crucible mine --json --show-excluded only if
the user asks for the list). Let the user pick: default is all, capped at 50; they may drop ids or
change kinds. No candidates: say so and stop.
4. Verify
Run crucible mine --verify <ids...> <list flags>. It runs the repo's own tests at each
candidate's base (must fail) and merge (must pass) and may take minutes per candidate. With more
than about 5 ids use the Bash tool's run_in_background: true and wait for the notification
instead of polling. Add --timeout S only if the user says tests are slow, --force only to
ignore cached results. Then run crucible mine --json <list flags> again; each candidate's
verified field is yes, no: <reason>, or null. Report verified vs rejected with reasons
(for example passes at base, fails at merge, setup failed at base, no runnable tests);
each rejection prints its log path and, when a diagnostics row matches, a hint. A rejection is a
normal outcome, not an error. A verified candidate may carry warnings (skipped tests in the
changed test files, or a base failure that is only a compile/type error): prefer candidates
without warnings and tell the user which ones have them. If scaffold later says config changed
since verification, rerun the verify. If nothing verified, stop and say what to fix (usually mine.yaml).
5. Confirm the cost
Writing prose is the only model cost. Say roughly how many tasks you will write (the verified count) and that each takes a few tool calls and a short write-up, then ask whether to continue. Do nothing further until the user says yes; offer to do a subset.
6. Scaffold and write each verified candidate
For each verified id:
crucible mine scaffold <id> <list flags>(add--task-id <slug>or--kind <kind>only when needed; it warns when the task needs Docker on the machine that runs it, recorded asrequiresin.mine.json: tell the user). It writes.crucible/tasks/<slug>/withtask.md,check.sh,hidden_tests/and.mine.json; note the printed path. It exits 1 with the reason if the candidate is not verified or already mined; report that and move on.crucible mine show <id> --json <list flags>: givestitle,body,labels,branch,issues(linked issue title and body),test_files,other_files,test_diffandnon_test_diff.- Edit
.crucible/tasks/<slug>/task.mdand replace every_(...)_placeholder:- What: the problem or feature to deliver, in the PR title, body and linked issue's own terms.
- Why: the motivation from the PR body or issue.
- Acceptance criteria: one observable bullet each, covering the behaviour the hidden
tests check (read
test_difffor what they assert). Describe the symptom and the expected behaviour. Never describe the implementation: do not quote the fix, name new functions, classes, variables or files the PR introduced, or say which file to change. The same text goes to every model config. - kind (front matter): keep the suggested kind unless labels, branch name and title
clearly say otherwise (
feature,bugfix,refactor,docs,test, or an existing kind). Leaverepo,ref,source,checkand the other front matter alone. - No secrets, and nothing copied from
non_test_diff.
7. Leak check
Run crucible mine leakcheck .crucible/tasks/<slug> (add --json to read flags programmatically).
clean: <slug> means done. Otherwise it exits 1 listing flags with kind
(quoted-code, new-identifier, file-instruction), span, section and reason: rewrite
the flagged text to describe behaviour instead (remove the identifier or file instruction, put
the requirement in user-visible terms) and rerun. At most 3 tries; if still flagged, delete the
task directory (rm -r .crucible/tasks/<slug>, only that path), leave it out and say so.
8. Validate and prove
Both must pass for each task:
crucible task validate .crucible/tasks/<slug>printsok: <slug>.crucible mine prove .crucible/tasks/<slug>runs the task'scheck.shatref(must fail) and at the merge commit (must pass) and checks for leaks; printsproven: <slug>. Use--timeout Sif the user raised it in step 4. Never use--allow-leaks.
If either fails, show the error, remove that task directory (rm -r .crucible/tasks/<slug>) and
report why. Do not retry beyond the leak rewrites above.
9. Summary
Report: tasks written, grouped by kind (ids and slugs); candidates rejected at verification,
left out after leak rewrites, or removed after validate/prove, each with its reason. Remind the
user the new tasks are uncommitted files in .crucible/tasks/ (you did not commit). Give the next
command, with a real slug: /crucible:run <slug> --matrix default --repeat 3 (it asks before
spending anything). Never start a run yourself.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

