Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add jimmc414/claude-code-plugin-marketplace --skill test-structural-invariantsgit clone --depth 1 https://github.com/jimmc414/claude-code-plugin-marketplaceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/test-structural-invariants)<a href="https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/test-structural-invariants"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/test-structural-invariants/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jimmc414/claude-code-plugin-marketplace/test-structural-invariants"><img src="https://agentmods.dev/badge/skills/jimmc414/claude-code-plugin-marketplace/test-structural-invariants.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00027 | $0.00795 |
| Opus 5 | $0.00014 | $0.00398 |
| Sonnet 5 | $0.00005 | $0.00159 |
| Haiku 4.5 | $0.00003 | $0.00080 |
Grade A, and why
test-structural-invariants scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
test-structural-invariants
When to Use
- After building complex data structures
- Verifying precomputed relationships
- Checking initialization is correct
- Invariants that should always hold
When NOT to Use
- Simple data
- No structural constraints
- Runtime performance critical
The Pattern
Assert properties that must be true about your data structures.
# After building structure, verify invariants
def test_structure():
# Size invariants
assert len(items) == EXPECTED_SIZE
# Relationship invariants
assert all(condition(item) for item in items)
# Coverage invariants
assert set(keys) == expected_keys
# Bidirectional relationship
for a, bs in graph.items():
for b in bs:
assert a in graph[b] # Symmetric
Example (from pytudes)
# sudoku.py - Sudoku structure invariants
def test():
"""A set of tests that must pass."""
# Size invariants
assert len(squares) == 81 # 9x9 grid
assert len(unitlist) == 27 # 9 rows + 9 cols + 9 boxes
# Relationship invariants
assert all(len(units[s]) == 3 for s in squares) # Each square in 3 units
assert all(len(peers[s]) == 20 for s in squares) # Each square has 20 peers
# Specific structure verification
assert units['C2'] == [
['A2', 'B2', 'C2', 'D2', 'E2', 'F2', 'G2', 'H2', 'I2'], # Column
['C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9'], # Row
['A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'C1', 'C2', 'C3'] # Box
]
assert peers['C2'] == set([...20 peers...])
print('All tests pass.')
# beal.py - mathematical structure tests
def tests():
assert make_Apowers(6, 10) == {
1: [1],
2: [8, 16, 32, 128],
3: [27, 81, 243, 2187],
...
}
assert make_Czroots(make_Apowers(5, 8)) == {1: 1, 8: 2, 16: 2, ...}
assert 3 ** 3 + 6 ** 3 in Czroots
assert 99 ** 97 in Czroots
assert 101 ** 100 not in Czroots
# spell.py - corpus statistics invariants
def unit_tests():
assert len(WORDS) == 32198
assert sum(WORDS.values()) == 1115585
assert WORDS.most_common(10) == [
('the', 79809), ('of', 40024), ('and', 38312), ...
]
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 93 lines · 27 tokens per session scan A c6b9d71eff7c
test-structural-invariants is a skill published in the GitHub repository jimmc414/claude-code-plugin-marketplace (4 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 795 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
phpunit-migration-test-reviewing
Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.
phpunit-test-adversarial-reviewing
Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.
phpunit-test-team-reviewing
Use this skill when the user asks for a team-based, consensus, multi-reviewer, or red-team review of Shopware PHPUnit tests — trigger phrases like "team review these tests", "consensus review the tests in PR.
phpunit-unit-test-reviewing
Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.
phpunit-integration-to-unit-migrating
Use this skill ONLY when the user explicitly requests an audit, migration, or evaluation of whether a Shopware integration test belongs in the unit suite — trigger phrases like "audit integration tests", "migrate integration tests to unit", "is this an integration test or a unit test", "evaluate integration tests for…
phpunit-unit-test-writing
Use this skill when the user asks to write, generate, create, or add PHPUnit unit tests for a Shopware 6 source class — phrases like "write unit tests for X", "generate tests for ClassName", "create PHPUnit tests", "add test coverage", "test this class", "cover this with tests", "I need tests for", "unit test this"…