vmark: Command for Claude Code

.claude/commands/fix-issue.md

fix-issue is a command for Claude Code from xiaolai/vmark. It costs 17 tokens per session (2,465 once invoked), scanned A, original, ISC.

A command that takes one or more GitHub issues through investigation, code changes, checks, and a pull request. It classifies each issue as a bug, feature request, or question before choosing a workflow.

In plain words
What is it for?
Use it to resolve GitHub bugs, implement feature requests, or handle issue questions with test-driven development (writing tests before the fix) and an audit step.
Why use it?
It removes the need to coordinate issue details, branches, tests, reviews, and pull-request creation manually. It also stops when required checks fail or the issue is unclear.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads ~/.codex paths; runs codex exec; 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 →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git worktree add ../vmark-worktree-{N} -b fix/issue-{N}-{slug} main.

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-issue.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-issue

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaolai/vmark/fix-issue/github.svg)](https://agentmods.dev/commands/xiaolai/vmark/fix-issue)
Your own site
<a href="https://agentmods.dev/commands/xiaolai/vmark/fix-issue"><img src="https://agentmods.dev/badge/commands/xiaolai/vmark/fix-issue/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-issue

Your own site · 80×15
<a href="https://agentmods.dev/commands/xiaolai/vmark/fix-issue"><img src="https://agentmods.dev/badge/commands/xiaolai/vmark/fix-issue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,465 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00017 $0.02465
Opus 5.5 $0.00007 $0.00986
Sonnet 5.5 $0.00003 $0.00493
Haiku 4.5 $0.00002 $0.00247

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

Security

Grade A, and why

fix-issue scanned grade A 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 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.

Reads agent configuration directorieslowAgent snooping

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

Run Codex non-interactively, read-only, with the prompt on stdin. Do not pass a model — inherit it from `~/.codex/config.toml` so upgrades propagate; always set reasoning effort explicitly.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.claude/commands/fix-issue.md · 269 lines

How it starts

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

Fix Issue

Resolve one or more GitHub issues end-to-end: fetch, classify, branch, fix with TDD, Codex audit loop, gate, and PR.

Input

$ARGUMENTS

Pre-flight Checks

  1. Parse arguments — extract issue numbers (e.g. #123, 123, #123 #456).
    • No arguments: print usage and STOP.
  2. Working tree must be clean — run git status --porcelain. If dirty, error and STOP.
  3. Confirm on main/up-to-date — run git branch --show-current and git fetch origin.

Single-Issue Pipeline

When exactly one issue number is provided, run phases 1-6 sequentially.

Phase 1: Fetch & Classify

gh issue view {N} --json number,title,body,labels,state,assignees
  • If issue not found or closed: warn user, ask whether to proceed, or STOP.
  • Classify by labels or body content:
Classification Trigger Path
Bug label contains bug, or body mentions error/crash/broken Bug path (Phase 3a)
Feature label contains feature/enhancement Feature path (Phase 3b)
Question label contains question Question path (Phase 3c)
Ambiguous no matching labels Ask user to classify

Phase 2: Branch Setup

  • Generate slug from title: lowercase, strip non-ASCII, replace spaces with -, truncate to 40 chars.
  • Branch name: fix/issue-{N}-{slug} (bug) or feat/issue-{N}-{slug} (feature).
  • If branch already exists: ask user — reuse or rename.
  • Create and checkout the branch.

Phase 3: Resolve

3a. Bug Path

Follow the philosophy from /fix — no half measures.

  1. Reproduce — Read relevant code, trace call chain from symptom to root cause.
  2. Diagnose — Find root cause, check for similar patterns elsewhere.
  3. RED — Write a failing test capturing the bug (see .claude/rules/10-tdd.md).
  4. GREEN — Fix the root cause with minimal, focused changes.
  5. REFACTOR — Clean up without changing behavior.
3b. Feature Path
  1. Research — Search for best practices, prior art, established patterns (AGENTS.md mandate).
  2. Plan — Design the implementation. If it would touch 10+ files or need 4+ work items, redirect to /feature-workflow and STOP this pipeline.
  3. TDD implement — RED/GREEN/REFACTOR per work item.
  4. Edge cases — Brainstorm and test: empty input, null, Unicode/CJK, rapid actions, concurrent access.

Read the full file on GitHub · 269 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 · -13 lines cae6ed95a941
  2. 2mo ago First seen · 282 lines · 17 tokens per session scan A d3e37151b046

Subscribe to this mod's changes

fix-issue is a command published in the GitHub repository xiaolai/vmark (878 stars, last pushed yesterday), licensed ISC. It adds 17 tokens to every session and 2,465 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A 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-30.