update-test-snapshots
Skill174 starsChanged 2 months agoMITView on GitHub
Regenerate test snapshot files after intentional markdown output changes. Use after modifying templates or rendering logic.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-runtimeSkill
- arc42-documentationSkill
- authoring-rolesSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- create-pr-githubSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-test-snapshotsSkill
- update-workflow-diagramSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
- agent-runtimeSkill
- arc42-documentationSkill
- authoring-rolesSkill
- context-packSkill
- create-agent-skillSkill
- create-pr-azdoSkill
- create-pr-githubSkill
- detect-diagram-crossingsSkill
- flowchart_layout_optimizerSkill
- generate-demo-artifactsSkill
- generate-release-screenshotsSkill
- git-rebase-mainSkill
- merge-conflict-resolutionSkill
- next-issue-numberSkill
- pre-pr-checklistSkill
- retrospective-evidenceSkill
- run-dotnet-testsSkill
- run-uatSkill
- run-workflowSkill
- update-workflow-diagramSkill
- view-pr-githubSkill
- watch-uat-azdo-prSkill
- watch-uat-github-prSkill
- website-accessibility-checkSkill
- website-create-examplesSkill
- website-devtoolsSkill
- website-quality-checkSkill
- website-visual-assetsSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Use the stable wrapper script: scripts/update-test-snapshots.sh
- Distinctive: line 25
Update snapshots without understanding why they changed
- Distinctive: line 26
Run without first verifying the new output is correct
- Distinctive: line 62
After intentionally modifying markdown rendering logic (C# renderers)
- Distinctive: line 63
After changing markdown rendering logic
- Distinctive: line 64
After updating formatting rules (value escaping, table formatting, etc.)
- Distinctive: line 65
After adding new snapshot tests
- Distinctive: line 66
When snapshot tests fail due to expected changes
- Distinctive: line 81
Always review the changes:
- Distinctive: line 87
Verify the changes match your expectations, then stage and commit:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.shThis single command:
- Deletes all existing snapshot files in
src/tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/ - Runs snapshot tests (which will fail but create new snapshots)
- Counts generated snapshots to verify success
- Runs snapshot tests again to verify they pass with new baselines
- 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/SnapshotsWhen 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 outputsummary-template.md- Summary template outputbreaking-plan.md- Edge cases with escapingrole-assignments.md- Role assignment renderingfirewall-rules.md- Firewall rule semantic diffmulti-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]"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

