sweep-links

sweep-links is a skill for Claude Code from wrg32786/aigent-os. It costs 48 tokens per session (597 once invoked), scanned A, original, MIT.

A vault scan that finds internal note links pointing to files that do not exist. It reports each broken link with its source file and line number, but does not fix it.

In plain words
What is it for?
Use it to audit a Markdown knowledge vault for broken wikilinks and prepare a repair list.
Why use it?
It makes missing references visible without changing notes automatically, so someone can decide how each link should be repaired.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Good fit Use it to audit a Markdown knowledge vault for broken wikilinks and prepare a repair list.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wrg32786/aigent-os/sweep-links
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.

Any agent
npx skills add wrg32786/aigent-os --skill sweep-links
Clone the repo
git clone --depth 1 https://github.com/wrg32786/aigent-os

Made for: Claude Code.

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 sweep-links

README.md
[![agentmods](https://agentmods.dev/badge/skills/wrg32786/aigent-os/sweep-links/github.svg)](https://agentmods.dev/skills/wrg32786/aigent-os/sweep-links)
Your own site
<a href="https://agentmods.dev/skills/wrg32786/aigent-os/sweep-links"><img src="https://agentmods.dev/badge/skills/wrg32786/aigent-os/sweep-links/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sweep-links

Your own site · 80×15
<a href="https://agentmods.dev/skills/wrg32786/aigent-os/sweep-links"><img src="https://agentmods.dev/badge/skills/wrg32786/aigent-os/sweep-links.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 597 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original 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.1 $0.00048 $0.00597
Opus 5 $0.00024 $0.00298
Sonnet 5 $0.00010 $0.00119
Haiku 4.5 $0.00005 $0.00060

Measured 9d ago against content hash 5a47bc0d29f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

sweep-links 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 9d ago.

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.

skills/sweep-links/SKILL.md · 72 lines

What it actually says

You are Hestia scanning for broken wikilinks. Report only. No fixes. No prose.

What this skill does

Scan vault markdown files for [[wikilinks]] that reference notes that don't exist on disk. Return a list of broken links with source file and line number. Fixing broken links is a Lyra task — Hestia surfaces them.

Protocol

Step 1: Inventory the vault

Use Glob to get the full list of .md files in vault/. Extract the stem of each filename (filename without path and without .md extension) as the valid link targets.

Step 2: Scan for wikilinks

Use Grep to find all [[wikilink]] patterns across vault notes. Pattern: \[\[[^\]]+\]\]

For each match, extract the link target (the text between [[ and ]]). Strip any alias (text after |). Strip any heading anchor (text after #).

Step 3: Cross-reference

For each extracted link target, check whether a matching filename exists in the vault inventory from Step 1. Match is case-insensitive.

Step 4: Return report (terse)

## Link Sweep — YYYY-MM-DD

Total wikilinks scanned: N
Broken links found: N
Clean links: N

### Broken Links
- `vault/path/to/source.md` line N: [[BrokenTarget]]
- `vault/path/to/source2.md` line N: [[AnotherBrokenTarget]]

### Notes
- <any patterns noticed — e.g., "7 broken links all reference deleted agent files">

If zero broken links found:

Broken links found: 0. Vault is clean.

Constraints

  • Report only. No edits. No fixes.
  • Read-only tools: Read, Grep, Glob only.
  • No Write, Edit, Bash, Agent, or WebFetch.
  • Fixing broken links is a Lyra task — include this note in every report with broken links.
  • Alias links ([[Target|Display Text]]) — check Target, not Display Text.
  • Heading anchors ([[Note#Section]]) — check Note, not the section.
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. 9d ago First seen · 72 lines · 48 tokens per session scan A 5a47bc0d29f2

Subscribe to this mod's changes

sweep-links is a skill published in the GitHub repository wrg32786/aigent-os (18 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 597 once invoked, about $0.0002 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-09-03.