agentleFS
ClarituneClaritune/mutantx/.claude/skills/mx-detect/SKILL.md

mx-detect

Skill2 starsChanged 4 months agoMITView on GitHub

MutantX Phase 1 — Detect project language, test command, and source files for mutation testing.

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
  1. Very specific:

    Write the detection results as JSON to .mutants/detect.json so downstream phases can consume them.

    line 18
  2. Very specific:

    If test-cmd is provided, use it directly.

    line 24
  3. Distinctive:

    If no indicator is found, ask the user for the language, test command, and source file patterns.

    line 39
  4. Very specific:

    If the user provides files, use that pattern instead of auto-detection, but still apply the exclusions below.

    line 43
  5. Distinctive:

    After identifying candidate source files:

    line 45
  6. Very specific:

    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 …

    line 54
  7. Very specific:

    Create the .mutants/ directory if it doesn't exist.

    line 70

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 FileLanguageDefault Test CommandDefault Source Pattern
package.jsonJavaScript/TypeScriptRead scripts.test from package.json; fall back to npx jest or npx vitest runsrc/**/*.{ts,tsx,js,jsx} minus **/*.{test,spec}.* and **/__tests__/**
pyproject.toml or setup.py or requirements.txtPythonpytestsrc/**/*.py or **/*.py minus **/test_* and **/*_test.py and **/tests/**
Cargo.tomlRustcargo testsrc/**/*.rs minus test modules
go.modGogo test ./...**/*.go minus *_test.go
pom.xmlJava (Maven)mvn testsrc/main/**/*.java
build.gradleJava (Gradle)./gradlew testsrc/main/**/*.java
*.sln or *.csprojC#dotnet test**/*.cs minus **/Tests/** and **/*.Tests/**
mix.exsElixirmix testlib/**/*.ex
GemfileRubybundle exec rspec or rake testlib/**/*.rb or app/**/*.rb
CMakeLists.txt or Makefile (with C/C++ sources)C/C++Auto-detect: cmake --build . && ctest or make testsrc/**/*.{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:

  1. Exclude test files — files matching test patterns for the detected language (e.g., test_*.py, *.test.ts, *_test.go).
  2. Exclude generated/vendored code — node_modules/, vendor/, dist/, build/, .git/, target/, __pycache__/, cmake-build*/.
  3. Exclude config files — *.config.*, *.json, *.yaml, *.yml, *.toml, *.xml (unless they contain business logic).
  4. 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)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.