block/builderbot/anchor-stability
Claude Code and agent skill by block/builderbot
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install block/builderbot/anchor-stabilitySKILL.md
The same SKILL.md was published earlier as block/builderbot/anchor-stability.
Anchor Stability Test Loop
Run the anchor stability test-improve loop for the penpal highlight system. Each iteration generates complex markdown, creates thread highlights via MCP, validates anchors survive edits (before/after/within), and iterates to improve the system.
Usage
iterations— number of iterations to run (default: 10)
Test Parameters
- Each test scores max 7 points: initial=2, editBefore=2, editAfter=2, editWithin=1
- 10 tests per iteration = 70 max per iteration
- Pass threshold: 69/70
- Dashboard: http://localhost:18950
Loop Procedure
For EACH iteration (never batch — run ONE at a time with full between-iteration work):
1. Determine the next iteration number
2. Run the iteration
3. Read and analyze results
If any test scored < 7, examine failure diagnostics in the test details (analysis field). Look for:
textInMarkdown— whether the selectedText exists in the current markdownoccurrences— how many times (affects disambiguation)allHighlights— total mark elements on pagethreadHighlight— marks for the specific thread (0 = highlight never created)
4. Make improvements if needed
Improvements should be in production code, not by avoiding test cases that expose real issues. Key files:
- `frontend/src/components/rehypeCommentHighlights.ts` — rehype plugin that matches highlights via text matching
- `internal/comments/anchor.go` — server-side anchor resolution (text matching + Before/After disambiguation)
- `internal/server/comments.go` — thread re-resolution endpoint
- `frontend/src/components/SelectionToolbar.tsx` — frontend anchor computation
After making improvements:
- Rebuild:
just build - Record the improvement in results.json (top-level
improvementsarray):
- Commit the fix
5. Repeat from step 1
Critical Rules
- NEVER batch iterations. Run one, do all between-iteration work, then run the next.
- NEVER avoid test cases that expose real issues. If a test fails because of a real-world scenario (e.g., user selecting inside inline code), fix the production code, not the test.
- NEVER make flaky tests. Tests must pass reliably every time.
- Improvements go in production code (
frontend/src/,internal/), not by constraining test inputs. - Always record improvements in results.json notes so the dashboard shows them.
- Always check between iterations for new issues from the user.
Starting the Dashboard
If not already running:
Dashboard is at http://localhost:18950 with live polling.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingapps/penpal/e2e/anchor-stability/SKILL.md
Popularity
- Repository stars
- 89
- Repository forks
- 25
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/block/builderbot/anchor-stability)