/jongio-skills:create-gh-pages-sitefrom jongio-skills
Scaffolds a GitHub Pages site from vetted templates (Astro, VitePress, React/Vite, Eleventy, Jekyll, static HTML) with correct base path and GitHub Actions deploy workflow. Digests the target repo to author repo-specific content with image placeholders.
Ships in jongio-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Scaffold a vetted Pages template with the correct base path and deployment workflow. Replace demo content with repo-derived content.
Pick by what the user is building. If unsure, ask one question (content vs. app)
and default to static-html for the simplest ask.
| Template | Reach for it when… | Tier | Build |
|---|---|---|---|
static-html | A landing page, a few hand-made pages, "just put this HTML up". No toolchain. | static | none |
astro | A content site, blog, docs, or marketing page that should be fast and mostly static. | SSG | astro build |
react-vite | An interactive single-page app / dashboard with client-side routing. | SPA | vite build |
eleventy | A data/Markdown-driven site (blog, docs) where content is files + structured data. | data SSG | eleventy |
jekyll | The user wants the GitHub-native path, or is migrating an existing Jekyll site. | native | Jekyll |
skills-catalog | A browsable catalog for a repository of Copilot skills, especially when composing create-skills-repo. | catalog | registry-defined |
spectator | A technical specification, RFC, architecture proposal, design proposal, engineering decision, or policy proposal built for structured review. | SSG | vitepress build docs |
The built-in registry pin must include the selected template. A custom registry
requires an explicit --registry-ref, and a local checkout uses
--templates-dir.
These seven cover the static / SSG / SPA / data / native / catalog / specification quadrants. For richer themes, point the user at upstream galleries (astro.build/themes, jamstackthemes.dev, github.com/topics/github-pages-template) and adapt - don't try to hand-build a theme from scratch.
A GitHub project site is served from a subpath:
https://<user>.github.io/<repo>/. A site built assuming root (/) ships with
broken CSS, images, and links the moment it's a project site - assets 404 and the
page looks blank. A user/org site (<user>.github.io repo) is served from
/, so it must NOT carry a subpath prefix.
Each framework fixes this differently. The generator handles all of it from the repo name; you rarely set it by hand:
| Template | Mechanism | Project value | User-site value |
|---|---|---|---|
static-html | relative URLs (./assets/...) | - (immune) | - (immune) |
astro | base in astro.config.mjs | /repo/ | / |
react-vite | base in vite.config.js + basename + 404.html | /repo/ | / |
eleventy | pathPrefix via PATH_PREFIX env + url filter | /repo/ | / |
jekyll | baseurl in _config.yml + relative_url | /repo (no slash) | "" (empty) |
spectator | base in spectator.config.ts and VitePress config | /repo/ | / |
The generator detects the <user>.github.io user-site pattern and uses /
automatically. If the user hasn't named the repo yet, scaffold with the repo
they intend; if they truly don't know, use --base / and tell them to re-run (or
edit the base) once the repo exists.
Every template deploys via the GitHub Actions Pages source, not from a branch. Every external action reference must use a full commit SHA.
static-html, react-vite, eleventy use that chain directly.astro uses the official withastro/action@v6 (it builds + produces the Pages
artifact) then actions/deploy-pages@v5.jekyll uses GitHub's official actions/jekyll-build-pages@v1 then deploy-pages.Every workflow limits top-level permissions to contents: read, grants Pages and
identity-token access only to the jobs that need them, uses one Pages concurrency
group, and deploys through the github-pages environment. There is no
gh-pages branch to manage.
Action versions deprecate aggressively. Update the template registry to a reviewed action commit, then bump this skill's immutable default registry commit.
This skill produces a real repo with a live deploy pipeline, so getting the inputs
right matters more than speed. Do not stamp anything until you know (a) which
template and (b) the target repo (or an explicit base path). If the prompt is bare
("make me a GitHub Pages site") or names no framework/repo, interview the user - ask
only for what's missing, one focused question at a time, using the ask_user tool:
What kind of site? Map the answer to a template:
static-htmlastro (or eleventy if
they say Markdown- or data-driven, or jekyll if they want the GitHub-native
path or are migrating an existing Jekyll site)react-viteskills-catalogspectatorIf they're unsure, ask the single discriminating question - content site or
interactive app? - and default to static-html for the simplest ask.
Which repo? Assume the current repo by default. The site is for the repo in
context unless the user says otherwise - don't ask "current or new." Detect the
current repo from git (git remote get-url origin, parsed to owner/name); the
generator does the same automatically when you omit --repo. The repo drives the
base path, so you must resolve it before stamping:
/blog/") and proceed; no
question needed.origin → then ask for the owner/name,
and whether it's an existing repo or a new one to create.<user>.github.io (base /);
otherwise it's a project site (base /repo/).Title? Optional - default to the repo name; never block on it.
You usually don't need to ask "what should the site say?" - the content comes from
the repo (you digest it after stamping; see "Digest the repo, then author it").
When the target repo is the current/an existing one, run digest-repo.mjs early to
confirm the type and let it inform the template choice (e.g. a cli repo is a great
fit for astro or static-html with a command reference). If the repo is empty or
brand-new, fall back to asking what the site should cover.
Skip any question the prompt already answered: "an Astro blog for octocat/blog"
needs no interview (template astro, repo octocat/blog). For a bare "put this on
Pages" inside a repo, assume the current repo and ask only for the template. Ask
only for the gaps. When you inferred rather than were told, confirm in one line
before scaffolding - e.g. "Astro site → octocat/blog (current repo), base /blog/ -
go?"
The user's current working directory is the destination workspace. A repo slug
such as octocat/blog determines the Pages base path and URLs; it does not mean the
site belongs in /tmp/blog, a sibling directory, or the skill's own directory.
--dir . --force, even when it is not a git checkout and the prompt supplies the
repo slug explicitly.cd into the skill directory to run the generator. Invoke
scripts/new-site.mjs by its absolute path while keeping the workspace as the
process working directory.--staging-dir instead of
--dir. The staging directory is isolated and the consumer owns the final merge..github/workflows files exist under the original working directory.ask_user. You
MUST end up with a chosen template and a target repo (or explicit --base) before
stamping. Default the target to the current repo (detect it from
git remote get-url origin); only ask when there's no git context or the user
wants a different/new repo.--dir .
--force to write in place. Reconcile an existing deploy.yml rather than
blindly overwriting it.gh repo create <name> --public),
stamp into it, and push. Match the repo name you used for the base path.IMAGES.md, and prompt the user for the real images
(they can paste screenshots straight into the chat). Never skip to enabling Pages
on the demo content.gh api -X POST repos/<owner>/<repo>/pages -f build_type=workflow (or PUT to
update). After the first push to main, the workflow runs and the live URL
appears in the Actions run summary and under Settings → Pages.homepage; point it at the site URL the generator prints:
gh repo edit <owner>/<repo> --homepage <site-url> (or
gh api -X PATCH repos/<owner>/<repo> -f homepage=<site-url>). Offer to set the
exact URL, or let the user supply a custom domain instead. There's no separate
"use Pages" boolean - setting homepage to the Pages URL is the checkbox.node scripts/new-site.mjs <template> --repo <owner/name> [options]
| Option | Purpose |
|---|---|
--repo <owner/name> | Target repo. Derives the base path + URLs (and detects user sites). Defaults to the current repo's origin remote when omitted. |
--base </path/> | Override the base path (e.g. / for a user site or local preview). |
--dir <path> | Output directory (default: ./<repo-name>). |
--site-name "Title" | Human title (default: derived from the repo name). |
--description "Text" | Catalog description (default: derived from the title and repo). |
--author "Name" | Catalog author (default: repo owner). |
--package-name <id> | Package identifier (default: repo name). |
--marketplace-id <id> | Marketplace identifier (default: owner and repo). |
--default-branch <id> | Repository default branch used by catalog links and deployment triggers (default: main). |
--registry <owner/repo> | Template registry repo to fetch from (default: jongio/gh-pages-templates; needs git + network). |
--registry-ref <sha> | Full 40-character commit SHA. Required with a custom registry. Branches and tags are rejected. |
--templates-dir <path> | Use a local templates/ folder instead of fetching (offline). |
--staging-dir <path> | Write a validated tree to a new path without applying it to a target. |
--force | Write into a non-empty directory. |
--json | Emit a machine-readable result for composition. |
--list | List available templates. |
Templates are not bundled in the skill. The generator fetches the built-in
jongio/gh-pages-templates registry at a reviewed, immutable commit. A custom
registry requires --registry-ref <full-sha>. Pass --templates-dir <path> to
scaffold from a local copy offline.
Examples:
# Run from the target workspace; SKILL_DIR is this skill's absolute directory.
# Scaffold in place for the current repo (base inferred from its origin remote):
node "$SKILL_DIR/scripts/new-site.mjs" astro --dir . --force
# The workspace is an existing project without git metadata; the slug only supplies
# deployment identity and the base path. Output still goes into the workspace:
node "$SKILL_DIR/scripts/new-site.mjs" astro --repo octocat/blog --dir . --force
# Create a subfolder only when the user explicitly requested one:
node "$SKILL_DIR/scripts/new-site.mjs" react-vite --repo octocat/dashboard --dir ./site
# A user site (served from "/") or a quick local scaffold:
node "$SKILL_DIR/scripts/new-site.mjs" static-html --base / --dir . --force
# Safely compose a skills catalog without touching the consumer's target:
node "$SKILL_DIR/scripts/new-site.mjs" skills-catalog \
--repo octocat/skills \
--templates-dir ../gh-pages-templates/templates \
--staging-dir ./.site-staging \
--json
The generator replaces the shared base and repository sentinels plus the catalog
sentinels __SITE_DESCRIPTION__, __REPO_OWNER__, __REPO_NAME__,
__AUTHOR_NAME__, and __MARKETPLACE_ID__. Injection is deterministic and the
result has no placeholders left. After stamping you may hand-edit content freely.
Metadata values must be plain context-safe text. Markup, control characters, and
characters that can break JSON, YAML, JavaScript, or HTML attributes are rejected.
Use --staging-dir whenever create-skills-repo or another tool will merge the
site into a larger output. The path must not exist and the option cannot be
combined with --dir or --force. The generator performs replacement and all
validation inside staging, returns only after success, and never touches the final
target. The consumer must check every destination conflict before copying staged
files.
Before either staging success or normal apply, the generator:
__SENTINEL__ placeholders;.github/workflows/*.yml and .yaml for excess permissions, unsafe
triggers, non-SHA action references, persisted checkout credentials,
lifecycle-capable installs without script suppression, and direct GitHub
context interpolation in shell commands.Normal --dir generation uses a private staging directory and applies only after
all checks pass. This preserves existing template and --force behavior while
ensuring an invalid template cannot partially modify the target.
The exact pinned built-in snapshot has a compatibility normalization for its five legacy templates. It upgrades their known action tags to reviewed commit SHAs, disables persisted checkout credentials and lifecycle scripts, and then validates the result. Never apply this normalization to a custom registry.
node scripts/digest-repo.mjs --dir <path-to-repo> --json
It returns deterministic signals you build from: name, description (the pitch),
repoSlug, license, a type classification (cli | library | app |
action | collection | docs | site) with the reasons behind it, suggested
install commands, README usageExamples (code fences), badges, docFiles,
existing images (with role hints like logo/hero/screenshot), languages,
and subProjects (for monorepos/collections). Read the repo's README and key docs
yourself too - the digest points you at them; it doesn't replace judgment.
| Type | Tell-tale signals | Author the site around… |
|---|---|---|
cli | bin, console_scripts, [[bin]], --help in README | Install + Quickstart, then a command/flag reference (a section or page per command), copy-paste examples, config/exit codes. Hero = terminal demo. |
library | main/exports, [lib], import examples | Install, an import + usage snippet, an API reference (exported functions/types from the README/docs), examples, badges. Hero = a concept diagram. |
app | web-framework dep, index.html, src/ | A feature tour with screenshots, a "Get started"/live-demo CTA. Hero = an app screenshot. |
action | action.yml | A uses: snippet, an inputs/outputs table, an example workflow. |
collection | plugin.json/marketplace.json + skills/, workspaces, packages/ | A catalog: one card/detail per subProject (its pitch + install), plus a top-level install for the whole thing. Hero = a banner; per-item thumbnails. |
docs | many Markdown docs, little code | A docs nav + content, pulling the existing Markdown in. |
site / unknown | none of the above | A clean landing built from the repo's pitch and links. If the shape is unclear, ask the user what sections they want. |
description as the
title/tagline, the install commands verbatim, the README usageExamples as
real code blocks, badges, license, and links to the repo and each
subProject. Don't invent features, commands, or APIs you can't see in the
repo - if something's unclear, leave a visible TODO for the user rather than
fabricate.commands/ or catalog/ section) instead of
forcing everything into the demo "blog". Keep the GitHub source link and the
base-path-aware internal links the template already wires - never hand-write
absolute /... links (use the template's base helper, or it breaks on a project
site).Real sites need art the agent can't produce. Drop in obvious placeholders plus a checklist so the user knows exactly what to provide:
node scripts/make-placeholder.mjs --out <site>/<images-dir> --preset <type> --repo owner/name
--preset is the repo type (cli/library/app/collection/site). It writes
labeled SVG placeholders (logo, social card, favicon, hero, and type-specific
shots) and an IMAGES.md manifest listing each file's purpose and recommended
dimensions. Then:
docs/*.png), use it instead of a placeholder.astro, react-vite → public/images/ (served at ${BASE_URL}images/…)spectator → docs/public/images/ (VitePress applies its configured base)static-html → assets/images/ (relative ./assets/images/…)eleventy → src/assets/images/ (through the url filter)jekyll → assets/images/ (via relative_url)IMAGES.md in the images dir as the hand-off, and tell the user it's
there. A placeholder still deploys fine; it just visibly says "replace me".After authoring, ask only for images the site references. Give each role, filename,
and recommended dimensions; accept pasted images, file paths, or URLs. Keep
unprovided placeholders, update IMAGES.md, and do not block deployment.
digest-repo.mjs discovers source material; make-placeholder.mjs creates the
placeholder set and handoff manifest.
index.html, about.html, 404.html, assets/, and a .nojekyll.site = origin, base = /repo/. Internal links use
import.meta.env.BASE_URL. public/ is copied verbatim. Node 24 in CI by default.base in vite.config.js; React Router basename derived from
BASE_URL; copy-404.mjs (a postbuild hook) copies index.html → 404.html
so deep-link refreshes work on Pages. Reference public assets as /asset so Vite
rewrites them with the base.pathPrefix comes from the PATH_PREFIX env the workflow sets;
every link/asset uses the url filter. Posts live in src/posts/, listed via
collections.posts. Locally it serves at /.baseurl (no trailing slash) in _config.yml; links use
relative_url. Built in CI by jekyll-build-pages (honors the Gemfile). Local
dev needs Ruby + Bundler; CI does not.base from spectator.config.ts. Content is
free-form Markdown under docs/; navigation is explicit in the shared config.
Preserve local search, page outlines, light/dark appearance, plain-language
callouts, page feedback, selected-text feedback, and GitHub edit links. Run
npm test, npm run build, and npm run test:e2e.For a custom domain: add a CNAME file (at the served root for static/Jekyll;
public/CNAME for Astro), set DNS at the registrar, and in Astro set site to
the domain and drop base. Explain DNS steps rather than automating them.
Templates live in jongio/gh-pages-templates
(live gallery at https://jongio.github.io/gh-pages-templates/); template
changes and action version updates land there rather than in this skill.
TODO when uncertain).--registry-ref is supplied; reject branches, tags, symlinks, unresolved __SENTINEL__ tokens, and unpinned or over-privileged workflow steps.--staging-dir and check destination conflicts before merging.gh repo create), changing GitHub Pages settings (gh api .../pages), editing repository metadata (gh repo edit --homepage), or pushing branches.__...__ sentinels remain; image placeholders and IMAGES.md are present and surfaced to the user.astro/react-vite/eleventy/spectator, npm ci --ignore-scripts --no-audit --no-fund and npm run build exit 0 (bundle exec jekyll build for Jekyll when Ruby is present)./<repo>/... on project sites and / on <user>.github.io user sites; deployed page_url and SPA 404.html sub-route fallback resolve cleanly, and actions/upload-pages-artifact + actions/deploy-pages are used (never gh-pages branches or peaceiris/actions-gh-pages).CONTRIBUTING.md (opens in a new tab)LICENSE (opens in a new tab)README.md (opens in a new tab)evals/README.md (opens in a new tab)evals/create-gh-pages-site/eval.yaml (opens in a new tab)evals/create-gh-pages-site/fixtures/astro-cli/README.md (opens in a new tab)evals/create-gh-pages-site/fixtures/astro-cli/package.json (opens in a new tab)evals/create-gh-pages-site/fixtures/skills-catalog/deploy.yml (opens in a new tab)evals/create-gh-pages-site/fixtures/skills-catalog/index.html (opens in a new tab)evals/create-gh-pages-site/fixtures/skills-catalog/template.json (opens in a new tab)evals/create-gh-pages-site/fixtures/skills-repo/README.md (opens in a new tab)evals/create-gh-pages-site/fixtures/skills-repo/alpha-skill.md (opens in a new tab)evals/create-gh-pages-site/fixtures/skills-repo/do-not-overwrite.txt (opens in a new tab)evals/create-gh-pages-site/fixtures/spectator-repo/README.md (opens in a new tab)evals/create-gh-pages-site/fixtures/spectator-repo/proposal-notes.md (opens in a new tab)evals/create-gh-pages-site/fixtures/spectator/docs/index.md (opens in a new tab)evals/create-gh-pages-site/fixtures/spectator/docs/proposal.md (opens in a new tab)evals/create-gh-pages-site/fixtures/spectator/docs/system-shape.md (opens in a new tab)evals/create-gh-pages-site/fixtures/spectator/package.json (opens in a new tab)evals/create-gh-pages-site/fixtures/spectator/spectator.config.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
28 skills in this plugin
/backlog-groom**WORKFLOW SKILL** - Groom GitHub backlogs across issue and source repositories, with or without Projects, using scoped evidence and approved changes. USE FOR: backlog-groom, groom backlog, triage GitHub issues, reconcile backlog, organize GitHub Project, audit delivery readiness. DO NOT USE FOR: implementing issues (use go), PR delivery (use pr), creating skills (use create-skill), dependency maintenance (use deps-doctor), Git cleanup (use git-tidy)./ci-doctor**WORKFLOW SKILL** - Diagnose, check, and optimize GitHub Actions workflows with stateless ETag-cached checkups, main failure root-cause repair in isolated worktrees, and workflow cost/security hardening. USE FOR: ci-doctor, ci health check, diagnose main CI failures, repair broken GitHub Actions builds, profile slow CI steps, harvest workflow flakes, harden and optimize GitHub Actions workflows. DO NOT USE FOR: single pull request delivery without workflow diagnosis (use pr), implementing a feature issue end to end (use go), standalone test suite audits without GitHub Actions checks (use test-doctor)./create-canvas-appBuild a GitHub Copilot App canvas extension the right way, fast. Use when the user wants to create, scaffold, or improve an interactive canvas (a side-panel UI the agent can open and drive) - dashboards, editors, trackers, boards, document/preview surfaces. Provides a no-build Preact + htm kit with live SSE state, durable per-user storage, Primer theming, and the official GitHub Lucide icon set, plus a generator that stamps a working canvas in one command. Do NOT use for non-canvas extensions (plain agent tools) or for shipping web apps unrelated to Copilot canvases.npx claudepluginhub jongio/skills --plugin jongio-skillsOther plugins' skills for the same job