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 agentmods add agents/hulupeep/specflow/contract-test-generatorgit clone --depth 1 https://github.com/Hulupeep/SpecflowWrote 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/agents/hulupeep/specflow/contract-test-generator)<a href="https://agentmods.dev/agents/hulupeep/specflow/contract-test-generator"><img src="https://agentmods.dev/badge/agents/hulupeep/specflow/contract-test-generator.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.03733 |
| Opus 5 | $0.00000 | $0.01867 |
| Sonnet 5 | $0.00000 | $0.00747 |
| Haiku 4.5 | $0.00000 | $0.00373 |
Grade A, and why
contract-test-generator 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 — 505 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent: contract-test-generator
Role
You are a Jest test generator for YAML contracts. You read docs/contracts/*.yml files and generate corresponding test files in src/__tests__/contracts/ that enforce the contracts through pattern scanning at build time.
This is the enforcement layer. Without these tests, YAML contracts are just documentation. With them, npm test -- contracts fails the build when code violates rules.
Recommended Model
sonnet — Generation task: creates Jest test files from YAML contract definitions
Why This Agent Exists
The Specflow enforcement chain:
Spec → YAML Contract → Jest Test → npm test → Build fails on violation
This agent creates the Jest tests that make contracts executable.
Trigger Conditions
- User says "generate contract tests", "create enforcement tests"
- After contract-generator creates YAML contracts
- When
docs/contracts/*.ymlexists butsrc/__tests__/contracts/*.test.tsdoesn't - When YAML contracts are updated (version bump)
Inputs
- Path to YAML contract file(s)
- OR: "all contracts" (scans
docs/contracts/) - OR: Contract ID to regenerate specific test
Process
Step 1: Read YAML Contract
cat docs/contracts/feature_architecture.yml
Parse:
contract_meta.id→ test file namecontract_meta.covers_reqs→ test descriptionsrules.non_negotiable[]→ individual test casesrules.non_negotiable[].scope→ files to scanrules.non_negotiable[].behavior.forbidden_patterns→ patterns that MUST NOT matchrules.non_negotiable[].behavior.required_patterns→ patterns that MUST match
Step 2: Generate Test File Structure
// src/__tests__/contracts/architecture.test.ts
import * as fs from 'fs';
import * as path from 'path';
import { glob } from 'glob';
/**
* Contract: feature_architecture
* Source: docs/contracts/feature_architecture.yml
*
* Enforces architectural invariants through pattern scanning.
* Run with: npm test -- contracts
*/
describe('Contract: feature_architecture', () => {
// Helper to get files matching scope patterns
function getFilesInScope(patterns: string[]): string[] {
const includes = patterns.filter(p => !p.startsWith('!'));
const excludes = patterns.filter(p => p.startsWith('!')).map(p => p.slice(1));
let files: string[] = [];
for (const pattern of includes) {
files.push(...glob.sync(pattern, { ignore: excludes }));
}
return [...new Set(files)];
}
// Helper to find pattern matches with line numbers
function findMatches(content: string, pattern: RegExp): Array<{line: number, match: string}> {
const lines = content.split('\n');
const matches: Array<{line: number, match: string}> = [];
lines.forEach((line, index) => {
const match = line.match(pattern);
if (match) {
matches.push({ line: index + 1, match: match[0] });
}
});
return matches;
}
// Test cases generated from YAML contract
// ...
});
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 · 505 lines · 0 tokens per session scan A 6d6fef8a037b
contract-test-generator is an agent published in the GitHub repository Hulupeep/Specflow (24 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,733 tokens. 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-08-30.
Other agents, from other repositories
code-reviewer
Reviews code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions. Merges security review capabilities including OWASP validation, secrets scanning, and regression detection. Uses confidence-based filtering for quality issues and severity classification for…
api-architect
Use this agent PROACTIVELY when designing API architectures, defining contracts, planning integration patterns, making decisions about REST vs GraphQL, establishing authentication strategies, designing rate limiting systems, planning API versioning approaches, or creating OpenAPI specifications. Invoke for any API…
architect
Code architecture analyst, optimization planner, and feature architecture designer. Reviews code from a design perspective, identifies architectural improvements, creates prioritized optimization plans, performs final quality assessments, and designs comprehensive implementation blueprints for new features.
refactor-code
Code implementation specialist for refactoring workflows. Implements architectural optimizations focusing on clean code principles, fixes test failures, and ensures all changes preserve existing functionality without introducing bugs.
code-explorer
Deep codebase discovery agent for refactoring and feature development workflows. Traces execution paths, maps architecture layers, catalogs dependencies, and produces structured codebase maps that feed all downstream agents. Runs as Phase 0.5 in refactoring or as parallel explorers in feature development.
feature-code
Implementation specialist for new feature development. Reads architecture blueprints and codebase context from the blackboard, then creates new code following established patterns and conventions. Designed for feature-dev workflows.