verify-commands

verify-commands is a command for Claude Code, OpenCode from d-o-hub/github-template-ai-agents. It costs 0 tokens per session (1,803 once invoked), scanned D, original, MIT.

A command-line check that finds shell commands in Markdown files and verifies that they still work. It rechecks only commands affected by recent Git changes and can reuse earlier results.

In plain words
What is it for?
It is for validating command examples in README files and other Markdown documentation, with optional JSON output and cache statistics.
Why use it?
It helps catch documentation that tells developers to run outdated or broken commands without repeating every check each time.

Command for Claude CodeOpenCode

Written for OpenCode and Claude Code: installed under .opencode/, but also a Claude Code command (commands/*.md).

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/d-o-hub/github-template-ai-agents/verify-commands
Clone the repo
git clone --depth 1 https://github.com/d-o-hub/github-template-ai-agents

Made for: Claude Code, OpenCode.

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 verify-commands

README.md
[![agentmods](https://agentmods.dev/badge/commands/d-o-hub/github-template-ai-agents/verify-commands.svg)](https://agentmods.dev/commands/d-o-hub/github-template-ai-agents/verify-commands)
Your own site
<a href="https://agentmods.dev/commands/d-o-hub/github-template-ai-agents/verify-commands"><img src="https://agentmods.dev/badge/commands/d-o-hub/github-template-ai-agents/verify-commands.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,803 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. 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.00000 $0.01803
Opus 5 $0.00000 $0.00901
Sonnet 5 $0.00000 $0.00361
Haiku 4.5 $0.00000 $0.00180

Measured 2d ago against content hash 2511b1efd92f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade D, and why

verify-commands scanned grade D with 2 findings 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 2d ago.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- `chmod 777`, `chown -R`

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `rm -rf`, `del /F /S`
.opencode/commands/verify-commands.md · 314 lines

How it starts

The opening of the file, as written. The whole thing — 314 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/verify-commands

Verify all commands in markdown documentation with intelligent caching.

Description

This command discovers all shell commands in markdown files, validates them using git diff-based cache invalidation, and ensures documentation accuracy with zero token cost after initial setup.

Usage

/scripts/verify-commands.sh [OPTIONS]

Options

Option Description
--force Force full validation, bypass cache entirely
--stats Show detailed statistics and cache performance metrics
--json Output results as JSON for programmatic processing
--quick Quick check using cache only (no new validations)
--silent Suppress output except errors
--help Show help message

Slash Commands

/verify

Quick verification with intelligent caching.

What it does:

  • Discovers all commands in markdown files
  • Uses git diff-based cache invalidation
  • Only revalidates commands affected by recent changes
  • Provides cache hit rate statistics

Example output:

📚 PHASE 1: Command Discovery
✓ Found 267 markdown files
✓ Discovered 847 unique commands

🔄 PHASE 2: Cache Check
✓ Cache hit rate: 94.2% (798/847 from cache)
⚡ Validating 49 new/changed commands...

📊 Results:
  Safe commands: 623 (73.6%)
  Conditional: 178 (21.0%)
  Dangerous: 46 (5.4%) - Review required

✅ All commands validated successfully

/verify-force

Force full command verification, bypassing the cache entirely.

What it does:

  • Clears the validation cache
  • Revalidates ALL commands from scratch
  • Establishes fresh baseline

Use when:

  • Cache may be corrupted or stale
  • After bulk documentation updates
  • Debugging cache invalidation issues
  • Need to verify validation logic changes

/verify-stats

Show detailed verification statistics and cache performance metrics.

What it provides:

  • Cache Performance: Hit rates, last validation commit, cache size
  • Command Distribution: Breakdown by category (safe/conditional/dangerous)
  • System Availability: Which commands are installed vs unavailable
  • Invalidation Analysis: Files changed, commands affected by changes

Read the full file on GitHub · 314 lines

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. 2d ago First seen · 314 lines · 0 tokens per session scan D 2511b1efd92f

Subscribe to this mod's changes

verify-commands is a command published in the GitHub repository d-o-hub/github-template-ai-agents (2 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,803 tokens. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.