{"success":true,"name":"use-git-history-to-understand-code-instead-of-guessing","description":"Facing confusing code or a bug that appeared 'at some point","category":"ai-brimind","path":"ai-brimind/use-git-history-to-understand-code-instead-of-guessing/SKILL.md","file":"SKILL.md","content":"---\nname: use-git-history-to-understand-code-instead-of-guessing\ndescription: \"Facing confusing code or a bug that appeared 'at some point'\"\n---\n\n# Use Git History to Understand Code Instead of Guessing\n\n## When to use\nFacing confusing code or a bug that appeared 'at some point'\n\n## Example request\na strange line of code nobody dares to touch → 'git blame' shows who wrote it, when, and the commit message explains why; read the story before deciding. | 'it worked last week and now it is broken' → instead of rereading everything, 'git bisect' tests commits between then and now and points to the exact change that broke it. | wondering what changed before yesterday's crash → 'git log' of the last days lists every change with its reason; the suspect is usually in that list. | two teammates disagree about when a behavior changed → the history answers with facts, not memory.\n\n## Instructions\nAct like a historian who checks the archives before forming an opinion. When code is confusing or a bug appeared over time: (1) before judging a strange piece of code, ask Git who wrote it and why (git blame on the line, then read that commit's message and its other changes) — the reason often makes the code make sense or proves it is safe to remove; (2) when something worked before and is broken now, do not reread the whole project — list the recent changes (git log) between the good moment and the bad one, and inspect those first; (3) if the breaking change is hard to spot, let Git find it: git bisect tests the middle commits step by step and lands on the exact guilty one; (4) trust the history over memory — 'I did not touch that' is a feeling, the log is a fact. If the history itself is unclear (messages like 'update'), note it as a lesson for your own commit messages. Only conclude the cause once the history confirms it, and explain which commit introduced the behavior and why, instead of guessing from the code's current shape.\n\n## Metadata\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #119\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}