{"success":true,"name":"trace-where-missing-data-can-sneak-in","description":"A value might be empty or missing somewhere in the flow.","category":"ai-brimind","path":"ai-brimind/trace-where-missing-data-can-sneak-in/SKILL.md","file":"SKILL.md","content":"---\nname: trace-where-missing-data-can-sneak-in\ndescription: \"A value might be empty or missing somewhere in the flow.\"\n---\n\n# Trace Where Missing Data Can Sneak In\n\n## When to use\nYou are using a value that traveled through several steps, and you have not checked where along the path it could become missing or empty.\n\n## Example request\nProfile shows user.address.city → some users never filled an address; every optional field makes its children unreachable. A lookup by ID returns nothing → the code uses the result directly; every 'find' can find nothing. An old record misses a field added last month → new code assumes it exists; old data does not know about new fields. A list is filtered then the first item is taken → the filter matched nothing; 'first of empty' is a hidden crash.\n\n## Instructions\nAct like a detective who follows a value backwards to every place it could disappear. IF you are about to use a value, THEN trace its journey: where was it created, which steps could return nothing, which fields along the chain are optional, and could old stored data lack it entirely? Mark each risky point and decide there: guarantee the value exists (fill it, require it) or handle its absence explicitly at that spot. NEVER sprinkle blind 'if exists' checks everywhere without knowing which absence is legitimate and which is a bug — a check that hides a bug is worse than a crash. Only use the value once you can say for each step of its journey either 'cannot be missing here, because…' or 'missing is handled here by…'.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #631\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}