mx-detect
Skill2 starsChanged 4 months agoMITView on GitHub
MutantX Phase 1 — Detect project language, test command, and source files for mutation testing.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- mutateSkill
- mx-generateSkill
- mx-reportSkill
- mx-testSkill
- mx-validateSkill
- mutateSkill
- mx-detectSkill
- mx-generateSkill
- mx-reportSkill
- mx-testSkill
- mx-validateSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Write the detection results as JSON to .mutants/detect.json so downstream phases can consume them.
- Very specific: line 24
If test-cmd is provided, use it directly.
- Distinctive: line 39
If no indicator is found, ask the user for the language, test command, and source file patterns.
- Very specific: line 43
If the user provides files, use that pattern instead of auto-detection, but still apply the exclusions below.
- Distinctive: line 45
After identifying candidate source files:
- Very specific: line 54
If more than 30 source files are detected, ask the user to narrow scope with the files argument, or select the 10 most complex files …
- Very specific: line 70
Create the .mutants/ directory if it doesn't exist.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MutantX — Phase 1: Project Detection
You are the detection phase of a mutation testing engine. Your job is to identify the project's language, test command, and source files to mutate.
Write the detection results as JSON to .mutants/detect.json so downstream phases can consume them.
Language & Test Command Detection
If test-cmd is provided, use it directly. Otherwise, check for these indicator files in order and use the first match:
| Indicator File | Language | Default Test Command | Default Source Pattern |
package.json | JavaScript/TypeScript | Read scripts.test from package.json; fall back to npx jest or npx vitest run | src/**/*.{ts,tsx,js,jsx} minus **/*.{test,spec}.* and **/__tests__/** |
pyproject.toml or setup.py or requirements.txt | Python | pytest | src/**/*.py or **/*.py minus **/test_* and **/*_test.py and **/tests/** |
Cargo.toml | Rust | cargo test | src/**/*.rs minus test modules |
go.mod | Go | go test ./... | **/*.go minus *_test.go |
pom.xml | Java (Maven) | mvn test | src/main/**/*.java |
build.gradle | Java (Gradle) | ./gradlew test | src/main/**/*.java |
*.sln or *.csproj | C# | dotnet test | **/*.cs minus **/Tests/** and **/*.Tests/** |
mix.exs | Elixir | mix test | lib/**/*.ex |
Gemfile | Ruby | bundle exec rspec or rake test | lib/**/*.rb or app/**/*.rb |
CMakeLists.txt or Makefile (with C/C++ sources) | C/C++ | Auto-detect: cmake --build . && ctest or make test | src/**/*.{c,cpp,cc,cxx,h,hpp} minus test files |
If no indicator is found, ask the user for the language, test command, and source file patterns.
Source File Selection
If the user provides files, use that pattern instead of auto-detection, but still apply the exclusions below.
After identifying candidate source files:
- Exclude test files — files matching test patterns for the detected language (e.g.,
test_*.py,*.test.ts,*_test.go). - Exclude generated/vendored code —
node_modules/,vendor/,dist/,build/,.git/,target/,__pycache__/,cmake-build*/. - Exclude config files —
*.config.*,*.json,*.yaml,*.yml,*.toml,*.xml(unless they contain business logic). - Prioritize by complexity — prefer files with functions, conditionals, and loops over simple declarations or re-exports.
Large Project Handling
If more than 30 source files are detected, ask the user to narrow scope with the files argument, or select the 10 most complex files automatically.
Output
Write .mutants/detect.json:
{
"language": "<detected language>",
"test_command": "<test command>",
"source_files": ["path/to/file1.py", "path/to/file2.py"],
"source_patterns": ["<glob patterns used>"],
"detected_at": "<ISO 8601 timestamp>"
}Create the .mutants/ directory if it doesn't exist.
Display the detection results to the user before finishing:
Detected: Python project
Test command: pytest
Source files: 12 files in src/ (excluding tests)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.

