agentleFS
gabrielSantosLimagabrielSantosLima/harness/skills/github-pages/SKILL.md

GitHub Pages

Skill1 starsChanged 8 days agoMITView on GitHub

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.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 15 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask a single-selection question:

    line 25
  2. Distinctive:

    If the answer is 4 and the repository has no documentation generator, ask a second question:

    line 33
  3. Distinctive:

    use a generator the user already chose.

    line 36
  4. Distinctive:

    add a minimal dependency-free Markdown builder.

    line 37
  5. Distinctive:

    stop and let the user decide later.

    line 38
  6. Distinctive:

    Never add a framework or dependencies silently.

    line 40
  7. Distinctive:

    Prefer relative URLs in HTML, CSS and JavaScript.

    line 54
  8. Very specific:

    If a generator needs a base path, configure it for /<repo>/.

    line 55
  9. Very specific:

    Do not hardcode localhost or the domain root.

    line 56
  10. Very specific:

    Create .github/workflows/pages.yml.

    line 60
  11. Distinctive:

    Remove the build step when there is no build command.

    line 104
  12. Very specific:

    Root deployment: prefer a dedicated folder over ., so the artifact does not include the repository, workflows or secrets-adjacent files.

    line 112
  13. Distinctive:

    Existing workflow: if one already deploys Pages, diff it and ask before replacing it.

    line 114
  14. Distinctive:

    No secret or local environment file is inside the artifact.

    line 123
  15. Distinctive:

    Do not commit, push or tag unless the user asks.

    line 135
  16. Distinctive:

    Never add a framework or dependency without explicit approval.

    line 139
  17. Distinctive:

    Never overwrite an existing Pages workflow without approval.

    line 140
  18. Distinctive:

    Never store secrets in the workflow.

    line 141
  19. Distinctive:

    Never change application code beyond the minimum required to build the site.

    line 142

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Pages

Set up a GitHub Pages deployment for a static site. Ask before choosing what to publish; never assume the repository already has a site.

1. Inspect the repository

Look for:

  • index.html, 404.html;
  • folders such as docs/, public/, site/, dist/, build/;
  • build manifests and scripts (package.json, Makefile, pyproject.toml, ...);
  • existing workflows under .github/workflows/;
  • an existing Pages deployment or CNAME.

Report what you found before asking.

2. Ask what to publish

Ask a single-selection question:

  1. Existing static site already committed (HTML/CSS/JS at the repository root or in a folder).
  2. A static folder such as docs/, public/ or site/.
  3. A build command that produces a directory, such as a site generator.
  4. Generate documentation from Markdown or another source.

If the answer is 4 and the repository has no documentation generator, ask a second question:

  • use a generator the user already chose;
  • add a minimal dependency-free Markdown builder;
  • stop and let the user decide later.

Never add a framework or dependencies silently.

3. Ask deployment details

  • Branch to deploy from (default: the default branch).
  • Trigger: on push to that branch (default), on release, or manual only.
  • Published directory (PUBLISH_DIR).
  • Build command (BUILD_COMMAND), when any.
  • Whether the site is a single-page app that needs a 404.html fallback.

4. Check the base path

A project site is served from /<repo>/, not from the domain root.

  • Prefer relative URLs in HTML, CSS and JavaScript.
  • If a generator needs a base path, configure it for /<repo>/.
  • Do not hardcode localhost or the domain root.

5. Create the workflow

Create .github/workflows/pages.yml. Adjust names, commands and paths:

name: Pages

on:
  push:
    branches: [main]
  workflow_dispatch:

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

concurrency:
  group: pages
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: |
          <BUILD_COMMAND>
      - uses: actions/configure-pages@v5
      - uses: actions/upload-pages-artifact@v3
        with:
          path: <PUBLISH_DIR>

  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

Remove the build step when there is no build command.

6. Handle common cases

  • Single-page app: copy index.html to 404.html in the build, or use hash routing.
  • Artifact must be a directory: upload-pages-artifact does not accept a single file. Stage the site into one directory if needed.
  • Root deployment: prefer a dedicated folder over ., so the artifact does not include the repository, workflows or secrets-adjacent files.
  • Existing workflow: if one already deploys Pages, diff it and ask before replacing it.

7. Verify

  • The build command succeeds locally, when one exists.
  • PUBLISH_DIR exists after the build.
  • index.html exists in the artifact.
  • Internal assets use relative URLs or the correct base path.
  • No secret or local environment file is inside the artifact.

8. Hand off

Tell the user to set Settings → Pages → Source to GitHub Actions. Report:

  • the workflow file;
  • the trigger and branch;
  • the published directory;
  • the expected URL: https://<owner>.github.io/<repo>/;
  • anything that must be adjusted in the site's build.

Do not commit, push or tag unless the user asks.

Boundaries

  • Never add a framework or dependency without explicit approval.
  • Never overwrite an existing Pages workflow without approval.
  • Never store secrets in the workflow.
  • Never change application code beyond the minimum required to build the site.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.