claudemd-install

claudemd-install is a command for coding agents from sdsrss/claudemd. It costs 55 tokens per session (590 once invoked), scanned B, original, MIT.

A command that installs claudemd's specification files and hook configuration into the current Claude Code setup. It also backs up existing files and removes older claudemd hook entries.

In plain words
What is it for?
Use it immediately after installing claudemd, especially when existing configuration may need backup, restoration, or cleanup.
Why use it?
It lets a newly installed plugin start working in the current session without waiting for the next session, while preserving files it replaces.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claudemd plugin — 16 commands, 6 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sdsrss/claudemd/claudemd-install
Clone the repo
git clone --depth 1 https://github.com/sdsrss/claudemd

Or install claudemd, the plugin that ships this one along with the rest of its 16 commands, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claudemd-install

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-install.svg)](https://agentmods.dev/commands/sdsrss/claudemd/claudemd-install)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/claudemd/claudemd-install"><img src="https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-install.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 590 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.00590
Opus 5 $0.00028 $0.00295
Sonnet 5 $0.00011 $0.00118
Haiku 4.5 $0.00006 $0.00059

Measured today against content hash 7fa032cbe92d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

claudemd-install scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

This wraps `scripts/install.js` exactly the same way `SessionStart` does on the next session — copies `spec/CLAUDE*.md` + `OPERATOR.md` into `~/.claude/`, writes the hook manifest to `~/.claude/.claudemd-manifest.json`,
commands/claudemd-install.md · 23 lines

What it actually says

Run: node ${CLAUDE_PLUGIN_ROOT}/scripts/install.js

This wraps scripts/install.js exactly the same way SessionStart does on the next session — copies spec/CLAUDE*.md + OPERATOR.md into ~/.claude/, writes the hook manifest to ~/.claude/.claudemd-manifest.json, and evicts any legacy claudemd hook entries from ~/.claude/settings.json. Idempotent — safe to re-run.

Backup is conditional, not universal: only genuine USER content is moved aside, into ~/.claude/backup-<ISO>/. An existing ~/.claude/CLAUDE.md that is already a claudemd spec is overwritten with no backup — that is the v0.23.11 data-loss fix, so the personal backup stays the sole entry in that namespace and CLAUDEMD_SPEC_ACTION=restore cannot return a spec instead of the user's own file. Pre-plugin hand-installed hook files go to their own handhook-backup-<ISO>/ namespace.

Surface the JSON output as a one-line human summary:

  • spec: fresh (no prior files) | backup-and-overwrite (existing files moved to backup-<ISO>/).
  • backupDir: path to the backup directory when applicable.
  • userContentDetected: true — flag this loudly: the existing ~/.claude/CLAUDE.md did not look like a claudemd spec; the user's hand-written content is in backupDir/CLAUDE.md. To bring it back on uninstall, run CLAUDEMD_SPEC_ACTION=restore /claudemd-uninstall.
  • entries.length: number of registered hooks.
  • cachePruned.removed: list of older cache version dirs reclaimed (best-effort; install succeeds regardless).

When to use: right after /plugin install claudemd@claudemd so hooks fire in THIS session. Claude Code does not honor postInstall, so without this command (or restarting the session) install.js runs on the next SessionStart and the current session sees /claudemd-status reporting plugin.hint == "cache-present-bootstrap-pending".

Not for routine upgrades/claudemd-update is the right command for refreshing the spec into ~/.claude/ after a /plugin marketplace update + reinstall cycle; that command also diffs first and asks before overwriting.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +2 lines 7fa032cbe92d
  2. 5d ago First seen · 21 lines · 55 tokens per session scan B 8612ec2a7fbc

Subscribe to this mod's changes

claudemd-install is a command published in the GitHub repository sdsrss/claudemd (2 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 590 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.