Fix snarkVM Issues with TDD Workflow

VerifiedCaution

Fix GitHub issues or PR review feedback in snarkVM using test-driven development. Includes investigation, planning, and implementation with final validation.

Sby Skills Guide Bot
DevelopmentAdvanced
3/8/2026
Claude Code
#rust#tdd#github-issues#pr-review#snarkvm

Recommended for

Automated summary

Drives a test-driven workflow to fix a GitHub issue or PR review comments in snarkVM, from context gathering through final validation.

Strengths

  • Enforces an explicit approval gate (AskUserQuestion) on a structured plan before any code is changed.
  • Strict TDD loop: write the failing test, confirm it fails, apply the minimal fix, confirm it passes.
  • Maps symptoms to the right crates (console, circuit, synthesizer, algorithms) and flags the console/circuit sync requirement.
  • Handles reviewer disagreements explicitly instead of silently dropping feedback.

Limitations

  • Tightly coupled to the snarkVM repository and its companion snarkvm-github skill (fetch scripts, .claude/workspace state), so it is not reusable as-is elsewhere.
  • Assumes a local Rust toolchain and tolerates long build/test cycles on a large cryptographic codebase.
  • Does not cover security review (delegated to snarkvm-review) and never commits unless explicitly asked.
When to use it

Use it when fixing a bug or feature request from a snarkVM GitHub issue, or when addressing each unresolved comment on a PR.

When not to use it

Avoid it for security review, for context-only GitHub lookups, or for code outside snarkVM.

Security analysis

Caution
Quality score80/100

No destructive, exfiltration, obfuscation, or safety-disabling behavior. The skill uses Bash and network-backed helper scripts for a legitimate TDD workflow on snarkVM, but it depends on external scripts and cargo test execution that run untrusted-ish code, so it warrants caution rather than safe.

Findings
  • •Delegates execution to external shell scripts in a sibling skill directory ($SKILL_DIR/scripts/fetch-issue.sh, fetch-pr.sh, refresh-threads.sh) whose contents are not included, creating an opaque/supply-chain dependency that executes with Bash.
  • •Runs cargo build/test commands which execute reproducer/project code in the workspace.
  • •Setup uses ${BASH_SOURCE[0]}, which is unreliable when snippets are run inline by an agent and could resolve SKILL_DIR incorrectly.
  • •Writes files under .claude/workspace (state/handoff files).
How this analysis is made

Examples

Fix an issue
/snarkvm-fix issue 2534 — the parser rejects valid transition inputs, please reproduce, plan, and fix with a failing test first.
Address PR review comments
/snarkvm-fix pr 3012 — resolve the unresolved review threads, show me a plan before changing anything.
Reviewer disagreement
fix PR feedback on #3105, but one reviewer asks to change the serialization format — push back with evidence before implementing that part.

name: snarkvm-fix description: | Fix GitHub issues or PR review feedback in snarkVM using TDD workflow. WHEN: User says "fix issue", "fix #123", "fix pr", "fix PR feedback", "address review comments", "resolve review threads", or wants to fix a bug/feature request from GitHub issues or address reviewer requests. WHEN NOT: Doing security review (use snarkvm-review), fetching context only (use snarkvm-github), or working on non-snarkVM code. allowed-tools: Bash, Read, Write, Grep, Glob, Task, AskUserQuestion

Fix Issue or PR Feedback

Fix snarkVM GitHub issues or PR review comments using test-driven development.

Usage

/snarkvm-fix issue <number>
/snarkvm-fix pr <number>

Setup

MODE="${ARGUMENTS%% *}"   # "issue" or "pr"
NUM="${ARGUMENTS#* }"     # the number
WS=".claude/workspace"
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../snarkvm-github" && pwd)"

1. Load Context

For issues:

if [[ ! -f "$WS/state-issue-$NUM.md" ]]; then
  "$SKILL_DIR/scripts/fetch-issue.sh" "$NUM"
fi

Review: $WS/state-issue-$NUM.md and recent comments.

For PRs:

if [[ ! -f "$WS/state-pr-$NUM.md" ]]; then
  "$SKILL_DIR/scripts/fetch-pr.sh" "$NUM"
fi
"$SKILL_DIR/scripts/refresh-threads.sh" "$NUM"

Review: $WS/state-pr-$NUM.md, $WS/unresolved-pr-$NUM.json, and $WS/handoff-pr-$NUM.md if present.

2. Investigate

For issues — search for related code. Answer:

  1. What is the expected vs actual behavior?
  2. Where does the code path go wrong?
  3. What are the edge cases?

For PRs — analyze each unresolved comment:

| # | Path:Line | Reviewer | Request | Type | Risk | |---|-----------|----------|---------|------|------|

Where to look:

  • Console type bugs -> console/ (types, program, network)
  • Circuit bugs -> circuit/ (must stay in sync with console)
  • Synthesizer bugs -> synthesizer/ (program execution, VM, process)
  • Crypto bugs -> algorithms/ (Poseidon, Marlin, Polycommit)
  • Serialization bugs -> check ToBytes/FromBytes/Serialize/Deserialize impls

Think hard. Do not proceed until you understand the root cause or each request.

3. Plan (APPROVAL REQUIRED)

Present a concrete plan:

| # | Location | Change | Test | Risk | |---|----------|--------|------|------|

Use AskUserQuestion to get explicit approval before proceeding.

4. Implement (TDD)

For each change:

  1. Write failing test that reproduces the bug or covers the new behavior
  2. Verify it fails: cargo test -p <crate> -- test_name --nocapture
  3. Implement minimal fix — match existing code style
  4. Verify it passes: cargo test -p <crate> -- test_name --nocapture

For pure style/nit fixes (no behavioral change), batch them without tests.

5. Final Validation

Validate affected crates per AGENTS.md.

6. Report

**Target**: #NUM — [title]
**Root cause**: [brief explanation]
**Fix**: [what changed and why]
**Test**: [what the test verifies]
**Files changed**:
- path/to/file.rs — [change description]

Do not commit unless explicitly asked.

Handling Disagreements (PR mode)

If you disagree with a review comment:

  1. Explain your reasoning with evidence
  2. Propose an alternative if applicable
  3. Use AskUserQuestion to discuss before proceeding

Never silently ignore review feedback.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/download' --output '.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/SKILL.md.part' && mv '.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/SKILL.md.part' '.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Read, Write, Grep, Glob, Task, AskUserQuestion

Original excerpt: Setup
MODE="${ARGUMENTS%% *}"   # "issue" or "pr"
NUM="${ARGUMENTS#* }"     # the number
WS=".claude/workspace"
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../snarkvm-github" && pwd)"

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/SKILL.md' && test -s '.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/snarkvm-fix' && cp -R '.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp' '.claude/skills/snarkvm-fix'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp'

openskills read 'fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/fix-snarkvm-issues-with-tdd-workflow-mmh8qqmp/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills