AgentSkillsCN

broken-link-checker

检查项目内 Markdown 文档中的失效链接。

SKILL.md
--- frontmatter
name: broken-link-checker
description: 프로젝트 내 마크다운 문서의 깨진 링크를 검사합니다

Broken Link Checker

프로젝트 내 모든 마크다운 파일(.md)에서 깨진 링크를 검사하는 스킬입니다.

What it does

  • 프로젝트 내 모든 마크다운 파일 탐색
  • 내부 링크(상대 경로) 유효성 검사
  • 앵커 링크 유효성 검사 (#heading-id 형식)
  • 깨진 링크 목록과 위치 보고

How to use

bash
bash ./.claude/skills/broken-link-checker/check-broken-links.sh

Options

bash
# 기본 검사
bash ./.claude/skills/broken-link-checker/check-broken-links.sh

# 특정 디렉토리만 검사
bash ./.claude/skills/broken-link-checker/check-broken-links.sh --path ./docs

Output Format

code
╔════════════════════════════════════════════════════════════════╗
║  Broken Link Checker                                           ║
╚════════════════════════════════════════════════════════════════╝

📁 검사 대상: 15개 마크다운 파일

──────────────────────────────────────────────────────────────────

❌ 깨진 링크 발견: 2개

📄 README.md:25
   └─ ./docs/missing-file.md (파일 없음)

📄 CLAUDE.md:142
   └─ #non-existent-heading (앵커 없음)

──────────────────────────────────────────────────────────────────

✅ 정상 링크: 47개
❌ 깨진 링크: 2개
⚠️  스킵됨: 5개 (외부 URL)

총 검사 시간: 2초

Validation Rules

  1. 내부 링크 (상대 경로)

    • 파일 존재 여부 확인
    • 대소문자 정확성 검사
    • 디렉토리 경로 유효성 확인
  2. 앵커 링크

    • 헤딩 ID 존재 여부 확인
    • GitHub 스타일 앵커 ID 변환 적용

Requirements

  • grep, sed, perl (링크 파싱)

Related Files

  • .claude/skills/documentation-sync-checker/ - 문서 동기화 검사
  • .claude/skills/list-docs/ - 문서 목록 조회