generate-sitemap

$npx mdskill add dandye/ai-runbooks/generate-sitemap

Visualize site structure and navigation maps from project paths.

  • Helps UX designers and architects organize content hierarchies.
  • Depends on file system access to traverse project directories.
  • Analyzes internal links when cross-references are enabled.
  • Outputs diagrams in markdown, XML, SVG, or Mermaid formats.

SKILL.md

.github/skills/generate-sitemapView on GitHub ↗
---
name: generate-sitemap
description: Generate hierarchical site structure and navigation maps. Creates visual representations of information architecture and content relationships.
required_roles:
  scribe: roles/scribe.viewer
personas: [information-architect, ux-designer, web-developer]
---

# Generate Sitemap Skill

Generate a hierarchical representation of the site structure and navigation maps. This skill visualizes the information architecture to support user experience design and content organization.

## Inputs

- `PATH` - The root directory of the project or site (e.g., "/project")
- `HIERARCHICAL` - (Optional) Boolean, whether to strictly follow directory hierarchy (default: true)
- `CROSS_REFERENCES` - (Optional) Boolean, whether to include cross-links between pages (default: false)
- `EXPORT_FORMAT` - (Optional) Output format: "markdown", "xml", "svg", "mermaid" (default: "mermaid")

## Workflow

### Step 1: Structure Traversal

Traverse the `PATH` to understand the directory and file structure.
- Build a tree representation of folders and files.
- Identify "index" or "home" pages for each section.

### Step 2: Relationship Mapping

If `CROSS_REFERENCES` is true, analyze links within content to identify non-hierarchical connections.
- Map internal links between nodes.
- Identify "See Also" or related content sections.

### Step 3: Visualization Generation

Convert the structural tree into the requested `EXPORT_FORMAT`.

**For Mermaid (Diagram):**
- Generate a graph TD or Mindmap definition.
- Nodes represent pages/sections.
- Edges represent hierarchy (parent-child) or links.

**For XML (Standard Sitemap):**
- Generate compliant sitemap.xml format.

### Step 4: Output Rendering

Return the generated sitemap code or file.

## Required Outputs

A `SITEMAP_OUTPUT` string containing the sitemap representation in the specified `OUTPUT_FORMAT`.

**Example (Mermaid):**
```mermaid
graph TD
    Root[Home] --> Docs[Documentation]
    Root --> Blog[Blog]
    Docs --> API[API Reference]
    Docs --> Guides[User Guides]
    API --> Auth[Authentication]
```

## Quick Reference

- **Purpose**: Visualize and plan information architecture and navigation.
- **Tools**: Compatible with Mermaid.js for visualization.

More from dandye/ai-runbooks

SkillDescription
analyze-content-gapsIdentify content gaps and organizational opportunities. Analyzes missing content areas, redundancies, and consolidation opportunities.
audit-contentComprehensive content quality and maintenance assessment. Evaluates documentation quality, relevance, maintenance needs, and provides actionable recommendations.
check-duplicates"Check for duplicate or similar cases. Use before deep analysis to avoid investigating the same incident twice. Takes a CASE_ID and returns list of similar cases."
close-case-artifact"Close a case or alert with proper reason and documentation. Use when triage determines an alert is FP/BTP or investigation is complete. Requires artifact ID, type, closure reason, and root cause."
cluster-documentsAutomated content similarity and grouping analysis. Groups related documents by topic, purpose, or content similarity.
confirm-action"Ask the user to confirm before taking a significant action. Use before containment, remediation, or other impactful operations to ensure analyst approval. Presents options and waits for response."
correlate-ioc"Check for existing SIEM alerts and case management entries related to IOCs. Use to understand if an indicator has triggered previous alerts or is part of ongoing investigations. Takes IOC list and returns related alerts and cases."
deep-dive-ioc"Perform exhaustive analysis of a critical IOC. Use when an IOC needs Tier 2+ investigation beyond basic enrichment - includes GTI pivoting, deep SIEM searches, correlation with related entities, and threat attribution. For escalated IOCs requiring comprehensive investigation."
design-metadata-schemaDesign comprehensive metadata frameworks. Develops structured metadata templates and tagging systems.
document-in-case"Add a comment to a case to document findings, actions, or recommendations. Use to maintain audit trail during investigations. Requires CASE_ID and comment text."