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/ai-analyst-lab/ai-analyst/contract_templategit clone --depth 1 https://github.com/ai-analyst-lab/ai-analystWrote 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/ai-analyst-lab/ai-analyst/contract_template)<a href="https://agentmods.dev/agents/ai-analyst-lab/ai-analyst/contract_template"><img src="https://agentmods.dev/badge/agents/ai-analyst-lab/ai-analyst/contract_template.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.02190 |
| Opus 5 | $0.00000 | $0.01095 |
| Sonnet 5 | $0.00000 | $0.00438 |
| Haiku 4.5 | $0.00000 | $0.00219 |
Grade C, and why
CONTRACT_TEMPLATE scanned grade C with 1 finding 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- CONTRACT_START name: agent-name description: One-sentence description of what this agent does. inputs: - name: INPUT_NAME type: str | file | query_result source: user | system | agent:other-agent-name required: true Copies of this mod
1 near-identical copy found in the catalogue:
- CONTRACT_TEMPLATE — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CONTRACT Block Template (OR-1.5)
Purpose
Every agent .md file MUST begin with a CONTRACT block -- a YAML declaration
inside an HTML comment that describes the agent's interface. The OR-3 DAG walker
reads these contracts to build the execution graph.
The CONTRACT block is invisible to the agent at runtime (it is an HTML comment), but it is machine-readable for pipeline orchestration, dependency resolution, and documentation generation.
Format
<!-- CONTRACT_START
name: agent-name
description: One-sentence description of what this agent does.
inputs:
- name: INPUT_NAME
type: str | file | query_result
source: user | system | agent:other-agent-name
required: true | false
- name: ANOTHER_INPUT
type: file
source: agent:upstream-agent
required: true
outputs:
- path: working/output_{{VARIABLE}}.md
type: markdown | csv | json | image
- path: outputs/final_{{DATE}}.md
type: markdown
depends_on:
- upstream-agent-name
pipeline_step: 5
knowledge_context:
- .knowledge/datasets/{active}/schema.md
- .knowledge/datasets/{active}/quirks.md
CONTRACT_END -->
Live Examples
Minimal contract (no dependencies)
From agents/question-framing.md:
<!-- CONTRACT_START
name: question-framing
description: Generate prioritized analytical questions from a business problem, producing a structured question brief with hypotheses and data requirements.
inputs:
- name: BUSINESS_CONTEXT
type: str
source: user
required: true
- name: PRODUCT_DESCRIPTION
type: str
source: user
required: true
- name: AVAILABLE_DATA
type: str
source: user
required: true
outputs:
- path: outputs/question_brief_{{DATE}}.md
type: markdown
depends_on: []
knowledge_context: []
pipeline_step: 1
CONTRACT_END -->
Contract with upstream dependency and knowledge context
From agents/data-explorer.md:
<!-- CONTRACT_START
name: data-explorer
description: Discover what data exists in a source, profile its quality and completeness, identify tracking gaps, and recommend supported analyses.
inputs:
- name: DATA_SOURCE
type: str
source: user
required: true
- name: ANALYSIS_GOALS
type: str
source: user
required: false
outputs:
- path: outputs/data_inventory_{{DATE}}.md
type: markdown
- path: working/data_inventory_raw.md
type: markdown
depends_on: []
knowledge_context:
- .knowledge/datasets/{active}/schema.md
- .knowledge/datasets/{active}/quirks.md
pipeline_step: 4
CONTRACT_END -->
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 · 205 lines · 0 tokens per session scan C 36c5d7099708
CONTRACT_TEMPLATE is an agent published in the GitHub repository ai-analyst-lab/ai-analyst (297 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,190 tokens. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.