Skip to content

Commit 2d2b4a8

Browse files
Add publish-to-pages agent skill
Agent skill that publishes presentations and web content to GitHub Pages. Works with any AI coding agent (Copilot CLI, Claude Code, Gemini CLI, etc.) Features: - Converts PPTX with full formatting preservation - Creates repo, enables Pages, returns live URL - Zero config — just needs gh CLI Repo: https://github.com/AndreaGriffiths11/publish-to-pages Landing page: https://andreagriffiths11.github.io/publish-to-pages-site/ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fcdf1a8 commit 2d2b4a8

4 files changed

Lines changed: 435 additions & 0 deletions

File tree

plugins/external.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,22 @@
1616
"repo": "microsoft/azure-skills",
1717
"path": ".github/plugins/azure-skills"
1818
}
19+
},
20+
{
21+
"name": "publish-to-pages",
22+
"description": "Agent skill that publishes presentations and web content to GitHub Pages. Give it a file (HTML, PPTX, PDF, or Google Slides URL) — get a live URL. Works with any AI coding agent. Converts PPTX with full formatting preservation. Creates repo, enables Pages, returns live URL. Zero config — just needs gh CLI.",
23+
"version": "1.0.0",
24+
"author": {
25+
"name": "Andrea Griffiths",
26+
"url": "https://github.com/AndreaGriffiths11"
27+
},
28+
"homepage": "https://andreagriffiths11.github.io/publish-to-pages-site/",
29+
"keywords": ["github-pages", "publishing", "presentations", "pptx", "pdf", "html", "agent-skill"],
30+
"license": "MIT",
31+
"repository": "https://github.com/AndreaGriffiths11/publish-to-pages",
32+
"source": {
33+
"source": "github",
34+
"repo": "AndreaGriffiths11/publish-to-pages"
35+
}
1936
}
2037
]

skills/publish-to-pages/SKILL.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
name: publish-to-pages
3+
description: 'Publish presentations and web content to GitHub Pages. Converts PPTX, PDF, HTML, or Google Slides to a live GitHub Pages URL. Handles repo creation, file conversion, Pages enablement, and returns the live URL. Use when the user wants to publish, deploy, or share a presentation or HTML file via GitHub Pages.'
4+
---
5+
6+
# publish-to-pages
7+
8+
Publish any presentation or web content to GitHub Pages in one shot.
9+
10+
## 1. Prerequisites Check
11+
12+
Run these silently. Only surface errors:
13+
14+
```bash
15+
command -v gh >/dev/null || echo "MISSING: gh CLI — install from https://cli.github.com"
16+
gh auth status &>/dev/null || echo "MISSING: gh not authenticated — run 'gh auth login'"
17+
command -v python3 >/dev/null || echo "MISSING: python3 (needed for PPTX conversion)"
18+
```
19+
20+
`pandoc` is optional (PDF conversion). Don't block on it.
21+
22+
## 2. Input Detection
23+
24+
Determine input type from what the user provides:
25+
26+
| Input | Detection |
27+
|-------|-----------|
28+
| HTML file | Extension `.html` or `.htm` |
29+
| PPTX file | Extension `.pptx` |
30+
| PDF file | Extension `.pdf` |
31+
| Google Slides URL | URL contains `docs.google.com/presentation` |
32+
33+
Ask the user for a **repo name** if not provided. Default: filename without extension.
34+
35+
## 3. Conversion
36+
37+
### HTML
38+
No conversion needed. Use the file directly as `index.html`.
39+
40+
### PPTX
41+
Run the conversion script:
42+
```bash
43+
python3 SKILL_DIR/scripts/convert-pptx.py INPUT_FILE /tmp/output.html
44+
```
45+
If `python-pptx` is missing, tell the user: `pip install python-pptx`
46+
47+
### PDF
48+
Convert with pandoc:
49+
```bash
50+
pandoc INPUT_FILE -o /tmp/output.html --self-contained
51+
```
52+
If pandoc is missing, tell the user to install it or provide HTML instead.
53+
54+
### Google Slides
55+
1. Extract the presentation ID from the URL (the long string between `/d/` and `/`)
56+
2. Download as PPTX:
57+
```bash
58+
curl -L "https://docs.google.com/presentation/d/PRESENTATION_ID/export/pptx" -o /tmp/slides.pptx
59+
```
60+
3. Then convert the PPTX using the convert script above.
61+
62+
## 4. Publishing
63+
64+
### Visibility
65+
Repos are created **public** by default. If the user specifies `private` (or wants a private repo), use `--private` — but note that GitHub Pages on private repos requires a Pro, Team, or Enterprise plan.
66+
67+
### Publish
68+
```bash
69+
bash SKILL_DIR/scripts/publish.sh /path/to/index.html REPO_NAME public "Description"
70+
```
71+
72+
Pass `private` instead of `public` if the user requests it.
73+
74+
The script creates the repo, pushes `index.html`, and enables GitHub Pages.
75+
76+
## 5. Output
77+
78+
Tell the user:
79+
- **Repository:** `https://github.com/USERNAME/REPO_NAME`
80+
- **Live URL:** `https://USERNAME.github.io/REPO_NAME/`
81+
- **Note:** Pages takes 1-2 minutes to go live.
82+
83+
## Error Handling
84+
85+
- **Repo already exists:** Suggest appending a number (`my-slides-2`) or a date (`my-slides-2026`).
86+
- **Pages enablement fails:** Still return the repo URL. User can enable Pages manually in repo Settings.
87+
- **PPTX conversion fails:** Tell user to run `pip install python-pptx`.
88+
- **PDF conversion fails:** Suggest installing pandoc or converting to HTML manually.
89+
- **Google Slides download fails:** The presentation may not be publicly accessible. Ask user to make it viewable or download the PPTX manually.

0 commit comments

Comments
 (0)