deployment-cleanup
Skill2 starsChanged 25 days agoApache-2.0View on GitHub
Use when a site must be cleaned of development, staging, and test artifacts before going live: localhost and staging URLs, preview hostnames, test data and accounts, debug routes, source maps, console noise, placeholder environment values, and mismatches between build modes. It finds them in source, config, and shipped output and repairs the safe ones. Do not use it for penetration testing, for deployment itself, or to modify production infrastructure or environment values.
- Reads credentials
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
- Distinctive: line 18
Before any launch, domain cutover, or move from preview to production.
- Distinctive: line 20
Not to deploy, change DNS, or edit production secrets.
- Very specific: line 38
Domain-move checklist: when switching hosts: canonical/sitemap/OG/host absolutes updated.
- Distinctive: line 62
Test-mode keys in production or live keys exposed (owner action needed).
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.
Files
deployment-cleanup
The site works, but it still thinks it is running on someone's laptop: canonical to localhost:5173, sitemap on staging., NEXT_PUBLIC_API_URL=http://localhost:3001, a test-mode payment key, a /debug route. This skill hunts those leftovers.
Activate when
- Before any launch, domain cutover, or move from preview to production.
discoverability-all/production-allroute here (checks 17, 38).- Not to deploy, change DNS, or edit production secrets.
Inspect
Shipped-output sweep (run against a production build, not dev):
node scripts/scan-secrets.mjs --root . # DEV_URL_IN_SHIPPED_OUTPUT, SOURCEMAP_EXPOSED, DEBUG_ROUTE_PRESENT, secrets node scripts/inspect-metadata.mjs --url <site> --render # localhost/staging in canonical, OG, sitemap, robots, JSON-LD node scripts/check-links.mjs --url <site> --render # LINK_DEV_HOST, placeholder targets, form actionsPaths are relative to this skill's folder.
- Search config and source for:
localhost,127.0.0.1,0.0.0.0,.local,staging,preview,.vercel.app/.netlify.app(ok only if intended),ngrok,example.com,TODO/FIXME/XXXin user-visible strings,console.log/debuggerwith sensitive data,if (process.env.NODE_ENV !== "production")guards that fail open, feature flags defaulting to "on" for admin/debug,NEXT_PUBLIC_*/VITE_*URLs pointing at dev services. - Environment parity: which env vars the code needs (
.env.example, config reads) vs. which are set in the deployment (owner confirms; you cannot read production values). Missing values silently falling back to dev defaults (process.env.API_URL ?? "http://localhost:3001") are launch bugs. - Test vs live modes: payment provider keys (
pk_test/sk_testvs live), OAuth redirect URIs, webhook endpoints, email provider sandbox mode, analytics property IDs (dev vs prod), captcha test keys (1x00000000000000000000AAstyle always-pass keys), map/API key restrictions (HTTP-referrer or origin restricted?). - Test data and accounts: seed users, default admin passwords, demo content, "test" products/orders, fake reviews, sample emails; sitemap/robots/noindex states appropriate for launch (a
noindexleft on production, or removed on a site meant to stay private). - Build hygiene: production build succeeds without warnings that indicate misconfiguration; source maps excluded or access-restricted; no
dist/.nextcache directories committed; drafts and preview routes not shipped;robots.txtcorrect for production. - Ops basics (ask, do not assume): error monitoring installed and pointing at the right project; analytics environment separation; uptime check; backup for the database; domain/HTTPS/redirect policy set (
security-headers); rollback path known. - Domain-move checklist when switching hosts: canonical/sitemap/OG/host absolutes updated; redirects from old hosts; OAuth/webhook URLs updated.
Evidence that counts
Label each claim OBSERVED, SOURCE-INDICATED, DECLARED, INFERRED, UNKNOWN, or REVIEW REQUIRED. UNKNOWN is never a pass and never a failure.
- A string in the shipped bundle or served HTML: OBSERVED. A string in source or config: SOURCE-INDICATED (it may not reach production).
- Production environment values are the owner's; ask them to confirm which are set. Do not read secrets from
.envfiles. - A
.vercel.appor platform hostname may be the production host; do not call it a leftover without confirming intent.
May change
Replace dev/staging URLs with the confirmed production origin (via env-driven config, not hardcoding); remove dev fallbacks that fail open (fail loudly instead); remove or gate debug routes and console noise; exclude source maps from production; delete test data from seeds shipped to production; fix noindex/robots for the intended state; add .env.example entries; update docs listing required production env vars. Do not change deployment settings, DNS, or environment values on the platform.
Must not claim
"Production-ready", "clean", or "no dev artifacts" beyond what the sweep covered. Say which builds and paths were scanned.
Verify
Rebuild and re-run the three commands; grep the rebuilt output for localhost/staging; confirm debug routes 404 in production mode; confirm behavior with only production env values present (missing var now errors clearly).
Escalate
Test-mode keys in production or live keys exposed (owner action needed); real user data in test fixtures; anything requiring platform access; missing backups or monitoring for a launch with real users.
No change is valid when
The sweeps are clean and the owner confirms production env parity. Do not remove intentional staging banners on a staging site.
In this repository54 other files it gives its agents.
- wcag-readinessSkill
- admin-audit-logSkill
- admin-authorizationSkill
- admin-dashboardSkill
- payments-readinessSkill
- subscription-readinessSkill
- ai-features-readinessSkill
- analytics-privacySkill
- consent-managementSkill
- consumer-protection-readinessSkill
- cookie-and-storage-auditSkill
- data-flow-mappingSkill
- data-rightsSkill
- email-complianceSkill
- jurisdiction-applicabilitySkill
- legal-identity-noticesSkill
- minors-readinessSkill
- policy-consistencySkill
- privacy-policySkill
- privacy-readinessSkill
- regulated-domain-triggersSkill
- terms-of-serviceSkill
- third-party-privacySkill
- user-content-safetySkill
- compliance-allSkill
- compliance-diffSkill
- design-system-reconnaissanceSkill
- discoverability-allSkill
- launch-allSkill
- launch-verificationSkill
- production-allSkill
- quality-allSkill
- site-reconnaissanceSkill
- trust-allSkill
- search-console-readinessSkill
- seo-readinessSkill
- social-sharingSkill
- structured-dataSkill
- multilingual-readinessSkill
- rtl-readinessSkill
- content-trustSkill
- error-pagesSkill
- failure-resilienceSkill
- faq-readinessSkill
- forms-readinessSkill
- launch-identitySkill
- legal-navigationSkill
- link-integritySkill
- mobile-readinessSkill
- performance-readinessSkill
- public-supportSkill
- dependency-securitySkill
- security-headersSkill
- web-securitySkill
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.

