From legacy-knowledge
Document integrity diagnosis skill. Detects dead links, naming convention violations, README mismatch, and reports/ promotion readiness. Runs at the end of documentation work.
npx claudepluginhub t-hasuike/clysis --plugin legacy-knowledgeThis skill uses the workspace's default tool permissions.
> This is a generic skill from [CLysis](https://github.com/t-hasuike/CLysis).
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Performs token-optimized structural code search using tree-sitter AST parsing to discover symbols, outline files, and unfold code without reading full files.
This is a generic skill from CLysis. Terminology can be customized via
config/terminology.md.
Diagnosis (Health Check): Inspects document integrity and reports problems. Does not fix or reorganize — only detects and reports.
Role responsibilities:
| Role | Responsibility |
|---|---|
| Leader | Review diagnosis results, determine remediation strategy |
| Planner | For large-scale diagnosis, plan inspection approach (optional) |
| Worker | Execute checklist items (dead-link detection, naming rules, README consistency, promotion readiness) |
| Auditor | Audit the diagnosis results themselves (ensure no detection gaps) |
Strict compliance with F002: Leader does not personally run diagnostics. Delegate execution to workers.
Distinction from /doc-organize:
/doc-check = Judge (integrity verification + As-Is/To-Be promotion judgment + placement error detection)/doc-organize = Execute (judgment results → actual file placement/reorganization)/doc-check (diagnosis) → detect problems, promotion decision
↓ if problems found
/doc-organize (execution) → actually fix files
Diagnosis only? Use /doc-check alone. Need to reorganize? Use /doc-check → /doc-organize in sequence.
Clear, professional reporting with business etiquette. Clearly state OK/NG, explicitly state what is unclear.
Scan all .md files under knowledge/ for Markdown links [text](path) and verify link targets exist.
Execution: bash scripts/check-dead-links.sh
Scope:
.md files under knowledge/Excluded: External URLs (http/https), mailto links, anchor-only links (#)
Verify knowledge/ files follow naming conventions by character type.
| Prefix | Perspective | Target |
|---|---|---|
birdseye_ | Bird's eye view (overview) | High-level overviews, architecture diagrams |
fisheye_ | Fish eye view (time-series) | Time-series flows, process tracing |
wormseye_ | Worm's eye view (detail) | Implementation details, specifications |
| (none) | Excluded | README.md, templates, indices, root lists, _reference/ contents |
Check method: Scan knowledge/system/ and knowledge/domain/ .md files (excluding: README.md, filenames ending in _template.md, files in _reference/ directories) for required prefix. Report any unprefixed files.
Cross-reference knowledge/README.md against actual directory structure.
Verify promotion status of files in reports/.
Promotion Decision Criteria (Purpose-Based):
| Investigation Purpose | Promotion Timing | Decision Maker |
|---|---|---|
| Current spec survey (As-Is) | Immediate promotion | Leader/Worker |
| Future plans, improvement proposals (To-Be) | Hold (promote after decision maker approval) | Decision maker |
| One-time investigation | Discard candidate (discard if valueless) | Leader |
Check content:
> **Promoted** mark/doc-organize activation if promotion candidates existFor unpromoted files, run heuristics to detect "possible mark omission". Results are suggestive only; final judgment is leader's.
Procedure:
c19_bulk_delivery_90days_investigation.md → bulk_delivery_90dayspr37_arrangement_route_draft.md → pr37_arrangement_route[Review needed] Possible mark omission: {hit file list}[Info] Partial reflection possible[Not reflected] No corresponding content in knowledge/Caveat: Keyword grep detects "some content exists" but NOT "information fully integrated." Human judgment is final.
Future enhancement (Phase 2): Add YAML front-matter (promoted_to: field) to reports/ files for structured tracking, improving accuracy.
| Type | Content | Required/Optional |
|---|---|---|
| Scope | knowledge/ / reports/ / all | Optional (default: all) |
| Type | Format | Destination |
|---|---|---|
| Diagnosis report | Markdown (4-section structure) | reports/ + stdout |
| Skill | Condition |
|---|---|
/doc-organize | When promotion candidates or placement errors detected |
=== /doc-check Execution Results ===
## 1. Dead-Link Detection
- Detected: X cases
- [DEAD] filename:line -> link target
## 2. Naming Convention Check
- Violations: X cases
- [NAMING] filename -> missing prefix
## 3. README Consistency
- Undocumented: X cases
- Non-existent: X cases
## 4. reports/ Promotion Readiness
- Unpromoted (As-Is, recommend immediate): X cases
- Unpromoted (To-Be, awaiting decision): X cases
- Promoted: X cases
=== Summary ===
Problems found: X cases (requires action)
OR
No problems found: Integrity check complete
/doc-organize or confirm decision maker approval/doc-organize — Execute organization/filing based on diagnosis/doc-update — Maintain knowledge/ freshnessscripts/check-dead-links.sh — Dead-link detection scriptknowledge/README.md — Document structure (single source of truth)