agentleFS
aideploytutoraideploytutor/skill-deploy-share/skills/domain-setup/SKILL.md

domain-setup

Skill2 starsChanged 35 days agoMITView on GitHub

Point the user's own domain (or a subdomain like shop.example.com) at their Vercel site with automatic HTTPS, at any registrar (Cloudflare, Namecheap, GoDaddy, Aliyun...), then verify it. Use when the user says "connect my domain", "use my own URL", or a later skill (email-send) requires a domain.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer .com. Avoid odd TLDs that some email providers treat as spam.

    line 22
  2. Distinctive:

    Before changing anything, look up what the domain points to now:

    line 32
  3. Distinctive:

    If the root already serves something, don't touch the root.

    line 38
  4. Distinctive:

    Delete any old A/AAAA/CNAME records for the same host only with the user's OK.

    line 65
  5. Very specific:

    Add NEXT_PUBLIC_SITE_URL=https://<domain> in Vercel → Settings → Environment Variables (Production).

    line 88

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

domain-setup

Goal: the site opens at the user's own address with the padlock (HTTPS). A domain is also what episode 005 (email-send) needs to send email to anyone. Follow ../../STACK.md.

Buying a domain, signing in to the registrar, and saving DNS changes are the user's actions or need their explicit OK. You can prepare everything and fill in forms once they say yes. Never ask for the registrar password.

0. No domain yet? Help them buy wisely

  • Recommend Cloudflare Registrar. It sells at cost, and renewal costs the same as the first year (.com was $10.46/yr when checked on 2026-10-14). Check the current price before quoting it.
  • Warn about the classic trap: a cheap first year with an expensive renewal. Always look at the renewal price.
  • Prefer .com. Avoid odd TLDs that some email providers treat as spam.
  • The user buys it themselves.

1. Decide which address

SituationUse
New domain, this is the main productwww.example.com, with example.com redirecting to it (Vercel's recommendation)
Domain already runs another sitea subdomain such as shop.example.com, which leaves the existing site untouched

Before changing anything, look up what the domain points to now:

node <skill-dir>/scripts/check.mjs --domain example.com

If the root already serves something, don't touch the root. Use a subdomain.

2. Add the domain in Vercel

Go to Vercel → project → Settings → Domains → Add, and enter the domain. For a root domain, accept Vercel's offer to add www and redirect.

Vercel then shows the record(s) to create:

  • a root domain uses an A record
  • a subdomain uses a CNAME record

Copy the values from the project's Domains page in the dashboard, not from the API or an old tutorial. In testing, the API suggested the legacy cname.vercel-dns.com, while the Domains page showed "DNS Change Recommended" with a project-specific xxxx.vercel-dns-017.com. Legacy values still work, but use the recommended one. They differ between projects, for example 76.76.21.21 or 216.198.79.1 for A records, and cname.vercel-dns.com or xxxx.vercel-dns-017.com for CNAMEs.

3. Create the record at the DNS provider (user's OK required)

Show the user exactly what will be added:

TypeHostValue
CNAMEshop (or www)the value from Vercel
A@ (root)the value from Vercel

Then follow the instructions for their DNS provider:

  • Namecheap: Domain List → Manage → Advanced DNS → Add New Record.
  • Cloudflare: DNS → Records → Add record. Set Proxy status to DNS only (grey cloud). Vercel does not recommend a proxy in front of it; the orange cloud is the #1 cause of "too many redirects" and certificate errors.
  • Aliyun / Tencent Cloud / GoDaddy: the same record, added in their DNS console.

Delete any old A/AAAA/CNAME records for the same host only with the user's OK. Never delete MX or TXT records, because those are their email and verifications.

4. Verify (DNS can take a few minutes)

node <skill-dir>/scripts/check.mjs --domain shop.example.com --wait 600
# root domain + www:
node <skill-dir>/scripts/check.mjs --domain example.com --www --wait 600
Problem codeMeaning
no-dnsThe record isn't visible yet, or the Host was typed wrong
cloudflare-proxyThe orange cloud is on; turn it grey
not-vercelThe record points to an old host
vercel-404The domain wasn't added to the project in Vercel
cert-pendingVercel is still issuing the certificate; wait
caaA CAA record blocks Let's Encrypt; add 0 issue "letsencrypt.org"

Exit code 0 means everything is fine. Exit code 2 means not ready, with a fix printed for each problem.

5. Tell the project its address

Add NEXT_PUBLIC_SITE_URL=https://<domain> in Vercel → Settings → Environment Variables (Production). It isn't a secret. Then record it in the project:

node <skill-dir>/scripts/apply.mjs --dir "<project>" --domain "<domain>"

This writes stack.json → domain, documents NEXT_PUBLIC_SITE_URL in .env.example, and makes a git save point. Push, so the next deploy uses it.

Tell the user (short)

"Your site is now at https://<domain> with HTTPS, renewed automatically." Then add two notes:

  • Mainland China: Vercel says .vercel.app addresses can be blocked or slow there, and a custom domain is the first recommended step. It helps, but nothing guarantees access in China.
  • Next: email-send (episode 005) uses this domain so emails reach everyone and don't land in spam.

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.