Home / Claude Code mods / Security / topic-guard

topic-guard

topic-guard is a Claude Code mod by dougcunha that 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.

Updated 2026-11-23

What is topic-guard?

topic-guard is a Claude Code mod by dougcunha that 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 is listed under Security and has 4 GitHub stars.

TypeClaude code mod
Authordougcunha
Repositorydougcunha/claude-mods
Popularity4 GitHub stars
CategorySecurity
SecurityHigh risk (44/100)
Rank#1,517 of 9,397 Claude Code mods; #183 in Security
LicenseMIT
Last commit2026-11-23
Hooks3 events
Seesevery prompt
Draws onAbovePrompt

Is topic-guard safe to install?

topic-guard scores 44/100 on the MCPMods security check: High risk. Things to review: sends data over the network; writes files or config; reads environment variables; watches every prompt or event. It passed 2 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
Sends data over the networkReview
Starts no processesPass
Writes files or configReview
Reads environment variablesReview
Watches every prompt or eventReview
Drives Claude (model calls, prompts)Note
Validator reported problemsNote
Has an open-source licensePass

API calls in its code

CallWhat it means
$.clock.now
$.clock.sleep
$.command.rundrives Claude
$.config.setchanges config
$.env.getreads env vars
$.fs.readreads files
$.fs.writewrites files
$.mcp.callcalls MCP servers
$.model.completedrives Claude
$.prompt.fillwrites the prompt box
$.prompt.read
$.session.id
$.session.messagesreads the transcript
$.session.usage
$.state.get
$.state.set
$.tool.check
$.tool.list
$.ui.invalidatedraws interface
$.ui.resolvedraws interface
$.ui.statusdraws interface
$.ui.toastdraws interface

How do I install topic-guard?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/dougcunha/claude-mods
    claude plugin validate ./claude-mods/topic-guard
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    claude plugin marketplace add dougcunha/claude-mods && claude plugin install topic-guard@claude-mods

Or ask Claude to set it up

Paste this into Claude Code and it installs topic-guard for you:

Install the "topic-guard" Claude Code mod from https://github.com/dougcunha/claude-mods/tree/main/topic-guard. Run claude plugin validate on it first and show me what it can access before you enable it.

More from dougcunha/claude-mods

This repository has 5 Claude Code mods on MCPMods.

  • feature-progress: A tool any spec-driven flow calls to report the progress of a feature and its tasks; a band above the prompt shows the s (Review before installing)
  • session-cleanup: The /cleanup command lists the temporary files the session created and the Git items it left (uncommitted changes, chang (Review before installing)
  • session-info: Session pane: context, cost and turns, the prompt cache with the time until it expires, keep warm and a guard that holds (High risk)
  • visual-review: The /visual-review command shows the design of the changes against a base branch as a diagram in the browser: classes an (Review before installing)