Skip to content
Back to skills

Aio Patch Anchor

ASecurity

Find and navigate anchors in the extracted cli.js — wraps tools/cli-nav/{find-anchors,navigate,build-explorer}.cjs (acorn-based AST navigator). Used primarily for drift recovery when Claude version bumps shift the location of anchored patch points.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 20, 2026
ai-agentsgonode

Works with

  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

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

Scanned November 20, 2026

npx -y skills add aiocean/claude-plugins --skill aio-patch-anchor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aio Patch Anchor?

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

Security grade badge for Aio Patch Anchor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiocean-aio-patch-anchor/badge)](https://www.skillsdirectory.com/skills/aiocean-aio-patch-anchor)

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: aio-patch-anchor
description: |
  Find and navigate anchors in the extracted cli.js — wraps tools/cli-nav/{find-anchors,navigate,build-explorer}.cjs (acorn-based AST navigator). Used primarily for drift recovery when Claude version bumps shift the location of anchored patch points.
when_to_use: aio patch anchor, find anchor in cli.js, navigate cli.js, ast cli.js, drift recovery, find patch anchor, cli-nav, locate patch point, build cli explorer
argument-hint: "find <pattern> | navigate [args] | explorer"
effort: high
---

# 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 in this skill

  • SKILL.md2.1 KB
  • scripts/anchor.sh1.5 KB
  • tests/test-find.sh2.7 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.