A comprehensive collection of Claude Code slash commands for Linux desktop system administration tasks. Browse by category to find commands for AI tools, system health, hardware management, and more.
#!/usr/bin/env python3 """ Generate static site from slash command markdown files """ import os import json import re from pathlib import Path from typing import Dict, List def parse_frontmatter(content: str) -> tuple[Dict, str]: """Parse YAML frontmatter from markdown content""" frontmatter = {} body = content if content.startswith('---'): parts = content.split('---', 2) if len(parts) >= 3: fm_text = parts[1].strip() body = parts[2].strip() for line in fm_text.split('\n'): if ':' in line: key, value = line.split(':', 1) key = key.strip() value = value.strip() if value.startswith('[') and value.endswith(']'): value = [v.strip() for v in value[1:-1].split(',')] frontmatter[key] = value return frontmatter, body def parse_command_file(filepath: Path) -> Dict: """Parse a single command markdown file""" with open(filepath, 'r', encoding='utf-8') as f: content = f.read() frontmatter, body = parse_frontmatter(content) command_name = filepath.stem category = filepath.parent.name return { 'name': command_name, 'category': category, 'description': frontmatter.get('description', ''), 'tags': frontmatter.get('tags', []), 'content': body, 'filepath': str(filepath.relative_to('commands')) } def scan_commands(commands_dir: Path = Path('commands')) -> Dict[str, List[Dict]]: """Scan all command files and organize by category""" categories = {} for md_file in commands_dir.rglob('*.md'): command = parse_command_file(md_file) category = command['category'] if category not in categories: categories[category] = [] categories[category].append(command) for category in categories: categories[category].sort(key=lambda x: x['name']) return categories def generate_index_html(categories: Dict[str, List[Dict]]) -> str: """Generate the main index.html page""" category_cards = [] for category, commands in sorted(categories.items()): category_display = category.replace('-', ' ').replace('_', ' ').title() command_count = len(commands) category_cards.append(f'''
{command_count} command{"s" if command_count != 1 else ""}
Linux Desktop System Administration Commands
A comprehensive collection of Claude Code slash commands for Linux desktop system administration tasks. Browse by category to find commands for AI tools, system health, hardware management, and more.
$1');
// Inline code
html = html.replace(/`([^`]+)`/g, '$1');
// Bold
html = html.replace(/\\*\\*([^*]+)\\*\\*/g, '$1');
// Headers
html = html.replace(/^### (.+)$/gm, '