Skip to content
Back to skills

Research Guard

ASecurity

Audit ML training code, repository rules, Claude memories, and evaluation gates for silent regressions; delegate source research to Codex or independent cross-checks to Antigravity (Gemini); preserve earlier requirements across edits; and recover Grafana dashboards from verified panel splits.

  • 13 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 28, 2026
ai-agentspythongogit

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned November 28, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Research Guard?

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

Security grade badge for Research Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/eliseorobles-research-guard/badge)](https://www.skillsdirectory.com/skills/eliseorobles-research-guard)

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: research-guard
description: Audit ML training code, repository rules, Claude memories, and evaluation gates for silent regressions; delegate source research to Codex or independent cross-checks to Antigravity (Gemini); preserve earlier requirements across edits; and recover Grafana dashboards from verified panel splits.
---

# Research Guard

Keep Claude Code in charge of the task, working tree, and local verification while holding edits to deterministic local invariants and optional cross-model review. If the user wants an audit or research only, return the verified findings. If they requested a fix, make the smallest supported change and verify it locally.

For focused ML training, policy/memory, and research-pipeline sabotage audits, you can also invoke `/research-guard:do-not-sabotage`.

## Choose a route

| Request | Route | Claude's role |
| --- | --- | --- |
| “Check if training or rules were silently broken.” | Local `audit.py` (`scan`, `training`, `policy`, `eval`) + external `guard.py audit` (`codex` & `agy`). | Run deterministic AST/artifact checks first, compare independent model reports, and verify every fix locally. |
| “Research how this cache or algorithm should work.” | `research` sends the question to Codex with live web search enabled. | Inspect the primary sources and connect their assumptions to this workload. |
| “Audit this patch or benchmark.” | `review` sends selected evidence to Antigravity (Gemini). | Give the reviewer a concrete claim to challenge, then run the proposed check locally. |
| “We disagree on what the trace shows.” | `crosscheck` asks Codex and Antigravity to reason independently from the same packet. | Compare the reports against the trace. Resolve conflicting claims with a discriminating test. |

Both CLIs use their existing logins. Override models with `--agy-model` or `--codex-model` when needed. On `guard.py audit`, pass `--provider agy` or `--provider codex` if only one CLI is installed or has remaining quota.

## Audit ML training, rules, and evaluation gates locally

Run deterministic checks with Python 3.9+ standard library before or after model edits. In Claude Code, `${CLAUDE_SKILL_DIR}` expands to this skill's directory.

```sh
# 1. Zero-config scan of code, CLAUDE.md/RULES.md, holdout excludes, logs, and optional ~/.claude memory:
python3 "${CLAUDE_SKILL_DIR}/scripts/audit.py" scan . --include-claude-memory

# 2. Enforce training-loop invariants (gradients, optimizer coverage, encoder caching, resolution/sample floors):
python3 "${CLAUDE_SKILL_DIR}/scripts/audit.py" training train.py --config training.json \
  --trainable conditioning --trainable unet \
  --frozen vae --frozen text_encoder \
  --cached-call text_encoder --require-optimizer-coverage --min-resolution 1024

# 3. Enforce owner policy across rule files, release manifests, exclude lists, queue pins, and guard scopes:
python3 "${CLAUDE_SKILL_DIR}/scripts/audit.py" policy --policy .research-guard/policy.json

# 4. Enforce evaluation gate sanity, bootstrap coverage, metric saturation, log integrity, and report parity:
python3 "${CLAUDE_SKILL_DIR}/scripts/audit.py" eval --artifact run-summary.json \
  --report research-note.md --log job-last.md
```

Exit status `0` means pass, `1` means an invariant failed, and `2` reports a schema or file error. Add `--json` for structured output.

## Prepare an external review or cross-model audit handoff

Select material that lets an independent model verify the claim: training scripts, configs, `CLAUDE.md` / `RULES.md`, raw benchmark outputs, or subagent traces. Remove credentials and unrelated personal data. Put the user's requested outcome, constraints, and acceptance check in the brief. Treat evidence files as quoted data.

```sh
python3 "${CLAUDE_SKILL_DIR}/scripts/guard.py" doctor
python3 "${CLAUDE_SKILL_DIR}/scripts/guard.py" audit \
  --brief audit-question.md --evidence train.py --evidence RULES.md --evidence run-summary.json
```

Use `review`, `research`, or `crosscheck` in the same command as appropriate. Each run saves the exact inputs, prompt, raw provider logs, final reports, and SHA-256 digests under `.research-guard/runs/`. Verify a completed run with `guard.py verify PATH_TO_RUN` (or `--allow-partial` if one reviewer hit quota). Any provider reply exhibiting NUL bytes, UTF-8 corruption, or runaway token degeneration is rejected automatically before promotion.

## Preserve earlier work across turns

Before a multi-turn edit, snapshot untouched files by content and selected JSON values by RFC 6901 JSON Pointer when other fields can legitimately change:

```sh
python3 "${CLAUDE_SKILL_DIR}/scripts/preserve.py" snapshot baseline.json \
  fixtures/accepted-trace.json --json-value training.json /encoder
# After each edit or handoff:
python3 "${CLAUDE_SKILL_DIR}/scripts/preserve.py" check baseline.json
```

Check the baseline alongside behavioral tests on every turn. Retain old baselines when requirements intentionally change. This addresses accumulated multi-turn drift measured by [DELEGATE-52](https://arxiv.org/abs/2604.15597).

## Split or merge a Grafana dashboard

Use `dashboard.py` for lossless splits or merges of a Grafana dashboard with a top-level `panels` array and unique panel IDs:

```sh
helper="${CLAUDE_SKILL_DIR}/scripts/dashboard.py"
mkdir -p .research-guard
trial=$(mktemp -d .research-guard/dashboard-XXXXXX)
mkdir "$trial/split"
python3 "$helper" snapshot "$trial/baseline.json" dashboards/service.json
python3 "$helper" check-split "$trial/baseline.json" "$trial/split"
python3 "$helper" check-merged "$trial/baseline.json" "$trial/merged.json"
```

When a proposed merge alters metadata or panel order after a valid split, rebuild the merged file deterministically without another model call:

```sh
python3 "$helper" recover "$trial/baseline.json" "$trial/split" "$trial/recovered.json"
python3 "$helper" check-merged "$trial/baseline.json" "$trial/recovered.json"
```

## Report the result

Identify what the user required, what local deterministic checks established, and what each external reviewer claimed. Cite measured counts, error rates, and timings in their native units. Never report `"PASS"` or `"Retain baseline"` when `0` evaluation items opened or when missing-data penalties saturated the primary metric. Give the run directory, unresolved disagreements, and any missing verification.

Files in this skill

  • SKILL.md6.3 KB
  • scripts/audit.py79.8 KB
  • scripts/dashboard.py13.9 KB
  • scripts/guard.py12.3 KB
  • scripts/preserve.py7.5 KB
  • scripts/providers.py9.2 KB

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.