agentleFS
googleapisgoogleapis/mcp-toolbox/skills/maintainer/docsite-link-sweep/SKILL.md

docsite-link-sweep

Skill17k starsChanged 7 months agoApache-2.0View on GitHub

Sweep the googleapis/mcp-toolbox docs for broken and non-canonical links, report each finding with its cause, and apply the safe class of internal link fixes. CI does not check links on this repo, so this skill is the only link check that runs. Use when a maintainer asks for a link sweep or a docs health check, before a release, or after a docs reorg, page rename, or directory move. Example requests: "check the docs for broken links", "link sweep", "fix the dead links in docs/". The skill edits the working tree and makes one commit. It never pushes, never opens a PR, and never rewrites external links or ambiguous targets.

  • Installs packages
  • Commits and pushes

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this skill yourself. Nothing else catches these.

    line 18
  2. Distinctive:

    Clean git working tree: Commit or stash docs changes before you start.

    line 29
  3. Very specific:

    Default scope is README.md and docs/en/.

    line 33
  4. Very specific:

    Run lychee. Keep the two --exclude patterns.

    line 44
  5. Very specific:

    Canonical link rule: use a file-relative path that ends in .md, for example Example.

    line 91
  6. Distinctive:

    Check every modified file against both checkers:

    line 95
  7. Distinctive:

    Stop there. Print the report, then give the maintainer the push and PR commands to run.

    line 109
  8. Very specific:

    Verify both ways: Every fix must pass offline lychee and hugo --environment development.

    line 113
  9. Distinctive:

    Never guess an external URL: If an external link is dead, report it.

    line 114
  10. Very specific:

    Canonical format only: Use file-relative .md. Never add an internal link to .lycheeignore.

    line 116
  11. Distinctive:

    Propose only: Never push a branch and never open a PR.

    line 117

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Docsite Link Sweep (mcp-toolbox)

No link check runs in CI. Both link checker workflows are disabled at the GitHub Actions level, so a broken link now merges without warning and nobody files the weekly report issue. Run this skill yourself. Nothing else catches these.

The skill drives two tools, and each one misses what the other catches:

  • Lychee resolves a link as a filesystem path or a network URL. It knows nothing about Hugo.
  • Hugo resolves a .md link to a pretty URL and generates links from shortcodes. It never checks an external URL.

The skill covers the gap. It applies safe mechanical fixes to internal links. It reports external and ambiguous failures for a maintainer to decide.

Prerequisites

  • Clean git working tree. Commit or stash docs changes before you start.
  • lychee. Install with brew install lychee, or run docker run --rm -v "$PWD:/input" lycheeverse/lychee. Lychee is now the only external URL check anywhere in this repo. Without it, run the grep and build passes, then report that external URLs went unchecked.
  • hugo, Extended v0.146.0 or later, for shortcode and build verification.

Default scope is README.md and docs/en/. Sweep the full scope by default, because no CI pass has covered these files since the workflows went dark. Narrow to the changed markdown files only when the maintainer asks to check one PR.

References

  • DEVELOPER.md: canonical link rules. Its "Link Checking and Fixing with Lychee" section says the repo uses lychee for link checks. That claim is stale for CI. The link rules and the .lycheeignore guidance in it remain correct.
  • references/link-forms.md: path-to-URL mapping, version leaks, and Hugo traps.
  • .lycheeignore: excluded domains and URLs. The local lychee CLI still reads this file, so it still applies. Every entry must carry a comment.
  • link_checker.yaml and link_checker_report.yaml: both disabled. The YAML still declares a pull_request trigger and a weekly schedule, so read the workflow state, not the file. Check with gh api repos/googleapis/mcp-toolbox/actions/workflows. Treat these files as the reference for flags to reuse, not as a check that runs.

1. Detect

Run lychee. Keep the two --exclude patterns. neo4j+ and bolt:// are database schemes, and lychee cannot fetch them:

lychee --quiet --no-progress --exclude '^neo4j\+.*' --exclude '^bolt://.*' README.md docs/

