Agent skill
create-tests-for-demo-model
Create tests for Diff Studio demo models
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/create-tests-for-demo-model
SKILL.md
Create Tests for Diff Studio Demo Model
Create tests for a Diff Studio model defined in the TS file at the path specified in the argument.
Instructions
-
Parse input: extract the path to the TS file from the argument. Verify the file exists and has a
.tsextension. -
Read the TS file: open it and locate the single exported object of type
ModelInfo. Note:- The export name (e.g.,
export const myModel: ModelInfo = { ... }). - The
equationsfield of the exported object.
- The export name (e.g.,
-
Extract the file name: derive the base file name (without directory path and without the
.tsextension) from the given path. This will be used as the test case name. -
Update the test file
src/tests/demo-models-tests.ts:a. Add import: at the top of the file (with other imports), add:
import { <exportName> } from '<relative-path-to-ts-file>';
Use the correct relative path from `src/tests/` to the target file (without the `.ts` extension in the import path).
b. Add test case: inside the 'Demo models' category block, add a call to testTemplate (imported from ./test-utils):
testTemplate('<file-name>', <exportName>.equations);
- First argument: string with the TS file name (e.g., `'my-model'`).
- Second argument: the `equations` field of the imported `ModelInfo` object.
c. Placement: add the new test case in alphabetical order relative to existing test cases, or at the end of the 'Demo models' category if ordering is not established.
Example
Given argument: src/demos/acid-base.ts
If the file exports:
export const acidBase: ModelInfo = { equations: `...`, ... };
Then in src/tests/demo-models-tests.ts:
import { acidBase } from '../demos/acid-base';
// ...
testTemplate('acid-base', acidBase.equations);
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?