Skip to content
Back to skills

antis-optimizer

ASecurity

Audit any repo and install a low-token 4-layer stack (conditional multi-tool ignores, model-aware AGENTS.md/INDEX.md, MCP/AST routing, and zero-dep CLI for --audit, --detect, --sync-ignores, --sync-landmarks, --map, --slice, --outline, --handoff, --verify) across OpenCode, Claude Code, Codex, Cursor, Gemini/Antigravity, Copilot, and Windsurf with jcodemunch/ponytail/caveman/RTK.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 16, 2026
ai-agentstypescriptpythonrustgojavarubyphpswiftkotlinc++

Works with

  • claude code
  • cursor
  • cli
  • mcp

Security analysis

A100/100

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

Scanned November 27, 2026

npx -y skills add 4anti/antis-optimizer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of antis-optimizer?

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

Security grade badge for antis-optimizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/4anti-antis-optimizer/badge)](https://www.skillsdirectory.com/skills/4anti-antis-optimizer)

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: antis-optimizer
description: >-
  Audit any repo and install a low-token 4-layer stack (conditional multi-tool
  ignores, model-aware AGENTS.md/INDEX.md, MCP/AST routing, and zero-dep CLI for
  --audit, --detect, --sync-ignores, --sync-landmarks, --map, --slice, --outline,
  --handoff, --verify) across OpenCode, Claude Code, Codex, Cursor,
  Gemini/Antigravity, Copilot, and Windsurf with jcodemunch/ponytail/caveman/RTK.
---

# Antis-Optimizer

Cut context, tool-output, and compaction tokens across AI coding agents while cooperating with installed MCPs, plugins, and hooks.

## Hard Budgets

| Artifact | Cap | Purpose |
| :--- | :--- | :--- |
| `AGENTS.md`, `AGENTS.override.md`, `INDEX.md` | `<= 80L / <= 4,500B` | Invariants, excludes, router, landmarks. |
| `CLAUDE.md` *(opt)* | `1L / <= 20B` | `@./AGENTS.md` pointer; never add `GEMINI.md`. |
| `--audit`/`--map`/`--slice`/`--outline`/`--verify` | `< 3,500 chars` | Clears `Token Optimizer` `4,096`-char cap. |
| `--handoff` | `<= 2,048B` | Pre-compaction snapshot (`Context-Mode`). |

## Workflow

### 1. Detect & Audit
Run `node <skill-dir>/scripts/repo-index.cjs --root . --detect` and `--audit`:
- **Tiering (`--audit`):**
  - *Tier 0 (`IGNORE-ONLY`):* `0` monoliths (`>=15KB`), `<5k` trap tokens, and (`<25` active files or `<5k` active tokens) -> ignores only (`--verify` passes at `0` docs).
  - *Tier 1 (`LEAN ZERO-COPY`):* `<=2` monoliths & `<25k` trap tokens -> root `AGENTS.md` (target `<=35L`, cap `80L`) + ignores; run global `<skill-dir>/scripts/repo-index.cjs` (no copied CLI/`INDEX.md`).
  - *Tier 2 (`FULL 4-LAYER`):* `>=3` monoliths or `>=25k` trap tokens -> `AGENTS.md` + `INDEX.md` + CLI (`R*<1` break-even).
- **Profile:** omit prose-brevity rules in `AGENTS.md` when `Ponytail`/`Caveman`/`opencode-dcp`/`RTK`/`openrtk` active; keep Codex/GPT `AGENTS.md` (`AGENTS.override.md`) pointer-only (`+26–39%` GPT-5 regression). Load `references/tool-coop-matrix.md` only for MCP/hook/plugin setup.
- **Scope:** Antigravity stops at nearest `.git` (add `AGENTS.md` per nested `.git`); OpenCode auto-loads `AGENTS.md` & `.opencode/skills/`. `.dot-dir/` search needs `rg --hidden` (Windows `rg` prints `\`).

### 2. Decision Gate
Present `--audit` scoreboard; confirm: (1) Tier 0 vs 1 vs 2; (2) `file:L-L` + `--slice` vs split monoliths; (3) conditional ignore sync + optional host configs (`references/templates.md`).

### 3. Build Co-op Layers
- **Conditional Ignore Sync (`--sync-ignores --write`):** writes `.ignore`; syncs `.contextignore`/`.jcodemunch.jsonc` when detected (or `--all-ignores`), plus repo-present `.cursorignore`, `.cursorindexingignore`, `.geminiignore`, `.aiexclude`, `.codeiumignore`, `.rooignore`, `.clineignore`, `.aiderignore`, `.claudeignore` ONLY when active (`opencode.json[c]` stays read-only; `--verify` checks `opencode-ignore`/existing `watcher.ignore` + `.env` deny). Preserves `#` headers, JSONC `//` comments, and `!negations`. `.contextignore` gets Token Optimizer's fnmatch form (`dir/` -> `*/dir/*`, no image/PDF blocks); a `!path` in `.ignore` is the keep-list for folders the user wants searchable (RE `decompiled/`, `_work/`).
- **Router (`AGENTS.md` / `INDEX.md`):** invariants, Do-Not-Read paths, CLI commands, and `` `sym` `Lstart-Lend` `` landmarks:
  - IDs, JSON/config/doc monoliths -> `--map`/`--slice`/`--outline` + `Read(file, offset, limit)`.
  - Callers / impact -> `jcodemunch` when indexed; else `--outline <file> [filter]` + `Read(offset, limit)`. `<15L` targets -> `Grep`/`Read`.
  - Never run `/caveman-compress` on `AGENTS.md`, `INDEX.md`, or `SKILL.md`.
- **Off-Context CLI (`scripts/repo-index.cjs`):**
  1. Caps stdout `<3,500 chars`; redacts secrets (`ghp_`, `sk-`, `AIza`, `AKIA`, JWTs; refuses `.env`/`.pem`/`.key`).
  2. Prints `file:Lstart-Lend` via optional `typescript` Compiler AST + built-in Polyglot Lexer: TS/JS/JSX/TSX, Python, Rust, Go, C/C++, C#, Java, Kotlin, Swift, PHP, Ruby, Elixir, SQL, Shell/Bash, HTML/Svelte/Vue/Astro, CSS, JSON/JSONC, YAML, TOML, Markdown.
  3. Pass logical IDs or `<file>:Lstart-Lend` to `--slice` (avoid raw `.json` args under `Token Optimizer`).
  4. Auto-heals drifted line ranges via `--sync-landmarks --write`.

### 4. Verify & Measure
Run `--sync-landmarks --write`, `--verify`, `--audit`, `--handoff`. Report bytes (`bytes/4` est. tokens), $R^*$, skipped checks, and risks.

Files in this skill

  • .contextignore801 B
  • .ignore801 B
  • .jcodemunch.jsonc1.2 KB
  • AGENTS.md1 KB
  • CHANGELOG.md4.4 KB
  • CODE_OF_CONDUCT.md1.6 KB
  • CONTRIBUTING.md5.4 KB
  • SECURITY.md1.5 KB
  • SKILL.md4.1 KB
  • assets/hero-banner.svg6.3 KB
  • assets/logo.svg1.1 KB
  • assets/terminal-demo.svg13.7 KB
  • assets/workflow-steps.svg6.9 KB
  • index.html78.5 KB
  • package.json1.6 KB
  • references/templates.md4.8 KB
  • references/tool-coop-matrix.md6.7 KB
  • test/accuracy.cjs6.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.