fortify

fortify is a skill for Claude Code from Borda/AI-Rig. It costs 67 tokens per session (19,910 once invoked), scanned C, original, Apache-2.0.

An ablation-study runner for finding which parts of a completed machine-learning improvement contributed to its result. An ablation study removes one component at a time and measures the effect.

In plain words
What is it for?
Use it to create isolated variants, run metrics and safety checks, rank component importance, and optionally prepare reviewer questions and answers.
Why use it?
It helps separate changes that truly matter from changes that were unnecessary or had little effect, without modifying the main working directory.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool; positional $N argument.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the research plugin — 8 skills, 2 agents shipped together

Good fit Use it to create isolated variants, run metrics and safety checks, rank component importance, and optionally prepare reviewer questions and answers.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Borda/AI-Rig
Claude Code
/plugin install research

Made for: Claude Code.

Or install research, the plugin that ships this one along with the rest of its 8 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fortify

README.md
[![agentmods](https://agentmods.dev/badge/skills/borda/ai-rig/fortify/github.svg)](https://agentmods.dev/skills/borda/ai-rig/fortify)
Your own site
<a href="https://agentmods.dev/skills/borda/ai-rig/fortify"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/fortify/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fortify

Your own site · 80×15
<a href="https://agentmods.dev/skills/borda/ai-rig/fortify"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/fortify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 19,910 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.19910
Opus 5.5 $0.00027 $0.07964
Sonnet 5.5 $0.00013 $0.03982
Haiku 4.5 $0.00007 $0.01991

Measured 17d ago against content hash f039ffda3d49, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

fortify scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Fortify run directories** don't write `result.jsonl` — exempt from 30-day TTL cleanup (per `.claude/rules/foundry-artifact-lifecycle.md`, installed via `/foundry:setup` — requires `foundry` plugin: no `result.jsonl`
plugins/cc_research/skills/fortify/SKILL.md · 871 lines

How it starts

The opening of the file, as written. The whole thing — 871 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ablation study runner — after /research:run finds improvements, fortify identifies which components contributed, generates ablation variants (remove one component at a time), runs each in isolated git worktrees (main repo never modified), ranks component importance, optionally generates reviewer Q&A calibrated to venue.

NOT for: initial optimization loop (use /research:run); methodology validation (use /research:judge); paper-vs-code consistency (use /research:verify); hypothesis generation (use research:scientist directly). Fortify runs ablation studies on completed runs only.

MAX_ABLATION_CANDIDATES:  8 (ceiling — scientist produces 3–8; --max-ablations caps further)
METRIC_TIMEOUT_MS:        config.metric_timeout_sec × 1000 (same effective metric limit as plan/judge/run; outer tool budget adds cleanup time)
GUARD_TIMEOUT_MS:         360000
GIT_OP_TIMEOUT_MS:        15000
METRIC_RUNS_DEFAULT:      3 (metric runs per variant; --runs <N> overrides, 1–10; 1 = no σ, threshold = noise floor alone)
SANITY_DIVERGENCE_PCT:    2.0 (full-variant mean vs best_metric tolerance, widened to 2σ_full; beyond it fortify aborts)
NOISE_FLOOR_PCT:          2.0 (% of |full mean|; an ablation counts as an effect only beyond max(noise floor, 2σΔ))
IMPORTANCE_CLASS_CRITICAL: 50.0 (% of full metric lost)
IMPORTANCE_CLASS_SIGNIFICANT: 10.0
IMPORTANCE_HARMFUL_PCT:   -5.0 (importance below this = Potentially Harmful; [-5.0, -threshold) = NEUTRAL)
FORTIFY_DIR_BASE:         .experiments
STATE_DIR_BASE:           .experiments/state
METRIC_CMD_SOURCE:        state.json .config.metric_cmd (campaign's real metric — no fail-open default; env METRIC_CMD overrides)
GUARD_CMD_SOURCE:         state.json .config.guard_cmd (campaign's real guard — no fail-open default; env GUARD_CMD overrides)

Environment overrides — set these before invoking the skill to override per-variant defaults:

  • METRIC_CMD — command run inside each variant worktree to measure the ablation metric (override; default sourced from source-run state.json .config.metric_cmd)
  • GUARD_CMD — command run inside each variant worktree to detect regressions (override; default sourced from source-run state.json .config.guard_cmd)
  • STATE_DIR_BASE — base directory for source-run state lookups (default: .experiments/state)
  • FORTIFY_DIR_BASE — base directory for per-run fortify artifacts (default: .experiments)
  • SANITY_DIVERGENCE_PCT / NOISE_FLOOR_PCT — full-variant reproduction tolerance and ablation noise floor, in percent (defaults above)

The constants block defaults above are YAML-only — bash blocks read environment variables (with ${VAR:-default} fallback) and never source values directly from YAML.

  • Key boundaries: end of F2 — ablation candidates identified by scientist; end of F4 — all ablation variant worktrees completed.
  • Preserve at F2: FORTIFY_DIR (TMPDIR key), RUN_ID (TMPDIR key), ablation-candidates.jsonl path, best_metric from source run.
  • Preserve at F4: FORTIFY_DIR, RUN_ID, results.jsonl and metric-runs.jsonl paths, fortify-runs (TMPDIR key) — ready for F5 importance ranking.
  • 4d inner loop is resume-safe too: the run count per variant comes from metric-runs.jsonl, never memory, so a compaction mid-variant resumes at the next run.
  • F4 loop is resume-safe: 4a-init's resume guard skips variants already terminal (non-timeout) in results.jsonl, so a mid-loop compaction resumes at the first pending variant — never re-runs a completed ablation; a timed-out variant still retries.
  • Clear at F1 start (stale prior run) and at start of F8 terminal summary.

Read the full file on GitHub · 871 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 17d ago Changed · +2 lines f039ffda3d49
  2. 18d ago Changed · +60 lines d1c3bd2a7138
  3. 28d ago Changed · +2 lines caf621c696eb
  4. 1mo ago Changed · +48 lines 25d94727478f
  5. 1mo ago Changed 698177f72117
  6. 1mo ago Changed d87ebf580cf9
  7. 1mo ago Changed 1fb406466689
  8. 1mo ago Changed · +10 lines f3ab459979cd
  9. 2mo ago Changed · -2 lines 3f9f2d301638
  10. 2mo ago First seen · 751 lines · 67 tokens per session scan C 8ddabb7a3e15

Subscribe to this mod's changes

fortify is a skill published in the GitHub repository Borda/AI-Rig (31 stars, last pushed yesterday), licensed Apache-2.0. It adds 67 tokens to every session and 19,910 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

fortify compared with skills from other repositories

fortify next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fortifyBorda/AI-RigSkill31yesterdayApache-2.0C67Claude Code
genomic-intelligenceK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA151Claude Code, Codex
torch-geometricK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA71Claude Code, Codex
bulk-rnaseqK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA111Claude Code, Codex
aeonK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA74Claude Code
bidsK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA84Claude Code, Codex
genimlK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA42Claude Code