home / skills / ratacat / claude-skills / deploy-docs

deploy-docs skill

/skills/deploy-docs

This skill validates and prepares project documentation for GitHub Pages deployment, ensuring correctness, consistency, and smooth automated publishing.

npx playbooks add skill ratacat/claude-skills --skill deploy-docs

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.7 KB
---
name: deploy-docs
description: Validate and prepare documentation for GitHub Pages deployment
---

# Deploy Documentation Command

Validate the documentation site and prepare it for GitHub Pages deployment.

## Step 1: Validate Documentation

Run these checks:

```bash
# Count components
echo "Agents: $(ls plugins/compound-engineering/agents/*.md | wc -l)"
echo "Commands: $(ls plugins/compound-engineering/commands/*.md | wc -l)"
echo "Skills: $(ls -d plugins/compound-engineering/skills/*/ 2>/dev/null | wc -l)"

# Validate JSON
cat .claude-plugin/marketplace.json | jq . > /dev/null && echo "✓ marketplace.json valid"
cat plugins/compound-engineering/.claude-plugin/plugin.json | jq . > /dev/null && echo "✓ plugin.json valid"

# Check all HTML files exist
for page in index agents commands skills mcp-servers changelog getting-started; do
  if [ -f "plugins/compound-engineering/docs/pages/${page}.html" ] || [ -f "plugins/compound-engineering/docs/${page}.html" ]; then
    echo "✓ ${page}.html exists"
  else
    echo "✗ ${page}.html MISSING"
  fi
done
```

## Step 2: Check for Uncommitted Changes

```bash
git status --porcelain plugins/compound-engineering/docs/
```

If there are uncommitted changes, warn the user to commit first.

## Step 3: Deployment Instructions

Since GitHub Pages deployment requires a workflow file with special permissions, provide these instructions:

### First-time Setup

1. Create `.github/workflows/deploy-docs.yml` with the GitHub Pages workflow
2. Go to repository Settings > Pages
3. Set Source to "GitHub Actions"

### Deploying

After merging to `main`, the docs will auto-deploy. Or:

1. Go to Actions tab
2. Select "Deploy Documentation to GitHub Pages"
3. Click "Run workflow"

### Workflow File Content

```yaml
name: Deploy Documentation to GitHub Pages

on:
  push:
    branches: [main]
    paths:
      - 'plugins/compound-engineering/docs/**'
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/configure-pages@v4
      - uses: actions/upload-pages-artifact@v3
        with:
          path: 'plugins/compound-engineering/docs'
      - uses: actions/deploy-pages@v4
```

## Step 4: Report Status

Provide a summary:

```
## Deployment Readiness

✓ All HTML pages present
✓ JSON files valid
✓ Component counts match

### Next Steps
- [ ] Commit any pending changes
- [ ] Push to main branch
- [ ] Verify GitHub Pages workflow exists
- [ ] Check deployment at https://everyinc.github.io/every-marketplace/
```

Overview

This skill validates a documentation site and prepares it for GitHub Pages deployment. It runs content checks, verifies required JSON and HTML files, ensures no uncommitted doc changes exist, and provides a ready-to-use GitHub Actions workflow. The output is a clear deployment-readiness summary and next-step instructions.

How this skill works

The skill inspects the docs directory to count components (agents, commands, skills) and verifies JSON files with a JSON linter. It checks that all required HTML pages exist and reports any missing files. It also runs a git status check for uncommitted changes and outputs a recommended GitHub Actions workflow to enable GitHub Pages deployment. Finally, it emits a concise readiness report and a checklist of next steps.

When to use it

  • Before merging documentation changes to main to confirm deployability
  • When preparing a first-time GitHub Pages setup for the docs site
  • After adding or removing agents/commands/skills to ensure counts and pages match
  • Before running or re-running the GitHub Pages deployment workflow
  • When troubleshooting a missing or invalid docs page or JSON manifest

Best practices

  • Run the validation locally or in CI after editing docs and before creating a PR
  • Commit or stash any uncommitted changes in plugins/compound-engineering/docs/ before deployment
  • Keep marketplace and plugin JSON files well-formed and lint them in CI
  • Include the recommended GitHub Actions workflow with pages and id-token permissions
  • Verify the Pages source in repository Settings and confirm Actions have write permissions

Example use cases

  • A doc maintainer runs the checks to confirm all pages (index, agents, commands, skills, etc.) exist before merging
  • A new repo admin follows the First-time Setup steps to enable automatic GitHub Pages deployment
  • CI runs the validation step to fail a pipeline if marketplace.json or plugin.json are invalid
  • A team member uses the readiness report to track remaining tasks before publishing updates
  • Troubleshooting: find which HTML page is missing when a docs link returns 404

FAQ

What if the JSON validation fails?

Fix the JSON syntax and re-run validation. Use a JSON linter or jq to locate the error and ensure the file parses successfully.

How do I handle uncommitted changes?

Commit or stash changes in plugins/compound-engineering/docs/ before deploying. The skill warns if git status reports dirty files.