medium-to-ssg-skill
Copilot instructions0 starsChanged 6 months agoMITView on GitHub
This repo is not an application — it is a collection of agent skills: structured Markdown instructions (plus a few helper scripts) that teach an AI coding agent how to migrate a Medium blog to a self-hosted static site built with Hugo (the default), Eleventy, or Astro. When reviewing, evaluate the docs as instructions an AI agent will follow end to end, not as prose. The reader is a machine that will execute every branch literally, so gaps, contradictions, and…
In this repository2 other files it gives its agents.
- medium-publication-exportSkill
- medium-to-ssgSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 12
When reviewing, evaluate the docs as instructions an AI agent will follow end to end, not as prose.
- Very specific: line 41
No secrets, tokens, or credentials committed.
- Distinctive: line 51
Rule of thumb: if a PR changes a tested function's output, the matching test should change with it.
- Distinctive: line 57
Use relative links between skill docs.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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.
Files
Copilot instructions for this repository
What this repository is
This repo is not an application — it is a collection of agent skills: structured Markdown instructions (plus a few helper scripts) that teach an AI coding agent how to migrate a Medium blog to a self-hosted static site built with Hugo (the default), Eleventy, or Astro.
.agents/skills/medium-to-ssg/— migrate a Medium export → Hugo, Eleventy, or Astro site on AWS or GitHub Pages..agents/skills/medium-publication-export/— scrape a multi-author publication → a Medium-export-compatible ZIP that feeds the skill above.- Each skill has a
SKILL.md(entry point, with YAML frontmatter) andreferences/*.md(phase-by-phase deep guidance the agent reads on demand). tools/lint_skills.pyis a zero-dependency structural linter run in CI.
When reviewing, evaluate the docs as instructions an AI agent will follow end to end, not as prose. The reader is a machine that will execute every branch literally, so gaps, contradictions, and dead ends are bugs.
When reviewing a pull request, prioritize these checks
1. Branching-path consistency (most important)
The skills offer several either/or choices. A change to one branch usually requires matching updates elsewhere, and an agent following any single path must never hit a dead end, a missing file, or guidance meant for a different branch. For every PR, trace each path end to end and confirm it stays internally consistent:
- Static site generator (SSG): Hugo (default) vs Eleventy vs Astro. The converter (
convert_medium.pyvia itsSSGsetting) and every hosting/deploy reference branch on this — front matter, build command (hugo --minifyvsnpx @11ty/eleventyvsnpm run build), and output directory (public/vs_site/vsdist/) all differ. A change to one SSG's setup usually needs the matching update on the others (seereferences/hugo-setup.mdvsreferences/eleventy-setup.mdvsreferences/astro-setup.md). Note the three differ in how old-URL redirects are produced (Hugoaliasesbuilt in; Eleventy redirects collection+template; Astro catch-all redirect route) and that Astro additionally needs a Node version read from the starter'senginesfield and a relaxed content-collection schema. - Hosting platform: AWS (S3 + CloudFront) vs GitHub Pages.
- AWS infrastructure method: Terraform vs AWS CLI shell scripts (both must create the same resources).
- Terraform state backend: local (default — no
terraform.ymlCI workflow is generated) vs remote S3/HCP (aterraform.ymlworkflow is generated). Watch for instructions that assume one but apply to the other. - Content deployment: GitHub Actions vs manual deploy script.
- Content source: a personal Medium "Download your information" export vs the
medium-publication-exportZIP. - DNS provider: Route 53 vs an external registrar (Namecheap, Cloudflare, etc.).
Flag anything where: one branch was updated but its counterpart wasn't; SKILL.md and a references/*.md now disagree; a step references a file, variable, or phase that only exists on a different path; or the migration-status.md input options no longer match the steps that consume them.
2. SKILL.md and references stay in sync
SKILL.md summarizes; references/*.md give the detail. If a PR changes one, confirm the other still agrees (phase names, ordering, input names, defaults). Frontmatter name must equal the skill's directory name, and description should stay trigger-focused and roughly under 1024 characters.
3. Don't introduce guessed or fabricated specifics
Flag any hard-coded real-world values that should be placeholders: GitHub repo slugs, domains, AWS account IDs, emails, or URLs the contributor can't actually know. Examples should use obvious placeholders (example.com, username/repo, OWNER/REPO). Verify external links are real and resolve.
4. Security and supply-chain hygiene
- GitHub Actions must be pinned to a full commit SHA with a
# vX.Y.Zcomment — the skills preach this, so the repo must practice it. - No secrets, tokens, or credentials committed; Actions should use repository secrets and least-privilege
permissions:. - Helper scripts should prefer the standard library (
convert_medium.pyneedsbeautifulsoup4;scrape_publication.pyalso needsrequests); scrutinize any new dependency. - The scraper must stay respectful (rate-limited, no auth bypass) and only target content the user owns/controls.
5. Tests for the Python helpers (and when not to ask for one)
The two helper scripts have a stdlib unittest suite under tests/ (no pytest), run in CI. It is deliberately regression-focused, not coverage-driven — do not ask contributors to add a test for every change. Apply this philosophy when reviewing:
- Worth a test: a change to the behavior of a pure function in the helpers — the HTML→Markdown conversion (
node_to_mdand friends), front-matter assembly (convert_post), metadata/date/tag extraction, URL/slug normalization, and the export-HTML format the converter consumes. Every past bug fix in these areas should gain one focused test that pins the corrected behavior, so it can't silently regress. - Not worth a test (don't request one): changes to the Markdown skill instructions (
SKILL.md,references/*.md), CI/workflow/config edits, dependency-pin bumps, docstring/comment-only changes, and anything in the network/filesystem layer —fetch,make_session, the sitemap crawl, and file/ZIP output. Those are I/O glue around the tested core; mocking them would test the mock, not the migration. The skill docs themselves are validated bylint_skills.pyand markdownlint, not unit tests. - Rule of thumb: if a PR changes a tested function's output, the matching test should change with it. If a PR only touches docs, CI, or I/O plumbing, a missing test is not a defect — don't flag it.
- Tests must stay fast and network-free (no live HTTP); the converter tests disable image downloads and the scraper tests feed in small inline HTML fixtures.
6. House style and the local checks
- Markdown is not hard-wrapped — one line per paragraph. Don't request reflowing to a column width.
- Use relative links between skill docs; the linter verifies they resolve.
- A valid PR keeps all four CI checks green:
python3 tools/lint_skills.pynpx --yes markdownlint-cli2@0.22.1 "**/*.md"python3 -m py_compileon the Python helpers.python3 -m unittest discover -s tests
Review style
Keep PRs focused and reversible. Prefer concise, actionable comments that point to the specific file/line and explain the user-facing consequence (e.g. "an agent on the GitHub Pages path would now be told to run Terraform"). If a change looks correct and consistent across all branches, say so rather than inventing nitpicks.
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
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.

