agentleFS
swyxioswyxio/skills/diy-netlify/SKILL.md

diy-netlify

Skill171 starsChanged 8 months agoMITView on GitHub

Build or audit an isolated Netlify/Vercel-style pull-request preview workflow using GitHub Actions and the project's existing hosting provider. Use when eligible PRs need separate live preview environments, stable and immutable URLs, GitHub reporting, affected-target builds, and safe fork handling. Do not use for production-bound staged versions, artifact promotion or reuse, or generalized release-platform design.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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:

    Create or update one concise PR comment with target, URL, source SHA, and status.

    line 24
  2. Very specific:

    Add noindex when the hosting layer does not already provide it.

    line 28
  3. Distinctive:

    Treat source checks, preview deployment, merged source, production deployment, traffic, and live behavior as separate facts.

    line 40
  4. Distinctive:

    If the requested design intentionally uses production configuration or reuses a staged version for production, this skill no longer applies.

    line 44
  5. Distinctive:

    Start from the repository's existing CI and release authorities.

    line 50
  6. Distinctive:

    Keep production independent: deploy the exact merged SHA through the existing release authority, then verify provider identity and the …

    line 68
  7. Distinctive:

    Use a small visible canary and prove:

    line 75
  8. Distinctive:

    When performance is part of the request, report baseline sample size and median/tail timing alongside the canary result.

    line 84
  9. Distinctive:

    Do not add a deployment dashboard, generalized preview database, branch-environment framework, multi-provider abstraction, or resumable …

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

DIY Netlify

Deliver the reviewer loop people expect from hosted deploy previews without recreating a deployment platform:

Open a PR, wait for the preview link, review it, merge when green, and let the exact merge commit deploy to production.

Preview contract

For each eligible PR:

  1. Detect affected deployable targets conservatively, including shared code and lockfile changes.
  2. Build the intended PR or merge context.
  3. Publish to an environment isolated from production.
  4. Preserve both a stable PR URL and an immutable deployment identity or URL.
  5. Maintain one required GitHub check, including a terminal skipped state.
  6. Create or update one concise PR comment with target, URL, source SHA, and status.
  7. Prevent superseded or stale-head work from replacing a newer preview.

Add noindex when the hosting layer does not already provide it. Add a changed-route entry link only when it can be derived reliably.

Trust boundary

For same-repository PRs, use dedicated preview Workers, projects, namespaces, and preview-safe configuration. Do not give preview code production routes, secrets, data, or service bindings.

Exclude forks unless they have a separately authorized, sandboxed publication path. Never expose protected credentials to untrusted workflow code.

Treat source checks, preview deployment, merged source, production deployment, traffic, and live behavior as separate facts. A successful preview is not production proof.

If the requested design intentionally uses production configuration or reuses a staged version for production, this skill no longer applies. Use the relevant production-release and provider guidance instead.

Implementation

Start from the repository's existing CI and release authorities. Add the smallest affected-target, build, publication, check, and comment changes needed for the preview contract.

Measure current job and step times before optimizing. Optimize demonstrated bottlenecks without weakening tests. Sparse checkout, filtered installs, runner-provided browsers, caching, and tighter timeouts are optional techniques, not required architecture; exercise every affected matrix target after changing checkout or dependency boundaries.

For Cloudflare-backed previews, consider provider-native hot paths before starting Wrangler once per item: direct R2 REST uploads with an existing preview-scoped token or an R2 binding, D1 batches, KV bulk writes, Queue sendBatch(), and direct Workers API readbacks. Use bounded concurrency and retries; preserve immutable identities, publication ordering, and preview-only credentials. Do not add S3 credentials or broaden permissions merely to upload objects.

Keep production independent: deploy the exact merged SHA through the existing release authority, then verify provider identity and the owning live hostname. Pair with cloudflare-production-builder when changing production traffic, bindings, routes, migrations, promotion, or rollback.

Verification

Use a small visible canary and prove:

  1. affected targets were selected correctly;
  2. required source checks passed;
  3. the PR check and comment point to the latest successful preview;
  4. the preview renders on the required browser and viewport surfaces;
  5. merging triggers production for the exact merge SHA; and
  6. provider readback, the public hostname, and production smoke agree.

When performance is part of the request, report baseline sample size and median/tail timing alongside the canary result. Distinguish wall time, runner minutes, reliability, review experience, and production safety.

Do not add a deployment dashboard, generalized preview database, branch-environment framework, multi-provider abstraction, or resumable release controller without a demonstrated product requirement.

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.