mcpbeat Sign in

Github Pages Publisher Skill for Claude

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.

4k tokens
context cost
the whole folder, loaded on every use
7
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
175
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/artwist-polyakov/polyakov-claude-skills --skill github-pages-publisher

What comes with it

12 274 bytes besides the instruction
.gitignore
config/.env.example
config/README.md
references/publish-checklist.md
scripts/optimize_images.py
scripts/publish_static.py

The instruction itself

13 sections, as written by the author

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

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

Publishing command

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:

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

Other skills for the same job

different authors, same section of the catalogue
Use Dom
by openai
vendor ×3

Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.

3k tokens
Frontend Dev Guidelines
by mrgoonie
×2

Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features, fetching data, styling, routing, or working with frontend code.

33k tokens
Next Cache Components
by vercel-labs
vendor ×2

Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag

2k tokens
Shopify Development
by ComeOnOliver
×2

| Build Shopify apps, extensions, themes using GraphQL Admin API, Shopify CLI, Polaris UI, and Liquid. "shopify theme", "liquid template", "polaris", "shopify graphql", "shopify webhook", "shopify billing", "app subscription", "metafields", "shopify functions"

24k tokens scripts
Huggingface Gradio
by huggingface
vendor ×1

Build Gradio web UIs and demos in Python. Use when creating or editing Gradio apps, components, event listeners, layouts, or chatbots.

10k tokens
Figma Generate Diagram
by openai
vendor ×1

MANDATORY prerequisite — load this skill BEFORE every `generate_diagram` tool call. NEVER call `generate_diagram` directly without loading this skill first. Trigger whenever the user asks to create, generate, draw, render, sketch, or build a diagram — flowchart, architecture diagram, sequence diagram, ERD or entity-relationship diagram, state diagram or state machine, gantt chart, or timeline. Also trigger when the user mentions Mermaid syntax or wants a system architecture, decision tree, dependency graph, API call flow, auth handshake, schema, or pipeline visualized in FigJam. Routes to type-specific guidance, sets universal Mermaid constraints, and tells you when to use a different diagram type or skip the tool entirely (mindmaps, pie charts, class diagrams, etc.).

28k tokens
Web Perf
by cloudflare
vendor ×1

Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.

2k tokens
Algorithmic Art
by lingxling
×1

Algorithmic philosophies are computational aesthetic movements that are then expressed through code. Output .md files (philosophy), .html files (interactive viewer), and .js files (generative algorithms).

15k tokens scripts

How to use it

Copy the folder

Take artwist-polyakov/github-pages-publisher from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.