test-runner
Skill28 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 -…
19 other projects use a version of this.
Adopted by
Most recently taken up by
- Kanevry/session-orchestratortheir own version, first seen Nov 24, 2026
- d-o-hub/github-template-ai-agentstheir own version, first seen Nov 3, 2026
- claude-world/director-mode-litetheir own version, first seen Nov 1, 2026
- EffortlessMetrics/demo-swarmtheir own version, first seen Oct 17, 2026
- Mushfiqur-Rahman-Robin/coding-rulestheir own version, first seen Oct 13, 2026
- wanhaoli376-lab/AgentForgetheir own version, first seen Oct 11, 2026
Used with
Projects with it also use error-handling, code-reviewer and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 3 projects that use this
GoogleSkillcode-reviewer
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
SentrySkillskill-creator
Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.
Also in 3 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- openreview/openreview-py★ 274same name
- EmeaAppGbb/spec2cloud★ 103same name
- claude-world/director-mode-lite★ 80same name
- Kanevry/session-orchestrator★ 53same name
- amanning3390/hermeshub★ 48same name
- Azure/sap-automation-qa★ 14same name
- leszekgruchala/buddy★ 6same name
- AskExe/exe-build-skills★ 4same name
- crgarcia12/Liliput★ 4same name
- d-o-hub/github-template-ai-agents★ 2same name
9 more not listed
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 repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
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 18 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 18 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.

