test-case-with-demo
Skill4 starsChanged 3 months agoMITView on GitHub
WHEN/WHERE/WHO: [Scheduling: Use when: the user asks to create a demo test case, example test, UserGuide demo, UserStories demo, manual demo, setup-backed test case, or explicitly invokes test-case-with-demo. Applies to: documentation-oriented P4 demo/example tests for CLIs, APIs, tools, workflows, repository user guides, and user story specifications] HOW: [Structural: Helps with: building an end-to-end demonstration test package that shows how to use a feature according to the UserGuide and how it satisfies UserStories/acceptance criteria, including setup scripts, manual instructions, fixtures, expected outputs, and traceability] WHY: [Scheduling: Keeps the UserGuide verifiable through repeatable, traceable demo tests.]
In this repository61 other files it gives its agents.
- activate-personalSkill
- analyze-with-tactics-questionnairesSkill
- apply-agile-testing-quadrantsSkill
- apply-architectural-tacticsSkill
- apply-attribute-driven-designSkill
- apply-fundamentals-of-data-visualizationSkill
- apply-oopsi-modelSkill
- apply-screenplay-patternSkill
- apply-specification-by-exampleSkill
- blog-topic-discoverSkill
- build-agent-memory-systemsSkill
- build-business-objectives-modelSkill
- build-data-dictionarySkill
- build-feature-treeSkill
- comment-alive-test-driven-developmentSkill
- conduct-event-stormingSkill
- create-ecosystem-mapSkill
- create-living-documentationSkill
- create-skill-from-bookSkill
- CREATING-SKILL-TEMPLATESkill
- define-architectural-driversSkill
- define-bounded-contextsSkill
- define-ubiquitous-languageSkill
- design-agentic-screenplay-modelSkill
- design-agent-perception-layersSkill
- design-agent-planningSkill
- design-agent-reward-functionsSkill
- design-agents-using-patternsSkill
- design-architecture-viewpointsSkill
- design-autonomous-ai-interfacesSkill
- design-ddd-aggregatesSkill
- design-tool-use-sandboxingSkill
- document-architectural-decisionsSkill
- document-legacy-codebaseSkill
- doc-with-usage-exampleSkill
- draft-srs-documentSkill
- elicit-requirements-modelsSkill
- evolve-skill-with-wikiSkill
- extract-business-rulesSkill
- facilitate-example-mappingSkill
- facilitate-user-story-mappingSkill
- implement-agent-observabilitySkill
- implement-agent-reflectionSkill
- improve-existing-skillSkill
- improve-user-storySkill
- managing-ai-projectsSkill
- orchestrate-multi-agent-collaborationSkill
- prioritize-requirementsSkill
- review-c4-modelSkill
- review-data-engineeringSkill
- save-as-skillSkill
- scaffold-cmake-cxx-sanitize-gtest-envSkill
- skill-commonSkill
- task-commit-triggerSkill
- test-case-with-readmeSkill
- test-driven-developmentSkill
- UnitTesting-convert2CaTDDSkill
- update-my-resumeSkill
- update-spec-contextSkill
- validate-requirements-criteriaSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 17 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter …
- Very specific: line 28
Do not use this skill for a narrow unit test without a user-facing workflow.
- Very specific: line 31
Start from the project's user-facing docs, especially README_UserGuide.md, README_UserStories.md, API docs, CLI docs, or equivalent files.
- Very specific: line 32
Place the generated demo package in the repository's existing demo/test/example location.
- Very specific: line 33
Use bundled templates from this skill's assets/ directory as starting points, then adapt them to the target project and language.
- Distinctive: line 77
Transfer Check: Verify the workflow still works for automated demos, manual-first demos, and intentionally blocked or RED demos when …
- Distinctive: line 78
Stop Rule: If the documented workflow, linked acceptance criteria, or implemented behavior is too unclear to demonstrate faithfully, stop …
- Distinctive: line 81
Do not invent CLI flags, files, outputs, or product behavior.
- Distinctive: line 82
Do not treat a UserGuide-only usage example as sufficient when UserStories/AC exist.
- Distinctive: line 83
Keep the demo small and deterministic.
- Distinctive: line 86
Keep generated outputs out of source control unless they are intentionally checked-in expected fixtures.
- Distinctive: line 87
If the feature is not implemented yet, create a planned demo package and mark the executable test as RED or blocked instead of pretending …
- Distinctive: line 90
If anything is unclear, missing, or conflicting, stop and ask the user before proceeding.
- Distinctive: line 94
Read the relevant UserGuide, README, and UserStories completely enough to understand the intended workflow and requirement intent.
- Very specific: line 102
Follow the project's existing test or example layout.
- Very specific: line 111
Create fixtures/ for demo inputs and expected/ for expected outputs or comparison data.
- Very specific: line 117
Use set -euo pipefail, derive paths from the script location, and print concise status messages.
- Very specific: line 118
Avoid hard-coded absolute paths.
- Distinctive: line 121
Use the repository's existing test framework and language when available.
- Distinctive: line 123
Verify user-visible outputs, not private implementation details.
- Distinctive: line 124
Keep the demo broad but shallow.
- Distinctive: line 125
If automation is not practical, write the test spec and manual verification path clearly, and mark the status as manual-only.
- Very specific: line 128
Run SETUP.sh, RUN.sh, and the demo test when possible.
- Distinctive: line 129
Run this skill's validator when a generated demo directory exists:
- Very specific: line 136
Update the demo status in README.md, ManualInstruction.md, and demo_manifest.json.
- Very specific: line 159
Verify the skill frontmatter has name: test-case-with-demo and a quoted description.
- Very specific: line 160
Verify the generated demo contains README.md, ManualInstruction.md, SETUP.sh, RUN.sh, CLEANUP.sh, and demo_manifest.json.
- Very specific: line 161
Verify ManualInstruction.md contains Purpose, Prerequisites, Setup, Run, Expected Result, Troubleshooting, Cleanup, and Evidence sections.
- Distinctive: line 162
Verify the demo maps to real UserGuide sections, User Story IDs, and AC IDs when available.
- Distinctive: line 163
Run the generated scripts and automated test when possible.
≈ “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
Test Case with Demo
Common Contract (Load First)
When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter rules, anti-pattern guidance, and the Review In Mind loop in review-in-mind. This skill adds only domain-specific rules below.
Who
Developers, QA engineers, documentation maintainers, or agents who need a demo-style test case that teaches a real user workflow while still being verifiable.
What
Create a self-contained demo test package for one UserGuide workflow and its matching UserStories/acceptance criteria. The package demonstrates how a user sets up inputs, runs the feature, observes expected outputs, and cleans up afterward. It should include setup and run scripts, ManualInstruction.md, traceability back to the UserGuide, UserStories, and acceptance criteria, fixture data, expected artifacts, and at least one runnable check when the project has a test framework.
Demo tests are P4 Addons: they are for documentation, onboarding, and workflow verification. They complement but do not replace focused P1/P2/P3 automated tests that prove individual acceptance criteria.
When
- The user asks for a "demo test case", "example test", "manual demo", "UserGuide demo", "test-case-with-demo", or "setup script plus ManualInstruction".
- A feature already has a UserGuide or README workflow and needs a runnable example showing how to use it.
- A CLI, API, or workflow is hard to understand from unit tests alone and needs an end-to-end demonstration.
- A fork or sample implementation needs a lightweight proof that it satisfies a visible UserGuide path and the related UserStories/AC scenarios.
- Do not use this skill for a narrow unit test without a user-facing workflow. Use
test-case-with-readmeor regular TDD instead.
Where
- Start from the project's user-facing docs, especially
README_UserGuide.md,README_UserStories.md, API docs, CLI docs, or equivalent files. Treat UserGuide and UserStories as paired sources when both exist. - Place the generated demo package in the repository's existing demo/test/example location. If no convention exists, use
tests/demo/<demo-name>/. - Use bundled templates from this skill's
assets/directory as starting points, then adapt them to the target project and language.
Why
- A demo test makes the UserGuide executable enough that future maintainers can verify it still works.
- Setup scripts remove hidden prerequisites and make the workflow repeatable.
- Manual instructions help humans reproduce the same behavior when automation fails or when the demo is part of onboarding.
- Traceability prevents examples from drifting away from UserGuide behavior, user stories, and acceptance criteria.
Inputs
- Required: the UserGuide or workflow documentation to demonstrate.
- Required when available: matching UserStories and acceptance criteria for the workflow.
- Required: the feature, command, API, or workflow name.
- Recommended: related user stories or acceptance criteria.
- Recommended: existing test framework, fixture conventions, and project setup commands.
- Optional: target demo name, preferred output folder, platform constraints, and whether the demo should be fully automated or manual-first.
Output (Logical Evidence)
A demo package, normally shaped like:
tests/demo/<demo-name>/ README.md ManualInstruction.md SETUP.sh RUN.sh CLEANUP.sh demo_manifest.json fixtures/ expected/ outputs/ # generated, ignored or cleaned when appropriate test_<demo_name>.<ext>- A traceability section linking the demo to UserGuide sections, User Story IDs, and AC IDs when available.
- Idempotent setup/run/cleanup scripts that work from a clean checkout.
- Manual instructions with prerequisites, setup, run, expected result, troubleshooting, cleanup, and evidence to capture.
- Validation evidence showing which scripts or tests were run.
Optimization Readiness
- Failure Signals: The demo invents behavior not supported by the implementation, traceability to UserGuide or acceptance criteria is missing, scripts are non-idempotent, or the package cannot be reproduced from a clean checkout.
- Evidence To Collect: Demo manifests, setup and run logs, traceability mappings, manual-instruction drafts, and examples where the demo matched or drifted from the documented workflow.
- Safe Mutation Boundaries: Refine package structure, traceability rules, script guidance, and manual-instruction templates without changing the core requirement to prove real user-visible workflows reproducibly.
- Acceptance Criteria: Accept revisions only if the demo package stays deterministic, maps to real UserGuide and story evidence, runs from a clean environment, and remains understandable without the original conversation.
- Rejected Revision Handling: Record invented workflow steps, brittle script patterns, and traceability gaps so they are not repeated.
- Transfer Check: Verify the workflow still works for automated demos, manual-first demos, and intentionally blocked or RED demos when implementation is incomplete.
- Stop Rule: If the documented workflow, linked acceptance criteria, or implemented behavior is too unclear to demonstrate faithfully, stop and ask before generating the demo package.
Constraints (Logical Boundaries)
- Do not invent CLI flags, files, outputs, or product behavior. Read the UserGuide, UserStories, and existing implementation before writing the demo.
- Do not treat a UserGuide-only usage example as sufficient when UserStories/AC exist. The demo must show both how to use the workflow and which user-facing requirement it satisfies.
- Keep the demo small and deterministic. Prefer local fixture repositories, sample JSON, temporary directories, and generated outputs over network dependencies.
- Scripts must be idempotent, fail fast, and avoid destructive actions outside the demo directory or explicitly configured temp directory.
ManualInstruction.mdmust be understandable without reading the agent conversation.- Keep generated outputs out of source control unless they are intentionally checked-in expected fixtures.
- If the feature is not implemented yet, create a planned demo package and mark the executable test as RED or blocked instead of pretending it passes.
One More Thing
If anything is unclear, missing, or conflicting, stop and ask the user before proceeding.
How (Structural Workflow)
Phase 1: Read the User Workflow
- Read the relevant UserGuide, README, and UserStories completely enough to understand the intended workflow and requirement intent.
- Extract the exact user-visible command, API call, input files, output files, and success criteria from the UserGuide.
- Extract the matching AS A / I WANT / SO THAT story and GIVEN / WHEN / THEN acceptance criteria from the UserStories.
- Identify the smallest demo scenario that proves both the workflow and the matching story/AC. Prefer a happy-path demo first, then add edge demos only if the UserGuide or UserStories require them.
- Record traceability: UserGuide section names, user story IDs, AC IDs, and any protocol or contract files involved.
Phase 2: Design the Demo Package
- Choose a clear demo name such as
aggregate-core-metrics-demoorcli-basic-usage-demo. - Follow the project's existing test or example layout. If none exists, create
tests/demo/<demo-name>/. - Copy or adapt these bundled templates:
assets/README.template.mdtoREADME.md.assets/ManualInstruction.template.mdtoManualInstruction.md.assets/SETUP.template.shtoSETUP.sh.assets/RUN.template.shtoRUN.sh.assets/CLEANUP.template.shtoCLEANUP.sh.assets/demo_manifest.template.jsontodemo_manifest.json.assets/test_case.template.mdas the design source for the automated demo test.
- Create
fixtures/for demo inputs andexpected/for expected outputs or comparison data.
Phase 3: Build Repeatable Scripts
- Make
SETUP.shcreate or copy everything needed for the demo into a local work directory. - Make
RUN.shexecute the user-facing workflow exactly as the UserGuide describes it. - Make
CLEANUP.shremove temporary work without deleting checked-in fixtures or expected results. - Use
set -euo pipefail, derive paths from the script location, and print concise status messages. - Avoid hard-coded absolute paths. If a tool path is needed, accept it through an environment variable and document it in
ManualInstruction.md.
Phase 4: Write the Demo Test
- Use the repository's existing test framework and language when available.
- Structure the test around SETUP -> BEHAVIOR -> VERIFY -> CLEANUP.
- Verify user-visible outputs, not private implementation details.
- Keep the demo broad but shallow. It should prove the workflow from a user's perspective, not exhaust every branch.
- If automation is not practical, write the test spec and manual verification path clearly, and mark the status as manual-only.
Phase 5: Validate and Report
- Run
SETUP.sh,RUN.sh, and the demo test when possible. Run this skill's validator when a generated demo directory exists:
python3 .github/skills/test-case-with-demo/scripts/check_demo_case.py tests/demo/<demo-name>- Compare actual outputs with
expected/, the UserGuide's output contract, and the linked UserStories/AC expected outcomes. - Update the demo status in
README.md,ManualInstruction.md, anddemo_manifest.json. - Report what was created, which UserGuide path and UserStories/AC it demonstrates, and which commands/tests were run.
Resources
assets/README.template.md- demo package README template.assets/ManualInstruction.template.md- manual runbook template.assets/SETUP.template.sh- setup script template.assets/RUN.template.sh- run script template.assets/CLEANUP.template.sh- cleanup script template.assets/demo_manifest.template.json- traceability manifest template.assets/test_case.template.md- demo test design template.scripts/check_demo_case.py- lightweight validator for generated demo packages.
Review In Mind (ReviewInMindGenie)
Execute the common review loop in review-in-mind before delivering.
Review lens for this skill:
- Does the demo package include setup/run scripts, ManualInstruction, fixtures, expected artifacts, and a runnable check?
- Is traceability to the UserGuide, UserStories, and acceptance criteria complete?
- Would a new user succeed by following the demo without hidden steps?
Validation
- Verify the skill frontmatter has
name: test-case-with-demoand a quoteddescription. - Verify the generated demo contains
README.md,ManualInstruction.md,SETUP.sh,RUN.sh,CLEANUP.sh, anddemo_manifest.json. - Verify
ManualInstruction.mdcontains Purpose, Prerequisites, Setup, Run, Expected Result, Troubleshooting, Cleanup, and Evidence sections. - Verify the demo maps to real UserGuide sections, User Story IDs, and AC IDs when available.
- Run the generated scripts and automated test when possible. If not possible, record exactly what blocked execution.
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.

