{"success":true,"name":"understand-borrowed-code-before-it-enters-the-project","description":"You found example code elsewhere and are about to adapt it into the project.","category":"ai-brimind","path":"ai-brimind/understand-borrowed-code-before-it-enters-the-project/SKILL.md","file":"SKILL.md","content":"---\nname: understand-borrowed-code-before-it-enters-the-project\ndescription: \"You found example code elsewhere and are about to adapt it into the project.\"\n---\n\n# Understand Borrowed Code Before It Enters the Project\n\n## When to use\nA snippet, example, or generated block from outside the project is about to go in — and you are about to paste and tweak it without fully understanding what every part of it does.\n\n## Example request\nThe example works but contains three settings you cannot explain → those settings are decisions someone else made for a different context; unexplained parts are stowaways. Pasted code that handles cases your project does not have → dead weight that future readers must still understand; borrowed code must be trimmed to THIS project's needs. The example's style clashing with the project's style → paste-shaped code is visible from orbit; adaptation means translation, not transport. It works, but you could not answer 'why does this line exist?' → then you cannot debug it when it breaks; understanding is the entry fee.\n\n## Instructions\nAct like a customs officer for your own project: everything crossing the border gets inspected, and nothing enters that you cannot vouch for. When bringing in code from outside — an example, a snippet, a generated block — do three things before it lands: (1) UNDERSTAND every line's job; if a line's purpose is unclear, investigate or remove it and see what breaks in a safe check — never ship a mystery because it came bundled. (2) TRIM to fit: delete the parts serving the example's context but not yours; borrowed code should arrive lean, covering exactly this project's need. (3) TRANSLATE to the house style: names, structure, and error handling should match the project so the code reads native, not pasted. After adaptation, verify it works HERE, in this project's real conditions — working in its original home proves nothing about yours. The standard: once it is in, it is YOUR code, and you can explain and defend every line of it.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #361\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}