Skip to content
Skills Library
DevOps & cloud · Automation

github-pages-publisher

/github-pages-publisher

Publish static page artifacts from the publisher workspace to a GitHub Pages repository using a fine-grained token, with advisory image optimization and an original-image path. Use when a React/static page artifact is already prepared and needs to be copied into the Pages repo under a strict year/year-month/page-slug directory layout, then committed and pushed, with a final public artifact URL returned.

Licence
MIT
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
7
Scripts
2
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/optimize_images.py, scripts/publish_static.py

What it does and when to use it

Publish static page artifacts from the publisher workspace to a GitHub Pages repository using a fine-grained token, with advisory image optimization and an original-image path. Use when a React/static page artifact is already prepared and needs to be copied into the Pages repo under a strict year/year-month/page-slug directory layout, then committed and pushed, with a final public artifact URL returned.

Original author description

Publish static page artifacts from the publisher workspace to a GitHub Pages repository using a fine-grained token, with advisory image optimization and an original-image path. Use when a React/static page artifact is already prepared and needs to be copied into the Pages repo under a strict year/year-month/page-slug directory layout, then committed and pushed, with a final public artifact URL returned.

How it works

  1. Required repository layout
  2. What this skill expects
  3. Default publishing rules
  4. URL contract
  5. Workflow
  6. Publishing command
  7. Image optimization
  8. Slug rules
  9. Pre-publish validation
  10. Safety rules
Original SKILL.md headings · 122 lines, 620 words
SKILL.md preview
---
name: github-pages-publisher
description: Publish static page artifacts from the publisher workspace to a GitHub Pages repository using a fine-grained token, with advisory image optimization and an original-image path. Use when a React/static page artifact is already prepared and needs to be copied into the Pages repo under a strict year/year-month/page-slug directory layout, then committed and pushed, with a final public artifact URL returned.
---

# GitHub Pages Publisher

Publish already-built static artifacts to a GitHub Pages repository.

This skill is the **deployment/output layer** for page artifacts created by other skills.

## Required repository layout

Every published artifact must go into this path shape inside the target repo:

`<year>/<year>-<month>/<page-slug>/`

Example:
- `2026/2026-03/my-landing-page/`

Never publish flat at repo root.
Never skip the year or year-month nesting.

## What this skill expects

Input should already exist as one of these:
- a folder of built static files
- a single HTML artifact plus local assets
- a small static site ready to serve from a subdirectory

This skill should not do major frontend design work. It should package and publish what already exists.

## Default publishing rules

- preserve relative asset paths when possible
- prefer `index.html` as entrypoint inside the target page directory
- keep the output self-contained inside the page folder
- avoid breaking existing published pages
- if the same slug is republished, update the existing folder contents deliberately

## URL contract

Always return the final public URL of the artifact.

Assume GitHub Pages serves from the repo's configured Pages base URL.
The final URL should be:

`<pages-base-url>/<year>/<year>-<month>/<page-slug>/`

or, if needed explicitly:

`.../<page-slug>/index.html`

Prefer the clean directory URL when it resolves correctly.

## Workflow

1. Determine the publish date bucket:
   - year = `YYYY`
   - year-month = `YYYY-MM`
2. Create or update target directory:
   - `<year>/<year-month>/<page-slug>/`
3. Copy artifact files into that directory
4. Optimize oversized raster images when practical, unless original-size sharing is intentional
5. Verify there is an entrypoint (`index.html` normally)
6. Run pre-publish validation (see section above)
7. Commit and push to the Pages repo using the configured fine-grained token workflow
8. Return the final public URL

## Publishing command

```bash
python3 scripts/publish_static.py --source <dir-or-html> --slug <name> [--date YYYY-MM-DD] [--image-max-kb 500]
```

The script copies the artifact into `YYYY/YYYY-MM/slug/`, optimizes oversized `.jpg`, `.jpeg`, `.png`, and `.webp` images, commits, pushes, and prints the final public URL.

## Image optimization

Image optimization is a recommendation, not a hard requirement. By default, the publishing script tries to keep each raster image under `500KB` by stripping metadata, recompressing, and resizing long edges when needed.

Use `--image-max-kb <kb>` for a different target.
Use `--keep-large-images` or `--image-max-kb 0` when the user explicitly needs original-size images (for example, a full-resolution infographic, map, or downloadable media asset).

The original `--source` artifact is not changed. Optimization happens only after files are copied into the publish repo target directory. If Pillow/uv is unavailable or optimization fails, continue publishing originals and mention the warning.

Manual console run for a prepared artifact:

```bash
uv run --with pillow python3 scripts/optimize_images.py <artifact-dir> --max-kb 500
```

## Slug rules

- use lowercase letters, digits, and hyphens
- keep it short and descriptive
- avoid spaces, underscores, Cyrillic, timestamps unless needed for uniqueness
- if the title is user-facing, the slug can still be normalized separately

## Pre-publish validation

Before pushing, the agent must verify:
- artifact has `index.html` entrypoint
- oversized raster images are optimized when practical, unless original-size sharing is intentional
- no absolute local paths in HTML/CSS
- no secrets in files
- all local assets reachable from the target folder
- page renders correctly (if browser tools are available, check at desktop 1440px and mobile 375px)

## Safety rules

- do not delete unrelated directories in the Pages repo
- only replace contents of the target page directory being published
- if overwriting, say so in the result
- do not expose the token in output, logs, or committed files
- do not push artifacts that fail local viewport validation

## Config

Read `config/README.md` for required environment variables and URL derivation.

## References

Read if needed:
- `references/publish-checklist.md` — operational checklist before pushing
Files in this package (7)
  • .gitignore 1 KB
  • SKILL.md 5 KB
  • config/.env.example 1 KB
  • config/README.md 1 KB
  • references/publish-checklist.md 1 KB
  • scripts/optimize_images.py 7 KB
  • scripts/publish_static.py 4 KB

Versions

The database has no other skills named github-pages-publisher.

Database snapshot: 13.11.2026 · package version f56a79f63f5c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100sourcecraft-publisher
    Publish static page artifacts to SourceCraft Sites (Yandex infrastructure, works in Russia), with advisory image optimization and an original-image path. Use when a static page/React artifact needs to be deployed to SourceCraft under YYYY/YYYY-MM/page-slug directory layout.
  • 90deploying-static-pages
    Deploys a static page (research paper, portfolio piece) for free from a GitHub repo using GitHub Pages — setup, file layout, verification, and recording the final URL. Use when publishing a finished write-up as a public web page.
  • 100github-pages-publish
    Publish or update a static site (gh-pages) on GitHub Pages via GitHub Actions in any repo: text or pre-built HTML in, workflow set up, live URL verified. Don't use for CI test pipelines, framework/SSG builds, or Netlify/Vercel hosting.
  • 90GitHub Pages
    Publish a static site, an existing HTML/CSS/JS folder, or generated documentation to GitHub Pages. Use when the user asks to enable Pages, create a Pages workflow, deploy a site, or publish documentation.
  • 100web-publisher
    Create and maintain repository-backed static publishers, with coordinated releases, verified access control for admin pages, and rollback. Use for hosting, site deployment, protected static content, and publishing recovery.
  • 100github-pages
    Complete GitHub Pages deployment and management system. Static site hosting with Jekyll, custom domains, and GitHub Actions. USE WHEN user mentions 'github pages', 'deploy static site', 'host website on github', 'jekyll site', 'custom domain for github', OR wants to publish a…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.