Skip to content
Back to skills

Do Not Sabotage

ASecurity

Audit ML training loops, research pipelines, CLAUDE.md/AGENTS.md/RULES.md files, local Claude memories, and evaluation gates for silent sabotage, frozen conditioning, sample/resolution starvation, per-step encoder recomputation, broken gates, deceptive notes, and unapproved restrictions. Cross-check with Codex and Gemini (Antigravity) and apply verified fixes.

  • 13 stars
  • 0 votes
  • 1 copy
  • 3 views
  • Added November 28, 2026
ai-agentspython

Works with

  • cli

Security analysis

A100/100

Scanned November 28, 2026

npx -y skills add eliseorobles/claude-research-guard --skill do-not-sabotage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Do Not Sabotage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Do Not Sabotage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/eliseorobles-do-not-sabotage/badge)](https://www.skillsdirectory.com/skills/eliseorobles-do-not-sabotage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: do-not-sabotage
description: Audit ML training loops, research pipelines, CLAUDE.md/AGENTS.md/RULES.md files, local Claude memories, and evaluation gates for silent sabotage, frozen conditioning, sample/resolution starvation, per-step encoder recomputation, broken gates, deceptive notes, and unapproved restrictions. Cross-check with Codex and Gemini (Antigravity) and apply verified fixes.
---

# Do Not Sabotage — ML Training & Research Integrity Guard

Use this skill whenever the user suspects silent ML training degradation, claim-to-code mismatches, stale `CLAUDE.md` / `RULES.md` / `~/.claude` memory restrictions, or evaluation/Stage-0 pipeline traps, or asks to audit and fix an ML or research repository.

Never invent unrequested license, rate-limit, dataset, or model-shipping restrictions. Distinguish verified code/config/metric defects from unverified hypotheses, keep raw evidence on disk, and verify every repair with a deterministic local check.

## 1. Run a zero-config local scan first

Start with a deterministic, zero-model-call scan of the repository (and `~/.claude` project memories when the user wants local agent memories audited):

```sh
guard="${CLAUDE_SKILL_DIR}/../research-guard/scripts"
python3 "$guard/audit.py" scan . --include-claude-memory --json
```

Inspect every flagged file and line number against the owner's explicit decisions (`DECISIONS.md`, briefs, or prompt instructions):

- **Training hazards (`selective_grad_freeze`, `detached_module_in_step`, `uncached_encoder_in_step`, `hardcoded_data_cap`)**: Verify whether any module supposed to train has `requires_grad=False`, `named_parameters()` exclusion filters, `.detach()`, `torch.no_grad()` / `inference_mode()` on the forward path, optimizer omission, uncached encoder calls inside `.backward()`/`.step()` loops, or dataset/resolution truncation.
- **Policy & memory drift (`policy_restriction_clause`, `memory_restriction_clause`, `released_item_excluded`)**: Remove unprompted `"research-only"`, `"never shipped"`, `"never in a product"`, `"not fetched unless"`, or collection/delegation blocks that contradict owner approvals. Remove already-released split IDs from active holdout/exclude files.
- **Corrupted outputs (`output_degeneration`)**: Flag exit-0 logs with NUL bytes, UTF-8 replacement floods, or runaway token-repetition loops rather than treating exit status `0` as valid completion.

## 2. Lock strict contracts for training, policy, and evaluation

Turn the owner's intended invariants into repeatable local gates that return `0` on pass and `1` on regression:

```sh
# Verify training loop and config invariants:
python3 "$guard/audit.py" training train.py --config training.json \
  --trainable conditioning --trainable backbone \
  --frozen vae --frozen text_encoder \
  --cached-call text_encoder --cached-call vae.encode \
  --require-optimizer-coverage --min-resolution 1024

# Verify rules, release manifests, exclude lists, queue pins, and guard scopes:
python3 "$guard/audit.py" policy --policy .research-guard/policy.json

# Verify evaluation gates, bootstrap intervals, metrics, logs, and research notes:
python3 "$guard/audit.py" eval --artifact run-summary.json \
  --report research-note.md --log job-last.md
```

Check specifically for self-inflicted evaluation traps before concluding a baseline won:

1. **Zero-eval / idle-GPU runs**: Reject `BLOCKED` or `PARTIAL` runs with `evaluated_items == 0` or `0%` GPU utilization on GPU workloads.
2. **Impossible reference gates**: Run quality floors on clean ground-truth reference inputs first; if the reference fails its own gate, fix the reference calibration before queuing sweeps.
3. **Two-sided bootstrap coverage ceilings**: Do not reject conservative confidence intervals (`98.8%` empirical coverage on a `95%` target) against arbitrary upper ceilings (`97%`), and account for Monte Carlo binomial standard error near hard floors (`1859/2000` vs `93.0%`).
4. **Penalty-saturated primary metrics**: When missing-item sentinel penalties on unsupported cases dominate aggregates, report support fraction and per-stratum error separately so real stratum wins are not buried.
5. **Claim-to-artifact parity**: Never write `"RESULT: PASS"`, `"trained conditioning"`, or unqualified `"Retain baseline"` in a research note unless the structured artifact establishes it.

Before editing, snapshot untouched files and accepted JSON subtrees so repairs cannot cause collateral drift:

```sh
mkdir -p .research-guard
python3 "$guard/preserve.py" snapshot .research-guard/baseline.json \
  --json-value training.json /encoder
```

## 3. Cross-check with independent model families (Codex & Gemini)

Send the exact brief, training code, configs, rules, and run artifacts to independent non-Claude reviewers (`codex` and `agy` / Gemini, or `--provider agy` / `--provider codex` if one CLI lacks quota):

```sh
python3 "$guard/guard.py" doctor
python3 "$guard/guard.py" audit --brief .research-guard/audit-brief.md \
  --evidence train.py --evidence RULES.md --evidence run-summary.json
```

Read the saved reviewer reports in the printed `.research-guard/runs/...` directory, verify hashes with `guard.py verify` (or `guard.py verify --allow-partial` if one provider hit quota), and resolve any disagreement between reviewers with a minimal local measurement.

## 4. Remediate and verify

Apply every confirmed fix across code, configs, `CLAUDE.md` / `AGENTS.md` / `RULES.md`, exclude lists, queued brief pins, and (when authorized) stale `~/.claude/projects/*/memory/*.md` files. Re-run `audit.py` and `preserve.py check .research-guard/baseline.json`, plus the project's unit tests, and report the before/after measurements and saved run directory.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.