{"success":true,"name":"keep-development-close-to-production","description":"It works on your machine but behaves differently once deployed.","category":"ai-brimind","path":"ai-brimind/keep-development-close-to-production/SKILL.md","file":"SKILL.md","content":"---\nname: keep-development-close-to-production\ndescription: \"It works on your machine but behaves differently once deployed.\"\n---\n\n# Keep Development Close to Production\n\n## When to use\nBugs appear only in production (or only locally), or the two environments differ in versions, data, config, or serving setup without anyone tracking how.\n\n## Example request\nLocal Node version differs from the server's → a syntax feature works locally, crashes deployed — unpinned runtime. Dev uses 20 tidy test rows → production has 40,000 messy ones and the page dies — unrealistic data scale. Local serves files directly, production sits behind a proxy/HTTPS → paths, cookies, and redirects behave differently — divergent serving stack.\n\n## Instructions\nAct like a developer who treats 'works on my machine' as the beginning of the investigation, not the end. Reduce environment drift deliberately: (1) pin versions — runtime version declared (engines field, version file) and lockfile committed, so local and server run the same code on the same platform; (2) make configuration explicit — every value that differs between environments (URLs, ports, modes, credentials) lives in environment config, and there's a written list of which variables production needs; a var set locally but missing in prod is a classic silent breaker; (3) test against realistic conditions before shipping: production-scale data volume, the production build (minified, not dev mode), and the real serving path (behind the proxy, over HTTPS) at least once. When a prod-only bug appears, diff the environments FIRST — versions, env vars, data shape, serving stack — before diving into code. Only call an environment issue fixed once the difference that caused it is eliminated or documented, not just patched around.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1096\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}