homelab/.claude/skills/wiki-docs.md
Eduardo Figueroa 9e23a54852 feat: Add wiki-docs skill for documentation management
- Create .claude/skills/wiki-docs.md skill for managing Wiki.js documentation
- Skill enables writing markdown files to /mnt/media/wikijs-content/
- Files automatically sync to Wiki.js via Git storage backend
- Update AGENTS.md with Claude Code Skills section
- Document wiki-docs skill usage and benefits
- Add /mnt/media/wikijs-content/ to repository structure

The wiki-docs skill allows AI agents to create version-controlled
documentation that syncs to https://wiki.fig.systems automatically.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-15 23:45:12 +00:00

174 lines
4.2 KiB
Markdown

# Wiki Documentation Skill
Create and manage markdown documentation files that sync to Wiki.js.
## Context
**Repository Location:** `/mnt/media/wikijs-content/`
**Git Remote:** `git.fig.systems/eddie/wiki.git`
**Wiki.js URL:** https://wiki.fig.systems
This repository is synchronized with Wiki.js. Any markdown files created here will automatically appear in the wiki after a sync (typically within 5 minutes, or immediately if triggered manually).
## Capabilities
1. **Create Documentation Pages**
- Write markdown files with proper Wiki.js frontmatter
- Organize content in directories (maps to wiki hierarchy)
- Add tags and metadata
2. **Git Operations**
- Commit changes with descriptive messages
- Push to remote repository
- Pull latest changes before writing
3. **Frontmatter Format**
All wiki pages require this YAML frontmatter:
```yaml
---
title: Page Title
description: Brief description of the page
published: true
date: 2026-03-15T00:00:00.000Z
tags:
- tag1
- tag2
---
```
## Workflow
When creating wiki documentation:
1. **Navigate to repo:**
```bash
cd /mnt/media/wikijs-content
```
2. **Pull latest changes:**
```bash
git pull
```
3. **Write markdown file:**
- Use clear, descriptive filenames (lowercase-with-dashes.md)
- Include proper frontmatter
- Use standard markdown formatting
- Organize in subdirectories as needed (e.g., `homelab/services/service-name.md`)
4. **Commit and push:**
```bash
git add <filename>
git commit -m "Add/Update: brief description"
git push
```
5. **Verify:** Changes will appear at https://wiki.fig.systems after sync
## File Organization
Suggested directory structure:
```
/mnt/media/wikijs-content/
├── homelab/
│ ├── services/
│ │ └── service-name.md
│ ├── networking/
│ │ └── traefik-setup.md
│ └── guides/
│ └── how-to-guide.md
├── development/
│ └── project-docs.md
└── reference/
└── commands.md
```
Directories in the repo map to page hierarchy in Wiki.js.
## Examples
### Create a Service Documentation Page
```markdown
---
title: Jellyfin Media Server
description: Jellyfin configuration and usage guide
published: true
date: 2026-03-15T00:00:00.000Z
tags:
- homelab
- media
- jellyfin
---
# Jellyfin Media Server
Jellyfin is a free software media system...
## Access
- **URL:** https://jellyfin.fig.systems
- **Authentication:** Authelia SSO
## Configuration
...
```
### Create a How-To Guide
```markdown
---
title: How to Add a New Service
description: Step-by-step guide for adding services to the homelab
published: true
date: 2026-03-15T00:00:00.000Z
tags:
- homelab
- guide
- docker
---
# How to Add a New Service
This guide walks through the process...
```
## Git Configuration
The repository is already configured:
- **User:** Claude
- **Email:** claude@fig.systems
- **Authentication:** Token-based (embedded in remote URL)
## Best Practices
1. **Always pull before writing** to avoid conflicts
2. **Use descriptive commit messages** following the pattern: "Add: X" or "Update: Y"
3. **Include proper frontmatter** - pages without it won't render correctly
4. **Use semantic filenames** - lowercase with dashes instead of spaces
5. **Organize logically** - use subdirectories for categories
6. **Add relevant tags** - helps with wiki navigation and search
7. **Set published: true** - pages with `published: false` won't be visible
## Troubleshooting
**If page doesn't appear in Wiki.js:**
- Check Wiki.js logs: `docker compose logs wikijs`
- Manually trigger sync in Wiki.js admin panel (Storage section)
- Verify frontmatter is valid YAML
- Ensure file has `.md` extension
**If git push fails:**
- Check authentication token is still valid
- Verify network connectivity to git.fig.systems
- Try pulling first to resolve conflicts
## Integration with Other Services
This wiki can document:
- **Homelab services** (compose/services/*)
- **Infrastructure setup** (Traefik, Authelia, LLDAP)
- **Media management** (*arr stack, Jellyfin)
- **Development projects**
- **Personal notes and references**
All documentation is version-controlled and backed up via Git!