{"success":true,"name":"assume-anything-outside-your-code-will-fail","description":"Your code depends on something external and you assume it always works.","category":"ai-brimind","path":"ai-brimind/assume-anything-outside-your-code-will-fail/SKILL.md","file":"SKILL.md","content":"---\nname: assume-anything-outside-your-code-will-fail\ndescription: \"Your code depends on something external and you assume it always works.\"\n---\n\n# Assume Anything Outside Your Code Will Fail\n\n## When to use\nYou are writing code that calls anything outside itself (network, database, file, another service), and you have only written the success case.\n\n## Example request\nCode fetches data from an API → the API is down one day; the call site must have a failure plan. Code reads a file → the file was deleted or is locked; existence is never guaranteed. Code writes to a database → the connection drops mid-write; every external write can fail halfway. Code calls another team's service → they deploy a breaking change; external contracts change without warning.\n\n## Instructions\nAct like an engineer who treats every external dependency as unreliable by contract. IF the code you are writing touches anything outside its own process — network, database, file system, another service — THEN for each such call, state explicitly: what happens here if this fails, is slow, or returns garbage? Design the failure behavior on purpose: retry, fallback, clear error to the user, or safe stop. Never let 'it usually works' be the plan. IF you cannot say what the code does when the dependency fails, THEN the feature is not designed yet — finish that design before writing more code. Only proceed once every external call has a chosen, named failure behavior.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #625\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}