Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Validate Links

ASecurity

Validates all [[wiki links]] and

8 stars
0 votes
0 copies
0 views
Added 9/20/2026
devopsgobashgitci/cd

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add tstapler/dotfiles --skill validate_links --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Validate Links?

Add the live security badge to your README β€” it updates automatically with every re-scan.

Security grade badge for Validate Links
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/tstapler-validate-links-dotfiles/badge)](https://www.skillsdirectory.com/skills/tstapler-validate-links-dotfiles)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
description: Validates all [[wiki links]] and
---

# Validate Links Command

Validates all [[wiki links]] and #[[tag links]] in the Logseq repository to ensure they point to existing pages.

## Installation

The `logseq-validate-links` tool is part of the stapler-logseq-tools package. Ensure it's installed:

```bash
cd ~/Documents/personal-wiki
uv install -e .
```

This will make the `logseq-validate-links` command available in your environment.

## Usage

```bash
# Basic validation - shows broken links only
logseq-validate-links validate

# Validation with detailed output
logseq-validate-links validate --show-valid

# Create stub pages for missing links
logseq-validate-links validate --create-missing

# Quick check for missing links only
logseq-validate-links missing

# Show wiki statistics and analysis
logseq-validate-links stats
```

## Features

### Validation (`validate` command)
- Scans all `.md` files in `logseq/pages/` and `logseq/journals/`
- Extracts all `[[wiki links]]` and `#[[tag links]]`
- Reports broken links (links to non-existent pages)
- Shows which files contain broken links
- Option to auto-create stub pages for missing links
- Exits with error code if broken links found (useful for CI/CD)

### Missing Links (`missing` command)
- Quick scan to list all missing links
- Useful for getting a simple list of pages that need to be created
- Supports file pattern filtering

### Statistics (`stats` command)
- Overall wiki health metrics
- Total files, pages, unique links, and tags
- Most connected files (files with most outbound links)
- Missing link count

### Enhanced Connection Analysis (NEW)
**Integrate with `logseq-analyze connections` for deeper insights**:

```bash
# Run connection analysis for comprehensive link health
cd ~/Documents/personal-wiki
uv run logseq-analyze connections logseq/

# Provides:
# - Orphaned pages (no incoming links)
# - Poorly connected pages (< 3 total connections)
# - Hub pages (highly connected, > 10 links)
# - Average connections per page
# - Link distribution statistics
```

This goes beyond simple broken link detection to identify:
- **Isolated content** that needs integration
- **Important hubs** that may need expansion
- **Connection patterns** in your knowledge graph

## Command Line Options

### `validate` command:
- `--show-valid`: Include valid links in detailed output
- `--create-missing`: Automatically create stub pages for missing links
- `--exclude-tags`: Don't validate tag links (`#[[tags]]`)

### `missing` command:
- `--file-pattern`: File pattern to search (default: `*.md`)

## Example Output

```
πŸ”— Broken Links Found
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Missing Page       ┃ Referenced In                ┃
┑━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ New Concept        β”‚ 2025_09_08.md               β”‚
β”‚ Technical Topic    β”‚ Some Page.md, Another.md    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š Link Validation Summary
┏━━━━━━━━━━━━━━━━┳━━━━━━━┓
┃ Metric         ┃ Count ┃
┑━━━━━━━━━━━━━━━━╇━━━━━━━┩
β”‚ Total Pages    β”‚   156 β”‚
β”‚ Files Validatedβ”‚    89 β”‚
β”‚ Valid Links    β”‚   423 β”‚
β”‚ Broken Links   β”‚     2 β”‚
β”‚ Tag Links      β”‚    78 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
```

## Integration with Development Workflow

### Pre-commit Hook
Add to `.git/hooks/pre-commit`:
```bash
#!/bin/bash
logseq-validate-links validate
if [ $? -eq 1 ]; then
    echo "❌ Commit blocked: Broken links found"
    echo "Run 'logseq-validate-links validate --create-missing' to fix"
    exit 1
fi
```

### CI/CD Integration
```yaml
# GitHub Actions example
- name: Validate Wiki Links
  run: |
    cd ~/Documents/personal-wiki
    uv run logseq-validate-links validate
```

### Daily Health Check
```bash
# Add to cron or scheduled task
logseq-validate-links stats > wiki_health_report.txt
```

## Stub Page Creation

When using `--create-missing`, the tool creates basic stub pages with this template:

```markdown
- **Core Definition**: [Page Name]

## Background/Context
- TODO: Add context and background information

## Key Characteristics/Principles
- TODO: Add key characteristics

## Related Concepts
- TODO: Add related concept links

## Significance
- TODO: Add significance and importance

**Related Topics**: #[[TODO]]
```

This ensures all links resolve while providing a structured template for future content development.

## Enhanced Workflow: Comprehensive Link Health Check

### Step 1: Traditional Link Validation
```bash
# Check for broken links
logseq-validate-links validate
```

### Step 2: Connection Analysis
```bash
# Analyze connection patterns
cd ~/Documents/personal-wiki
uv run logseq-analyze connections logseq/
```

### Step 3: Combined Insights
Merge results to identify:
- **Broken links** β†’ Create stub pages or remove references
- **Orphaned pages** β†’ Add incoming links from related content
- **Poorly connected** β†’ Enhance with bidirectional links
- **Hub pages** β†’ Consider splitting or expanding

### Step 4: Prioritized Actions
```bash
# Fix broken links first (critical)
logseq-validate-links validate --create-missing

# Then address orphaned pages (high priority)
# Review list from connection analysis and add links

# Finally, improve poorly connected pages (medium priority)
# Use synthesis to enhance content and connections
```

## Use Cases

1. **Before Publishing**: Ensure all references are valid
2. **After Major Edits**: Verify no links were broken during restructuring
3. **Content Planning**: Identify which concepts need dedicated pages
4. **Quality Assurance**: Regular health checks of knowledge base integrity
5. **Automated Validation**: Integration with CI/CD for continuous validation
6. **Knowledge Graph Health**: Use connection analysis to maintain a well-connected wiki
7. **Content Discovery**: Find isolated content that needs integration

## Fallback Strategy for Tool Availability Issues

If `logseq-validate-links` is not installed or not accessible:

### Manual Installation
```bash
cd ~/Documents/personal-wiki
uv install -e .
```

### Manual Link Validation
If the tool still doesn't work, perform manual validation using grep:

```bash
# Find all wiki links
cd ~/Documents/personal-wiki
grep -rho '\[\[.*\]\]' logseq/pages/ logseq/journals/ | sort -u > all_links.txt

# Find all existing pages
find logseq/pages -name "*.md" -exec basename {} .md \; | sort > all_pages.txt

# Compare to find broken links (requires manual review)
comm -23 all_links.txt all_pages.txt
```

### Read-Only Analysis Mode
If file modifications aren't possible:
1. Generate a report of broken links in markdown format
2. Provide stub page templates in code blocks
3. List exact file paths for manual creation
4. Prioritize links by frequency of reference

Attribution

tstaplertstapler
View sourceMore from tstapler β†’
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots Β· $299/mo Β· GSC-verified traffic Β· sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots Β· $299/mo Β· GSC-verified traffic Β· sponsors can never buy grades.

See placements

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

393431 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2459130 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

929660 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

805540 votes
View all in devops β†’