# heretic

The heretic skill runs directional ablation and refusal analysis on open-weight models. Use it to study refusals or reduce benign over-refusal without fine-tuning.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 143 installs · ★ 61 repo stars
- Author: akillness
- License: AGPL-3.0-or-later · policy=link-only · description only; the file stays with the author
- Source: https://github.com/akillness/jeo-skills/tree/HEAD/.agent-skills/heretic/SKILL.md
- Updated: 2026-11-19
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/heretic

## What it does

heretic estimates refusal directions from model activations, then alters attention and MLP projection matrices with directional ablation. An Optuna optimizer searches for settings that reduce refusals while keeping the candidate close to the original under KL divergence. It does not perform training or post-training.

The skill supports model ablation, candidate evaluation, and residual-geometry research. Residual plots need the `heretic-llm[research]` extra, while model and dataset discovery is routed through the `scrapling` skill. Use it only with open-weight models you have the right to modify.

The runtime requires Python 3.10+ and PyTorch 2.2+; MXFP4 models such as `gpt-oss` require PyTorch 2.6+. A CUDA GPU is strongly recommended, and `bitsandbytes` can provide 4-bit quantization for larger models.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill heretic -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/heretic/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/heretic/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill heretic -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/heretic/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill heretic -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/heretic/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install akillness/jeo-skills .agent-skills/heretic/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/heretic/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill heretic -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/akillness/jeo-skills --path .agent-skills/heretic
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/heretic/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add akillness/jeo-skills --skill heretic -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/akillness/jeo-skills/tree/HEAD/.agent-skills/heretic/SKILL.md

## When to use it
- reduce benign refusals in an open-weight model
- measure refusals and KL divergence
- inspect refusal-direction geometry
- generate residual-geometry plots
- fit ablation to available VRAM

## Example prompts
- Reduce benign refusals in `Qwen/Qwen3-4B-Instruct-2507` without running training.
- Evaluate `p-e-w/gemma-3-12b-it-heretic` against its original model using refusal and KL metrics.
- Print residual geometry and create the per-layer plots.

## Similar
- [obliteratus-abliteration](https://affpapa.org/en/nevibecode/skills/obliteratus-abliteration.md) — skill · 871 installs
- [Model Hyperparameter Tuning](https://affpapa.org/en/nevibecode/skills/model-hyperparameter-tuning.md) — skill · 500 installs
- [databricks-ml-training](https://affpapa.org/en/nevibecode/skills/databricks-ml-training.md) — skill · 354 installs
- [evolutionary-metric-ranking](https://affpapa.org/en/nevibecode/skills/evolutionary-metric-ranking.md) — skill · 121 installs
- [automl-hyperparameter-optimization](https://affpapa.org/en/nevibecode/skills/automl-hyperparameter-optimization.md) — skill · 110 installs
- [ml-engineer](https://affpapa.org/en/nevibecode/agents/voltagent-community-ml-engineer.md) — subagent · 1971 installs

From the same set: [akillness/jeo-skills](https://affpapa.org/en/nevibecode/by/akillness/jeo-skills.md) — 99 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
