smart-mutation-operator-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited smart-mutation-operator-generator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generate customized mutation operators tailored to a specific codebase to maximize mutation testing effectiveness.
Run analysis script:
# Analyze entire repository
python scripts/generate_operators.py /path/to/repo
# Analyze single file
python scripts/generate_operators.py /path/to/file.py
# Save detailed report
python scripts/generate_operators.py /path/to/repo --output operators.jsonScript analyzes:
Operator priorities:
Consider project characteristics:
Financial/calculation-heavy code:
API-heavy code:
Business logic code:
Data processing code:
Example custom operators:
API Timeout Mutation:
# Original
response = api.call(timeout=30)
# Mutant
response = api.call(timeout=1) # Test timeout handlingRetry Logic Mutation:
# Original
@retry(max_attempts=3)
def fetch_data():
pass
# Mutant
@retry(max_attempts=1) # Test with fewer retries
def fetch_data():
passBusiness Rule Mutation:
# Original
if age >= 18 and has_license:
allow_driving()
# Mutants
if age > 18 and has_license: # ROR
if age >= 18 or has_license: # LCR
if age >= 21 and has_license: # CRP (domain-specific)Skip equivalent mutants:
# Equivalent (don't mutate)
x = a + 0 # → x = a - 0 (still equals a)
x = a * 1 # → x = a / 1 (still equals a)
# Non-equivalent (do mutate)
x = a + 1 # → x = a - 1 (different result)
x = a * 2 # → x = a / 2 (different result)Skip trivial mutations:
# Trivial (low value)
message = "Hello" # → message = "" (obvious failure)
# Valuable (high value)
if count > 0: # → if count >= 0 (subtle boundary)Document operator selection:
MUTATION TESTING PLAN
=====================
Project: MyApp
Language: Python
Files Analyzed: 45
SELECTED OPERATORS
------------------
High Priority (Apply to all code):
1. ROR - Relational Operator Replacement
- Target: Comparison operations in business logic
- Expected: 150 mutants
- Rationale: Critical for boundary condition testing
2. LCR - Logical Connector Replacement
- Target: Boolean expressions in validation
- Expected: 80 mutants
- Rationale: Tests logical condition coverage
3. CRP - Constant Replacement
- Target: Numeric thresholds and limits
- Expected: 120 mutants
- Rationale: Tests boundary values
Medium Priority (Apply selectively):
4. AOR - Arithmetic Operator Replacement
- Target: Calculation functions only
- Expected: 60 mutants
- Rationale: Financial calculations need thorough testing
Custom Operators:
5. RETRY - Retry Logic Mutation
- Target: @retry decorators
- Expected: 15 mutants
- Rationale: Test resilience mechanisms
ESTIMATED RESULTS
-----------------
Total Mutants: ~425
Mutation Score Target: >80%
Execution Time: ~25 minutesPython (mutmut):
mutmut run --paths-to-mutate=src/
mutmut resultsJavaScript (Stryker):
// stryker.conf.js
module.exports = {
mutator: {
excludedMutations: ['StringLiteral', 'UnaryOperator']
}
};See standard_operators.md for complete list.
Most effective:
> → >=, <, ==and → or0 → 1, true → falseif x: → if not x:Mutation Score = (Killed Mutants / Total Mutants) × 100%Targets:
Start small:
Focus on critical code:
Avoid over-mutation:
Review results:
# Analyze repository
python scripts/generate_operators.py /path/to/repo
# Save detailed report
python scripts/generate_operators.py /path/to/repo --output report.jsonOutput includes:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.