agentleFS
ZmokiZmoki/zmoki-astro-starter/.claude/skills/redirects/SKILL.md

redirects

Skill4 starsChanged 20 days agoMITView on GitHub

Add or edit URL redirects. Use when the user wants to redirect a legacy/old URL, moved page, or external link — anything that should return a 301/302 on the site's host (Cloudflare, Netlify, Vercel, or Amplify).

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. Anglesite/anglesite-skills★ 15same name
    2. carlosuhart/seo-audit-skills★ 6same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill 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
  1. Distinctive:

    After switching platforms, the build warns about the previous platform's artifact.

    line 21
  2. Distinctive:

    Commit the CSV and the regenerated artifact together.

    line 45
  3. Very specific:

    Use 301 for permanent moves (passes SEO signal) and 302 only for provisional ones.

    line 49
  4. Distinctive:

    Don't add redirects at the CDN/DNS layer (e.g.

    line 51

≈ “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

Redirects

Redirects are written once as platform-neutral CSV and compiled into the host's format.

  • Source: src/redirects/*.csv, one file per group (blog.csv, other.csv, …). Add files freely; they merge in filename order.
  • Builder: scripts/generate-redirects.ts, run by npm run build:redirects and automatically before npm run build (prebuild).
  • Output: chosen by platform.deploy in src/site.config.ts. Generated; never edit it by hand.
platformGenerated artifactFormat
"cloudflare" (default)public/_redirects/old /new 301
"netlify"public/_redirectssame _redirects format
"vercel"vercel.jsonredirects[] merged in ({source,destination,statusCode})
"amplify"redirects.json[{source,target,status}]; paste into console / IaC
  • Vercel accepts 3xx only. A 200 row is skipped with a warning; configure rewrites separately on Vercel.
  • After switching platforms, the build warns about the previous platform's artifact. Delete it.

CSV format

Columns source,destination,code, one redirect per row:

source,destination,code
/feed/old-slug/,/blog/1-new-slug/,301
/resources/something/,https://external.example.com/,302
/legacy/,/blog/,
  • source: the incoming path. Required.
  • destination: a site path or a full external URL. Required.
  • code: optional, default 301. Allowed: 200, 301, 302, 303, 307, 308.
  • Lines starting with # and blank lines are ignored.

Blog-post moves go in blog.csv; resources, external links and one-offs in other.csv. Or create a new group file.

Add a redirect

  1. Edit or add a CSV under src/redirects/.
  2. Run npm run build:redirects.
  3. Commit the CSV and the regenerated artifact together.

The artifact is committed so redirect changes show in PR diffs (and Vercel reads vercel.json from the repo). CI's npm run check:redirects regenerates it and fails if it differs from what's committed.

Use 301 for permanent moves (passes SEO signal) and 302 only for provisional ones. URLs on this site end in /; match the real path.

Don't add redirects at the CDN/DNS layer (e.g. Terraform-managed zone rules) or in the generated artifact. Author them here.

Validation and limits

An invalid code or a row missing source/destination fails the build with a line-numbered error (e.g. blog.csv:2: invalid code "999").

The build warns at 90% of the host's redirect cap and fails once it's exceeded:

platformCapBeyond the cap
cloudflare2,100 (2,000 static + 100 dynamic)Cloudflare Bulk Redirects (rules past the cap are dropped silently)
vercel1,024 (shared with rewrites + headers)Edge Middleware + Edge Config
netlifyno hard count (file-size bound)wildcards/placeholders; Edge Functions past ~10k
amplifyno documented quota—

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.