Agent plugins
The LGTM agent command lets your coding agent quiz itself before it pushes or
opens a pull request. It delegates to sp lgtm, so install
the Spare Parts CLI first.
Install for your agent
Choose one target, repeat --agent for several, or install all six:
sp plugin install lgtm --agent claude --dir .
sp plugin install lgtm --agent cursor --agent gemini --dir .
sp plugin install lgtm --all --dir .Supported targets are claude, codex, cursor, copilot, gemini, and
opencode: Claude, Codex, Cursor, GitHub Copilot, Gemini, and OpenCode.
The install is project-scoped. --dir defaults to the current directory.
Existing command files are preserved; pass --force only when you intend to
replace them. Start a new agent session afterward so it discovers the command.
The release contains one agent-neutral command. sp verifies its pinned
archive and writes only the wrapper required by each selected agent.
First use
Run LGTM through your agent's command or skill surface. It checks that sp is
available, then runs sp lgtm for the current change.
If no preference is visible on the first interactive run, it asks whether the
agent should remember to run LGTM before an agent-initiated git push or
pull-request creation.
- Yes asks the host to save that instruction through a supported, user-visible memory or instruction mechanism. Saving may be asynchronous, disabled, or unavailable, so LGTM does not claim persistence until confirmed.
- No saves no affirmative rule. The current quiz still runs.
You control the host's memory or instruction surface and can change or remove the preference there. The plugin never silently edits a generated memory or repository instruction file. It covers publishing performed by the agent; it cannot intercept a push you run independently outside the agent.
Agent command or Git hook?
| Mode | Install | Runs when |
|---|---|---|
| Agent command | sp plugin install lgtm --agent … |
On demand, or before agent publishing after you consent |
| Local Git hook | sp lgtm install |
Before local pushes in that repository |
Use either or both. They share the same quiz and configuration.
Codex marketplace compatibility
Without --agent or --all, the command retains the Codex marketplace path:
sp plugin install lgtm
sp plugin install lgtm --refreshFor the shared project-native path, select Codex explicitly:
sp plugin install lgtm --agent codex --dir .The marketplace adapter adds only Codex-specific memory guidance; its workflow is the same canonical command used by every target.