Skip to main content
skill CX Codex

sweep-links — Claude Code skill: broken link scan

The sweep-links skill for Claude Code finds wikilinks that point to missing notes. Run it to scan a vault or locate dead links.

MIT ★ 26 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add wrg32786/aigent-os --skill sweep-links -a claude-code
Open on GitHub

What sweep-links does

The skill scans Markdown files in vault/, builds a list of note names, then checks each [[...]] target against that list. Its report gives the source file and line number for every broken link. Matching ignores letter case.

For aliased links, it checks the target before |; for links with heading anchors, it checks the note name before #. The scan uses only Read, Grep, and Glob, and makes no edits. Fixing broken links is assigned to Lyra.

What it helps with

  • find links to notes that are missing from the vault
  • locate each broken link by file and line
  • check the target rather than an alias or heading anchor
  • get a report of broken and clean links

Example prompts for the agent

  • Scan vault/ and report broken wikilinks.
  • Find links that point to notes missing from the vault.
  • Check the vault for dead links and list their source lines.

How to install sweep-links

1Skills CLI (Vercel)

npx skills add wrg32786/aigent-os --skill sweep-links -a claude-code

2Manually: put the files in place

~/.claude/skills/sweep-links/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sweep-links/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about sweep-links

How do I install sweep-links in Claude Code?

Run npx skills add wrg32786/aigent-os --skill sweep-links -a claude-code. The skill file is at ~/.claude/skills/sweep-links/SKILL.md.

What does sweep-links do?

It scans Markdown files in vault/ for wikilinks to notes that do not exist, then reports each source file and line. It does not edit links.

How does sweep-links handle aliases and heading anchors?

For [[Target|Display Text]], it checks Target; for [[Note#Section]], it checks Note.

Source text

SKILL.md · MIT
---
name: sweep-links
agent: hestia
description: "Report broken vault wikilinks with source files and lines. Use when scanning for dead links, checking wikilinks, or sweeping links. Reports only; no fixes."
allowed-tools: Read, Grep, Glob
user-invocable: true
triggers:
  - sweep links
  - broken links
  - find broken wikilinks
  - wikilink scan
  - link check
  - find dead links
  - broken wikilink scan
  - check wikilinks
---

# Sweep Links

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.

© wrg32786 · MIT · wrg32786/aigent-os

Similar skills

All skills for Notes, tasks and projects →

From the same set58

The whole set →
frontend-slides The frontend-slides Claude Code skill creates animated HTML presentations and converts PowerPoint files into browser-ready slides. It activates for slide decks, talks, pitches, and PPT/PPTX web conversions. CX Codex +1 ★ 26repo stars sweep-heat The sweep-heat Claude Code skill marks cold notes in the bottom 20 of HEAT_INDEX.md as dormant. Run it to inspect the heat index or change note statuses. CX Codex +1 ★ 26repo stars supersede The supersede Claude Code skill replaces outdated vault-note entries while retaining their history. The agent uses it for requests to update a note or mark a claim as no longer true. CX Codex +1 ★ 26repo stars Stuck The Stuck Claude Code skill guides an agent through possible next steps before it calls a task blocked. It activates when the agent runs out of ideas or is about to ask for help. CX Codex +1 ★ 26repo stars status The status Claude Code skill reports the current operating state of aigent-OS. Ask for a snapshot of its mode, objective, next action, or blockers. CX Codex +1 ★ 26repo stars start start — a Claude Code skill that opens a home screen on first launch or when work resumes. It guides setup or gives a brief status update with an action menu. CX Codex +1 ★ 26repo stars sprite-spec This Claude Code skill turns pixel-art character ideas into sprite specifications. It activates for character or sprite-sheet design, covering palettes, proportions, and animation states. CX Codex +1 ★ 26repo stars solution-hunt The solution-hunt Claude Code skill finds legitimate alternatives when a task hits a blocker. It searches local notes and skills, then looks through GitHub and documentation. CX Codex +1 ★ 26repo stars

Project sponsors

Companies that keep this analytics open