aio-patch-anchor

aio-patch-anchor is a skill for Claude Code, Codex from aiocean/claude-plugins. It costs 57 tokens per session (562 once invoked), scanned A, original, MIT.

An AST-based navigator for finding named locations, or anchors, in an extracted cli.js file. AST means a structured representation of source code that tools can inspect.

In plain words
What is it for?
Use it to find anchors, navigate cli.js, and build an explorer for updating patches after version changes.
Why use it?
It helps recover patch locations when a new Claude version moves code and old anchors no longer point to the right place.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the aio-claude-toolkit plugin — 9 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aiocean/claude-plugins/aio-patch-anchor
Any agent
npx skills add aiocean/claude-plugins --skill aio-patch-anchor
Clone the repo
git clone --depth 1 https://github.com/aiocean/claude-plugins

Made for: Claude Code, Codex.

Or install aio-claude-toolkit, the plugin that ships this one along with the rest of its 9 skills.

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 aio-patch-anchor

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-patch-anchor.svg)](https://agentmods.dev/skills/aiocean/claude-plugins/aio-patch-anchor)
Your own site
<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-patch-anchor"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-patch-anchor.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 562 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00057 $0.00562
Opus 5 $0.00028 $0.00281
Sonnet 5 $0.00011 $0.00112
Haiku 4.5 $0.00006 $0.00056

Measured 3d ago against content hash 055bbd27ad43, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

aio-patch-anchor scanned grade A with 0 findings 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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/anchor.sh, tests/test-find.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/aio-claude-toolkit/skills/aio-patch-anchor/SKILL.md · 46 lines

What it actually says

aio-patch-anchor — anchor discovery & AST navigation for cli.js

Goal

Help write durable patches by surfacing structural / textual anchors in the extracted dist/<arch>/cli.js. Bridge between "I want to patch X" and "what's the invariant string near X I can anchor on".

Usage

/aio-claude-toolkit:aio-patch-anchor find <pattern>      # grep + AST proximity hits
/aio-claude-toolkit:aio-patch-anchor navigate --fn <name>   # walk AST around a function
/aio-claude-toolkit:aio-patch-anchor navigate --at <line>   # show AST context at a line
/aio-claude-toolkit:aio-patch-anchor explorer            # render single-file HTML browser of cli.js

Requires

  • Scaffolded project (walk-up sentinel)
  • dist/<arch>/cli.js already extracted (aio-patch-extract run before this)
  • node (with acorn, acorn-walk, eslint-scope installed in tools/cli-nav/node_modules/)

If tools/cli-nav/node_modules is empty, anchor.sh runs bun install (preferred) or npm install in tools/cli-nav/ first.

Drift recovery workflow

  1. Compile reports MISSING patch IDs.
  2. For each missing ID, take a 3-5 word fragment of the patch's old field.
  3. Run /aio-claude-toolkit:aio-patch-anchor find "<fragment>" to find the new location.
  4. Update tools/pipeline/patches.json old field with the surrounding invariant content.
  5. Re-run /aio-claude-toolkit:aio-patch-compile (transitive — extract first if cli.js stale).

See docs/repatching-playbook.md (step-by-step re-anchoring recipe).

Implementation

Invokes ${CLAUDE_PLUGIN_ROOT}/skills/aio-patch-anchor/scripts/anchor.sh "$@".

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 46 lines · 57 tokens per session scan A 055bbd27ad43

Subscribe to this mod's changes

aio-patch-anchor is a skill published in the GitHub repository aiocean/claude-plugins (4 stars, last pushed yesterday), licensed MIT. It adds 57 tokens to every session and 562 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.