Back to list
leobrival

check-links

by leobrival

Serum plugin for Claude Code

0🍴 0📅 Jan 20, 2026

SKILL.md


Check Links

Analyze and validate links (<a>) and buttons on web pages for proper navigation and accessibility.

Quick Start

Run the link checker from the scripts directory:

cd /path/to/html-checker/scripts
bun src/check-links.ts <URL>

CLI Options

OptionShortDefaultDescription
--verbose-vfalseShow all links including valid ones
--json-jfalseOutput results as JSON
--check-external-efalseVerify external links (slower)

Checks Performed

CheckSeverityDescription
Empty hrefErrorLink with href="" or no href attribute
javascript:voidWarningLink with href="javascript:void(0)"
Hash onlyWarningLink with href="#" (no destination)
Button no actionError<button> without click handler or form
Dead linkErrorLink returns 404 or unreachable
Missing textWarningLink with no accessible text content

Usage Examples

Basic check

bun src/check-links.ts https://example.com
bun src/check-links.ts https://example.com --verbose
bun src/check-links.ts https://example.com --check-external

JSON output for automation

bun src/check-links.ts https://example.com --json

Output

The checker provides:

  1. Summary - Total links/buttons analyzed
  2. Issues - List of problems with severity and location
  3. Statistics - Breakdown by issue type
  4. Recommendations - How to fix each issue

Example Output

Link Analysis for https://example.com

Summary:
  Total Links: 45
  Total Buttons: 12
  Issues Found: 7

Issues:
  [ERROR] Empty href at line 23
    <a href="" class="cta-button">Click here</a>

  [WARNING] javascript:void at line 56
    <a href="javascript:void(0)" onclick="openModal()">Learn More</a>

  [WARNING] Hash-only link at line 89
    <a href="#">Back to top</a>

  [ERROR] Button without action at line 112
    <button class="submit-btn">Submit</button>

Statistics:
  Empty href: 2
  javascript:void: 3
  Hash-only: 1
  Button no action: 1

Recommendations:
  - Replace javascript:void with proper button elements
  - Add href destinations or use <button> for actions
  - Ensure all buttons have onclick or form association

Common Issues and Fixes

Empty href

Bad:

<a href="" class="btn">Click</a>

Good:

<a href="/destination" class="btn">Click</a>
<!-- or use button for actions -->
<button type="button" class="btn" onclick="handleClick()">Click</button>

javascript:void(0)

Bad:

<a href="javascript:void(0)" onclick="doSomething()">Action</a>

Good:

<button type="button" onclick="doSomething()">Action</button>

Bad:

<a href="#">Scroll to top</a>

Good:

<a href="#top">Scroll to top</a>
<button type="button" onclick="scrollToTop()">Scroll to top</button>

Accessibility (WCAG)

  • SC 2.4.4: Link purpose must be clear
  • SC 4.1.2: All interactive elements need accessible names
  • SC 1.3.1: Buttons must be properly identified

SEO Impact

  • Empty/invalid links waste crawl budget
  • javascript:void links are not crawlable
  • Broken links harm site authority
  • Internal linking improves page discovery
  • Command: plugins/html-checker/commands/check-links.md
  • Scripts: plugins/html-checker/scripts/src/check-links.ts
  • Check Headings: plugins/html-checker/skills/check-headings/
  • Check Images: plugins/html-checker/skills/check-images/

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon