oocx/tfplan2md

update-test-snapshots

Regenerate test snapshot files after intentional markdown output changes. Use after modifying templates or rendering logic.

First seen Feb 28, 2026

Installation

$ npx skills add oocx/tfplan2md --skill update-test-snapshots

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from oocx/tfplan2md · top by installs.

npx skills add oocx/tfplan2md

Browse all from oocx/tfplan2md

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 172
License LICENSE
Default branch main
Open issues 26
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

CompatibilityRequires .NET SDK and access to the test project.

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,944 B
  • docs SUMMARY.md 152 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 15 installs

SKILL.md

Update Test Snapshots

Purpose

Regenerate all test snapshot (golden file) baselines when intentional changes are made to markdown output. This updates the expected outputs that snapshot tests compare against.

Hard Rules

Must

  • Use the stable wrapper script: scripts/update-test-snapshots.sh
  • Script will handle deleting old snapshots, running tests, and verification automatically
  • Always allow this script — it only modifies test snapshot files, no production code
  • Review the git diff of snapshot changes before committing

Must Not

  • Manually copy files to update snapshots
  • Update snapshots without understanding why they changed
  • Run without first verifying the new output is correct
  • Skip reviewing snapshot diffs before committing

Actions

Regenerate All Snapshots

scripts/update-test-snapshots.sh

This single command:

  1. Deletes all existing snapshot files in src/tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/
  2. Runs snapshot tests (which will fail but create new snapshots)
  3. Counts generated snapshots to verify success
  4. Runs snapshot tests again to verify they pass with new baselines
  5. Reports success with instructions to review changes

Expected Output

[INFO] Deleting existing snapshot files...
[INFO] ✓ Deleted 6 snapshot files
[INFO] Running snapshot tests to regenerate files...
[INFO] (Tests will fail on first run, but will create new snapshots)
[INFO] ✓ Generated 6 new snapshot files
[INFO] Running snapshot tests again to verify...
[INFO] ✅ All snapshot tests pass!

Snapshots updated successfully. Review changes with:
  git diff src/tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots

When to Use

  • After intentionally modifying markdown rendering logic (C# renderers)
  • After changing markdown rendering logic
  • After updating formatting rules (value escaping, table formatting, etc.)
  • After adding new snapshot tests
  • When snapshot tests fail due to expected changes

What Gets Updated

Snapshot files in src/tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/:

  • comprehensive-demo.md - Full comprehensive demo output
  • summary-template.md - Summary template output
  • breaking-plan.md - Edge cases with escaping
  • role-assignments.md - Role assignment rendering
  • firewall-rules.md - Firewall rule semantic diff
  • multi-module.md - Multi-module plan output

After Running

Always review the changes:

git diff src/tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/

Verify the changes match your expectations, then stage and commit:

git add src/tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/
git commit -m "test: update snapshots after [describe change]"