vmark: Command for Claude Code

.claude/commands/fix.md

fix is a command for Claude Code from xiaolai/vmark. It costs 13 tokens per session (846 once invoked), scanned A, original, ISC.

A command for investigating a software problem, writing a test that demonstrates it, applying a complete fix, and running the project's full checks. It follows a test-first process and focuses on the underlying cause.

In plain words
What is it for?
Use it to reproduce and diagnose bugs, create regression tests, repair the root cause, and verify the result with the project's check-all command.
Why use it?
It discourages temporary patches, bypasses, and fixes that only hide symptoms. The required verification is intended to reduce regressions, meaning new failures caused by the change.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions AGENTS.md.

This is xiaolai/vmark's own configuration. It tells Claude Code how to work on vmark itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vmark configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xiaolai/vmark. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/xiaolai/vmark/main/.claude/commands/fix.md
Clone the repo
git clone --depth 1 https://github.com/xiaolai/vmark

Made for: Claude Code.

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 fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaolai/vmark/fix/github.svg)](https://agentmods.dev/commands/xiaolai/vmark/fix)
Your own site
<a href="https://agentmods.dev/commands/xiaolai/vmark/fix"><img src="https://agentmods.dev/badge/commands/xiaolai/vmark/fix/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fix

Your own site · 80×15
<a href="https://agentmods.dev/commands/xiaolai/vmark/fix"><img src="https://agentmods.dev/badge/commands/xiaolai/vmark/fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 846 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00013 $0.00846
Opus 5.5 $0.00005 $0.00338
Sonnet 5.5 $0.00003 $0.00169
Haiku 4.5 $0.00001 $0.00085

Measured yesterday against content hash 5055f1e86b62, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fix scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/fix.md · 93 lines

How it starts

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

Fix

Context

$ARGUMENTS

Fixing Philosophy

No half measures. Every fix must be complete and correct.

Principles

  1. Understand before fixing — Read the code, trace the flow, identify root cause
  2. Fix the cause, not the symptom — No band-aids, no workarounds, no "good enough"
  3. Rewrite if necessary — Bad code deserves replacement, not patching
  4. Test-first — Write a failing test that captures the bug, then fix, then verify green (see .claude/rules/10-tdd.md)
  5. Zero regressions — Run pnpm check:all before declaring done
  6. Fix the class, not the instance — At the second failure of the same shape, find the mechanism, grep the whole surface for it, and fix every occurrence in one pass
  7. Stay in scope — Every changed line traces to the bug; note unrelated problems instead of fixing them in the same change (AGENTS.md: no drive-by refactors)

Anti-patterns to Avoid

  • Adding flags to bypass broken logic
  • Wrapping bad code in try-catch to silence errors
  • Commenting out problematic code
  • Adding TODO for "later"
  • Special-casing edge cases without fixing core issue
  • Copy-pasting fixes across similar code

Process

1. Reproduce

  • Read the relevant source files. Trace the call chain from symptom to root cause.
  • If the issue involves UI behavior, ask the user to reproduce it (no dev server — use Tauri MCP for E2E when available).

2. Diagnose

  • Find the root cause, not just where it crashes.
  • Check if similar patterns exist elsewhere — the same bug may lurk in related code.

3. Test First (RED)

  • Write a failing test that captures the bug.
  • Follow the pattern catalog in .claude/rules/10-tdd.md:
    • Store bug → store test with getState()
    • Plugin bug → minimal schema + createState() helper
    • Hook bug → renderHook with mocked dependencies
    • Util bug → table-driven it.each covering the broken case
  • Exception: CSS-only or visual bugs don't need unit tests — use visual QA instead.

Read the full file on GitHub · 93 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. yesterday Changed · +1 lines 5055f1e86b62
  2. 2mo ago First seen · 92 lines · 13 tokens per session scan A 12c2d581016a

Subscribe to this mod's changes

fix is a command published in the GitHub repository xiaolai/vmark (878 stars, last pushed yesterday), licensed ISC. It adds 13 tokens to every session and 846 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.