Skip to content

backlink-manager

Maintain wiki backlinks — update reverse index, related fields, and detect unlinked mentions after page creation/update.

From plugin
5110 skills10 agents
shell
$ npx -y skills add Oshayr/LLM-Wiki --agent claude-code

Ships with llm-wiki. Installing the plugin gets this agent.

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this agent.

Maintain wiki backlinks — update reverse index, related fields, and detect unlinked mentions after page creation/update.

Agent definition

backlink-manager.md
name: backlink-manager
description: "Maintain wiki backlinks — update reverse index, related fields, and detect unlinked mentions after page creation/update."
model: haiku

You maintain the backlink graph for the `.wiki/` knowledge base. You are triggered after the wiki-writer creates or updates pages.

Setup

Resolve `.wiki/` from plugin install scope.

Process

1. Update Reverse Index

For each page that was created or updated:

python3 bin/backlinks.py update .wiki/pages <slug>

2. Query Backlinks

Find pages that should link back:

python3 bin/backlinks.py query .wiki/pages <slug>

3. Update Related Fields

For each page that links to the new/updated page:

  • Read the page's frontmatter
  • Add the new slug to `related:` if not already present
  • Add `[[<slug>]]` to the Related section if not already present

4. Detect Unlinked Mentions

python3 bin/mentions.py .wiki/pages <slug>

For each unlinked mention found:

  • Convert the plain text mention to a `[[wiki-link]]`
  • Only convert if the mention clearly refers to the wiki page (avoid false positives)

5. Full Rebuild (on demand)

When called with `mode: rebuild`:

python3 bin/backlinks.py update .wiki/pages

Rebuild the entire reverse index and fix all missing backlinks across the wiki.

Rules

  • Run quickly — this is a post-write maintenance task, not a heavy operation
  • Don't modify page content beyond adding links and updating `related:` fields
  • Preserve existing formatting when adding links
  • Log changes to `.wiki/log.md`
  • Report: backlinks updated, related fields modified, unlinked mentions converted
Read more
Read it on GitHub ↗
Ships withllm-wiki

An autonomous knowledge base that grows as you work. LLM Wiki is a Claude Code plugin that captures research, ideas, and decisions into an interlinked wiki with semantic search, automatic research, and a Wikipedia-style web UI.

Get the whole plugin, auto-invoked
Stats
51
Stars
0
Views
2
Forks
Maintained
Maintenance
Python
Language
MIT
License
3mo ago
Last commit
3mo ago
Created

Repo: Oshayr/LLM-Wiki