test-runner
Skill29 starsChanged 9 months agoMITView on GitHub
Orchestrate automated functional tests for Subcog MCP tools. Validates all documented functionality against expected behavior. Key Behaviors: - Tests execute ONE AT A TIME for clear validation - Each test waits for user confirmation ("next") before proceeding - Failed tests are logged but don't block subsequent tests - Variables saved from tests are substituted in dependent tests </strategy> 3. Initialize State Write to .claude/test-state.json: For each test: 3. Validate Response For each expect rule: - contains: Check substring presence -…
8 other projects use a version of this.
Adopted by
Most recently taken up by
- mekiki-io/mekiki-open-skillstheir own version, first seen Sep 30, 2026
- caseyng/Claude-skillstheir own version, first seen May 22, 2026
- eugeniosegala/claude-connoisseurtheir own version, first seen Apr 9, 2026
- shivae372/claude-bootstraptheir own version, first seen Apr 8, 2026
- AskExe/exe-build-skillstheir own version, first seen Mar 17, 2026
- claude-world/director-mode-litetheir own version, first seen Mar 13, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- claude-world/director-mode-lite★ 80same name
- Azure/sap-automation-qa★ 14same name
- eugeniosegala/claude-connoisseur★ 9same name
- AskExe/exe-build-skills★ 4same name
- caseyng/Claude-skills★ 1same name
- shivae372/claude-bootstrap★ 1same name
- EffortlessMetrics/demo-swarm★ 0same name
- mekiki-io/mekiki-open-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- memory-captureSkill
- memory-recallSkill
- subcog-integratorSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
1
Distinctive
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 118
If test has save_as and passes:
- Distinctive: line 220
not_contains: Ensure string is absent
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Subcog Test Runner Skill
Orchestrate automated functional tests for Subcog MCP tools. Validates all documented functionality against expected behavior.
Trigger Phrases
- "run subcog tests", "test subcog", "/run-tests"
- "validate subcog functionality", "functional tests"
- "run automated tests", "execute test suite"
Quick Reference
| Mode | What It Does | Trigger |
| Full | Run all tests | /run-tests |
| Category | Run specific category | /run-tests --category crud |
| Tag | Run tests with tag | /run-tests --tag critical |
| Dry-run | Show tests without running | /run-tests --dry-run |
Execution Strategy
<strategy>
**Sequential Test Execution:**
1. Load test definitions from `tests/functional/tests.yaml`
2. Initialize state tracking in `.claude/test-state.json`
3. For each test:
- Execute the action (MCP tool call)
- Capture the response
- Validate against expect rules
- Record result and continue
4. Generate final reportKey Behaviors:
- Tests execute ONE AT A TIME for clear validation
- Each test waits for user confirmation ("next") before proceeding
- Failed tests are logged but don't block subsequent tests
- Variables saved from tests are substituted in dependent tests
</strategy>
Workflow
<workflow>
When invoked:Phase 1: Initialization
- Verify Environment
Call subcog_status to verify MCP server is running - Load Test Suite
- Read
tests/functional/tests.yaml - Parse test definitions
- Build dependency graph
- Filter by category/tag if specified
- Read
- Initialize State
Write to
.claude/test-state.json:{ "mode": "running", "total_tests": 50, "current_index": 0, "current_test": null, "results": [], "saved_vars": {}, "started_at": "2024-01-20T12:00:00Z" } - Show Test Plan
# Subcog Functional Test Suite Total tests: 50 Categories: initialization (4), crud (10), search (6), ... Type 'next' to begin, 'skip' to skip a test, 'abort' to stop.
Phase 2: Test Execution Loop
For each test:
- Present Test
## Test 5/50: capture_decision Category: crud Description: Capture a decision memory Action: > Call subcog_capture with: > content: "TEST_DECISION: Use YAML for test definitions" > namespace: "decisions" > tags: ["test", "automated", "cleanup-required"] Expected: - Response contains "memory_id" - Response matches regex "[a-f0-9]{12}" Type 'next' to execute... - Execute Test Action
- Perform the MCP tool call
- Capture full response
Validate Response For each expect rule:
contains: Check substring presencenot_contains: Check substring absenceregex: Check pattern match
Mark test as PASS or FAIL
- Save Variables
If test has
save_asand passes:- Extract value (memory_id, entity_id, etc.)
- Store in
saved_varsfor dependent tests
- Record Result
{ "id": "capture_decision", "status": "pass", "duration_ms": 234, "saved": {"captured_decision_id": "abc123def456"} } - Show Result
✅ PASS: capture_decision (234ms) Saved: captured_decision_id = abc123def456 Progress: 5/50 (10%) Type 'next' to continue...
Phase 3: Report Generation
After all tests:
- Generate Summary
# Test Results Summary Total: 50 | Passed: 47 | Failed: 2 | Skipped: 1 Duration: 3m 24s ## Failed Tests 1. [FAIL] entity_extract Expected: regex "(Alice|Anthropic)" Actual: "LLM features disabled" 2. [FAIL] relationship_infer Expected: contains "inferred" Actual: timeout after 30s ## Results by Category | Category | Pass | Fail | Skip | |----------|------|------|------| | initialization | 4 | 0 | 0 | | crud | 10 | 0 | 0 | | entities | 4 | 1 | 0 | ... - Write Report
Save to
tests/functional/report.md - Cleanup Status
Report if cleanup tests ran successfully
</workflow>
State File Schema
<state>
`.claude/test-state.json`:
```json
{
"mode": "running|paused|complete|aborted",
"total_tests": 50,
"current_index": 5,
"current_test": {
"id": "capture_decision",
"started_at": "2024-01-20T12:01:00Z"
},
"results": [
{
"id": "init_basic",
"status": "pass|fail|skip",
"duration_ms": 150,
"error": null,
"saved": {}
}
],
"saved_vars": {
"captured_decision_id": "abc123def456",
"test_person_id": "entity_xyz789"
},
"started_at": "2024-01-20T12:00:00Z",
"completed_at": null
}
```
</state>Validation Rules
<validation>
**contains**: Case-sensitive substring match
```yaml
expect:
- contains: "memory_id"
```not_contains: Ensure string is absent
expect:
- not_contains: "error"regex: Perl-compatible regex match
expect:
- regex: "[a-f0-9]{12}"
- regex: "(pass|success|created)"All rules must pass for test to succeed.
</validation>
Variable Substitution
<variables>
Tests can reference saved variables:
```yaml
- id: get_memory
action: "Call subcog_get with memory_id: '${captured_decision_id}'"
depends_on: capture_decision
```Variables are extracted from tool responses:
memory_idfrom capture resultsentity_idfrom entity creation- Custom patterns via regex capture groups
</variables>
Commands During Test Run
| Command | Action |
next / n | Execute current test and proceed |
skip / s | Skip current test |
retry / r | Re-run last failed test |
abort / a | Stop testing, generate report |
status | Show progress summary |
report | Show results so far |
vars | Show saved variables |
MCP Tool Reference
<mcp>
**All Subcog MCP tools** are tested. Key ones:subcog_init- Session initializationsubcog_capture- Memory creationsubcog_recall- Memory searchsubcog_get/subcog_update/subcog_delete- CRUDsubcog_entities- Knowledge graph entitiessubcog_relationships- Entity relationshipssubcog_graph- Graph operationssubcog_prompts- Prompt templatessubcog_templates- Context templatessubcog_consolidate- Memory consolidationsubcog_gdpr_export- Privacy compliance
Other Tools:
Read- Load test definitionsWrite- Save state and reportsBash- Auxiliary operations</mcp>
Example Session
User: /run-tests --category crudDoes 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.

