cogit plugin
cogit records every message to an agent as a thought commit and ties code to it, so cogit why explains the reason behind any line.
- 158 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Hooks record your messages and agent replies into project history and can share it with the team through git.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/cogitDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks record your messages and agent replies into project history and can share it with the team through git.
This is third-party code. Review the repository files before installing.
What it does
cogit keeps the intent behind code an agent writes. Every Claude Code message becomes a thought commit: what you asked, what came of it, which decisions were made and which options rejected, and which earlier message it continues. Code commits point to the thought with a Thought trailer, and the cogit show, blame and why commands walk from a line of code to its reason. Sessions are drawn as a git-style map with branches, decisions, a Your turn inbox and Resume and Fork buttons. A message that landed commits opens in Intent, Shape and Code tabs. The cogit pr command writes a pull request description with the goal, decisions and rejected options, never the raw chat. Recording runs through Claude Code hooks in the background with no server or account.
Who it is for. Developers who run several agent sessions and later want to understand why the code is the way it is.
Good fit when
- A week later it is unclear why the agent chose a table schema and the reason is needed.
- Several projects run at once and you must return to the right session at the point you left off.
- A pull request reviewer should see decisions along with the diff.
- A team needs a shared history of decisions that stays out of branches and `git status`.
Not a fit when
- You need agent memory so it recalls conversations: cogit explains code to people.
- You work outside Claude Code: support is for it only right now.
- The project is outside a git repository: the plugin needs one.
Example request
Use cogit why to show why the parseConfig function appeared and which option was rejected.Limitations
Node 22.13 or newer, Claude Code 2.1.275 or newer and a git repository are required. A small model does the recording, and by default at the end of a session the original model reopens the conversation and corrects the record, taking about one message. The economical mode leaves recording to the small model: under 2 cents per 20 messages by the author's measurement. Tasks caught at session end are off by default and enabled with cogit config set captures true.
How to disable. Disable the plugin with /plugin uninstall cogit and remove the package with npm uninstall -g @cogit/cli. Old sessions are deleted by cogit prune.
FAQ
How do I install cogit?
Run `npm install -g @cogit/cli`, then in Claude Code `/plugin install cogit --marketplace erensrtky/cogit`.
How do I open the session map?
Run `cogit init` in the project, work with Claude Code and run `cogit open .`. If the map stays empty, `cogit doctor` helps.
Does data go anywhere?
No, recording is local with no server or account. During `cogit init` you can share titles, decisions and reasons with your team through `git push`.
How does cogit differ from agent memory?
Memory helps the agent recall conversations, while cogit helps you understand why code is the way it is, through `cogit why`, `blame` and the session map.
What does cogit pr do?
It writes a pull request description with the goal, decisions and rejected options. `cogit pr --install-action` adds a GitHub Action for every pull request.
Discussion
No questions or reviews yet.
Related
PluginsA Grid Dynamics plugin that loads a team's shared engineering standards, architecture and workflows into a coding agent session
Streams Claude Code hidden thinking, tool calls and subagents to a separate terminal with a live session tree
A Claude Code plugin that runs a task through stages with review and gates, with a local board of decisions and execution.
The CLI replays Git changes as typing animations to present commits and working-tree edits in the terminal.
A Claude Code plugin that hands a task to a local no_human and reviews a branch with a reviewer that never saw the coder's session
Writ turns workflow rules into checks at tool-call time: Claude Code writes no code until you approve the plan and tests
README in short
The project calls itself git for the intent behind agent-written code. The README explains how it differs from agent memory, token savers, code maps, orchestrators and review bots. There is an online map demo with no install and a guide in docs/guide.