# For a PR, limit the scope to changed files:
git diff --name-only --diff-filter=ACMRT origin/main...HEAD -- '*.md'

Then grep for the structural problems lychee cannot see:

# Directory-style links. Hugo resolves these, lychee fails them.
grep -rnE "\]\(\.\.?/[^)]*\)" docs/en --include=*.md | grep -vE "\.md(#[^)]*)?\)"

# Site-absolute links. These leak across versioned deploys.
grep -rnE "\]\(/[^)]*\)" docs/en --include=*.md

# Hardcoded domain URLs.
grep -rn "https://mcp-toolbox.dev/" docs/en --include=*.md

# Section indexes with no `type: docs`. Docsy then renders no child links.
find docs/en -name _index.md \
  -not -path '*/tools/*' -not -path '*/samples/*' -not -path '*/prebuilt-configs/*' \
  -exec grep -L "^type: docs" {} +

The three excluded paths hold frontmatter-only wrapper files. CLAUDE.md requires them to stay minimal, so they are expected hits and not findings. Without the exclusions this check returns about 58 files instead of 1.

For a deep sweep, build the site and crawl the rendered HTML. This is the only pass that sees shortcode-generated links:

cd .hugo && hugo --minify --config hugo.cloudflare.toml
lychee --offline --base-url public public

2. Classify

Fix only safe, unambiguous internal links. Report everything else.

CategoryActionCriteria
Safe to fixRewrite in place to a file-relative .md link• Directory link<br>• Site-absolute [Text](/path/)<br>• Hardcoded https://mcp-toolbox.dev/...<br>• Moved file with exactly one obvious git successor<br>• Renamed heading anchor
Needs decisionReport with a recommendation. Do not apply.• Target is missing or deleted<br>• Several candidate targets after a split or reorg<br>• Link points into an ignoreFiles path (see hugo.toml)<br>• _index.md has no type: docs
ExternalReport file:line, URL, and status• External URL returns 404, 403, or 500
Ignore-worthyPropose a commented .lycheeignore regex• Endpoint is auth-walled, rate-limited, or flaky

Canonical link rule: use a file-relative path that ends in .md, for example [Example](../folder/file.md). Never use a site-absolute /... path or a directory /.../ path.

3. Verify

Check every modified file against both checkers:

lychee --quiet --no-progress --offline <modified-files>
cd .hugo && hugo --environment development

4. Commit and report

git checkout -b docs/fix-docsite-links
git commit -am "docs: fix broken docsite links"

Stop there. Print the report, then give the maintainer the push and PR commands to run.

Rules

  • Verify both ways. Every fix must pass offline lychee and hugo --environment development.
  • Never guess an external URL. If an external link is dead, report it. Do not substitute a replacement.
  • Never invent a missing target. A missing internal page belongs in "Needs your decision".
  • Canonical format only. Use file-relative .md. Never add an internal link to .lycheeignore.
  • Propose only. Never push a branch and never open a PR.

Output format

## Docsite link sweep: <scope>, <X> findings
Checked: lychee (<status>) | Hugo build (<status>) | <N> files changed

**Fixed and verified** (<count>)
| file:line | was | now | reason |

**Needs your decision** (<count>)
| file:line | target | problem | recommendation |

**External, report only** (<count>)
| file:line | url | status |

**Proposed .lycheeignore entries** (<count>)
| pattern | reason |

**Structural** (<count>)
- <file>: <issue>

**Apply:**
git push -u origin docs/fix-docsite-links
gh pr create --title "docs: fix broken docsite links"

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 5 mentionsMay 2026: 5 mentionsJun 2026: 11 mentionsJul 2026: 12 mentionsAug 2026: 4 mentionsSep 2026: 8 mentionsOct 2026: 16 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the googleapis/mcp-toolbox repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about googleapis/mcp-toolbox

The biggest 5 of 64 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 64

Talked about on GitHub, YouTube, Bluesky, the web and Hacker News (64 times).

On GitHub · 33

28 more on GitHub

On YouTube · 22

17 more on YouTube

On Bluesky · 5

On Hacker News · 1

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. googleapis/genai-toolbox★ 17k100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.