topic-guard

by Douglas Cunha · ★ 4 · updated 11 days ago

BandsStatus linePromptwarnings

0

Before a prompt enters the session, a small model judges whether it belongs to the session's topic. When it starts a separate topic, the mod holds it in the prompt box: press Enter to keep it here, or New session to clear the session and send it there.

install topic-guard

Install

/plugin marketplace add dougcunha/claude-mods
/plugin install topic-guard@claude-mods

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.startprompt.submitui.render
API calls
$.clock.now$.clock.sleep$.command.run$.config.set$.env.get$.fs.read$.fs.write$.mcp.call$.model.complete$.prompt.fill$.prompt.read$.session.id$.session.messages$.session.usage$.state.get$.state.set$.tool.check$.tool.list$.ui.invalidate$.ui.resolve$.ui.status$.ui.toast
Draws
AbovePrompt
Can see
every prompt
Reach
level 3 of 3 MCP serverswrites fileschanges configdrives Claudewrites the prompt boxreads filesreads env varsreads the transcriptreads the prompt boxreads mod statedraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/dougcunha/claude-mods
Path in repo
topic-guard
Source commit
ea2e6d7 the exact code the scan read
Author
Douglas Cunha @dougcunha
License
MIT
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from dougcunha/claude-mods

visual-review

dougcunha/claude-mods

The /visual-review command shows the design of the changes against a base branch as a diagram in the browser: classes and modules with their relations, size and quality notes, and the database tables. Comment on the diagram and send the review back to the session in one step.

★ 4Status lineGuardsCommands

feature-progress

dougcunha/claude-mods

A tool any spec-driven flow calls to report the progress of a feature and its tasks; a band above the prompt shows the stage and the count, and a pane lists every task with its state, round, steps and note.

★ 4PanesBandsGuards

session-cleanup

dougcunha/claude-mods

The /cleanup command lists the temporary files the session created and the Git items it left (uncommitted changes, changed submodules, a detached HEAD, unpushed commits); choose what to send to the trash and what to ask Claude to fix.

★ 4PanesGuardsCommands

session-info

dougcunha/claude-mods

Session pane: context, cost and turns, the prompt cache with the time until it expires, keep warm and a guard that holds a prompt that would write an expired cache again, the last turn's tokens, cache, tools and refused calls, a task list Claude keeps with a switch that keeps Claude working while tasks remain open, an autopick switch that answers a question left unanswered with its recommended...

★ 4PanesBandsGuards

Other mods in Bands, close to this one by stars.