Appends the git branch and working-tree counts to the hint line under the prompt.

Personal Claude Code mods, published as one local-style marketplace named heitor-mods.
Requires a Claude Code build with mod (function hooks) support.
1. Add the marketplace. The repository is private, so gh auth login (or any git credential that can read it) must work first.
claude plugin marketplace add fhva29/claude-code-mods
Or clone it and add the folder; Claude Code then reads the mods straight from it, so an edit plus /reload-plugins is enough, with no reinstall:
git clone https://github.com/fhva29/claude-code-mods ~/.claude/mods
claude plugin marketplace add ~/.claude/mods
2. Install the mods you want (user scope):
claude plugin install next-lite@heitor-mods
claude plugin install tidy-tools@heitor-mods
# ...or all of them:
for m in blast-radius commit-gate model-stack next-lite pixel-quest prompt-git \
replay-theater tidy-tools usage-weather brief-mode; do
claude plugin install "$m@heitor-mods"
done
3. Reload inside Claude Code with /reload-plugins.
Options (userConfig) are set in /plugin → pick the mod → configure, then /reload-plugins. They are stored in ~/.claude/settings.json under pluginConfigs.
| Mod | What it does | Command | |
|---|---|---|---|
next-lite | Suggests up to three next prompts above the input (press 1/2/3 to fill the prompt box, 0 to dismiss; the top one is also Tab ghost text). Sends a ~1–2k token digest of the turn to a small model instead of forking the whole session, so its cost does not grow with the conversation. Replacement for next-steps. Options: mode (auto/manual), model, minAnswerChars, suggestSkills. | /next | |
model-stack | Routes the model and effort of the main chat turn and of each subagent with TypeSafe's Jev, and shows the roster, decisions and agent graph in a pane. Needs TYPESAFE_API_KEY in the environment. | /stack | |
tidy-tools | Draws each tool call as one compact line, or folds a whole turn into one "N steps this turn" line. | /lines | |
blast-radius | Holds risky shell commands (rm -rf, git reset --hard, git clean, force push, migrations) and shows what they would change, with Proceed and Cancel buttons. | ||
commit-gate | Holds git commit in a pane listing the staged files, flags files not edited this session and blocks AI attribution trailers. | ||
replay-theater | Steps through the file edits Claude made in the last turn, one diff at a time. | /replay | |
usage-weather | A forecast band above the prompt: context fill, sparkline, rate limits, model and effort. | ||
prompt-git | Appends the git branch and working-tree counts to the hint line under the prompt. | ||
pixel-quest | Replaces the spinner with a pixel RPG scene for each tool, with XP, levels and achievements. No model calls. | /toons | |
brief-mode | Appends a short-answer style section to the system prompt: answer or next action first, numbered steps, lists capped at five, no preamble, recap or closers. Edit hooks/rules.ts to tune it. | ||
midnight-neon | Draws assistant replies with a dark neon palette: filled h1 banner, colored h2–h6, colored bullets, quote bars, highlighted bold, italic, inline code and links. Fences and tables keep the engine's renderer. Not installed by default; /neon flips it per session, `claude plugin enable\ | disable` flips it for good. | /neon |
_archive holds mods that are kept but not in use (branch-hud); they are not listed in the marketplace.
Each mod is a folder with .claude-plugin/plugin.json, hooks/hooks.json and a hooks module (register.ts or register.tsx). Check one with:
claude plugin validate <mod>
claude plugin test <mod>
claude plugin test does not type-check; run tsc against the SDK declarations Claude Code writes to <mod>/.claude-plugin/types/ as well.
next-lite builds on next-steps (MIT, Thariq Shihipar): it reuses the text sanitizer and the reply parsing, and replaces the session fork with a small digest.
hooks/register.ts 55 lines1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, Register } from 'claude-code'
3
4import { countLines, formatSummary } from './summary'
5
6const REFRESH_MS = 10_000
7
8const summary = atom({ plugin: 'prompt-git', key: 'summary' } as const, null)
9
10async function git($: EngineInterface, args: string[]): Promise<string | null> {
11 const { exitCode, stdout } = await $.process.run(['git', '--no-optional-locks', ...args])
12 return exitCode === 0 ? stdout : null
13}
14
15async function refresh($: EngineInterface): Promise<void> {
16 const branch = await git($, ['branch', '--show-current'])
17 if (branch === null) {
18 await update($, summary, () => null)
19 return
20 }
21 const text = formatSummary({
22 branch: branch.trim() || 'detached',
23 staged: countLines((await git($, ['diff', '--cached', '--name-only'])) ?? ''),
24 modified: countLines((await git($, ['diff', '--name-only'])) ?? ''),
25 untracked: countLines((await git($, ['ls-files', '--others', '--exclude-standard'])) ?? ''),
26 })
27 await update($, summary, () => text)
28}
29
30export const register: Register = on => {
31 on('session.start', async ($, e, next) => {
32 const result = await next(e)
33 await refresh($)
34 $.clock.every(REFRESH_MS, () => void refresh($))
35 return result
36 })
37
38 on('turn.complete', async ($, e, next) => {
39 const result = await next(e)
40 if (e.agentId === undefined) {
41 await refresh($)
42 }
43 return result
44 })
45
46 on('ui.render', { component: 'PromptHint' }, async ($, e, next) => {
47 const text = await read($, summary)
48 if (text === null) {
49 return next(e)
50 }
51 const tail = e.props.tail === undefined ? text : `${e.props.tail} · ${text}`
52 return next({ ...e, props: { ...e.props, tail } })
53 })
54}
55hooks/summary.ts 17 lines1export type GitCounts = { branch: string; staged: number; modified: number; untracked: number }
2
3export function countLines(text: string): number {
4 return text.split('\n').filter(line => line.trim() !== '').length
5}
6
7export function formatSummary(counts: GitCounts): string {
8 const parts = [`⎇ ${counts.branch}`]
9 const changes = [
10 counts.staged > 0 ? `+${counts.staged}` : '',
11 counts.modified > 0 ? `~${counts.modified}` : '',
12 counts.untracked > 0 ? `?${counts.untracked}` : '',
13 ].filter(part => part !== '')
14 parts.push(changes.length === 0 ? '✓ clean' : changes.join(' '))
15 return parts.join(' · ')
16}
17types/index.d.ts 8 lines1export type PromptGitSummary = string | null
2
3declare module 'claude-code' {
4 interface PluginState {
5 'prompt-git': { summary: PromptGitSummary }
6 }
7}
8