Skip to content
Back to skills

Contract

ASecurity

AI Agent Behavioral Contract Testing & Trace Replay. Define, validate, and enforce team behavioral rules as YAML contracts. Provides init, verify, list, trace, and auto-generate from Case Law.

  • 7 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 9, 2026
ai-agentsbashtestingcode-reviewapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add Harmitx7/tribunal-kit --skill contract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contract?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contract
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harmitx7-contract/badge)](https://www.skillsdirectory.com/skills/harmitx7-contract)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: contract
description: AI Agent Behavioral Contract Testing & Trace Replay. Define, validate, and enforce team behavioral rules as YAML contracts. Provides init, verify, list, trace, and auto-generate from Case Law.
tools: Read, Grep, Glob, Bash, Edit, Write
version: 3.0.0
last-updated: 2026-07-30
required-skills:
  - clean-code
  - code-review-checklist
  - data-validation-schemas
scripts-binding:
  - .agent/scripts/security_scan.js
  - .agent/scripts/lint_runner.js
---

# /contract — AI Agent Behavioral Contract Testing & Trace Replay

$ARGUMENTS

---

## Mandatory Pre-Flight Context Inspection

Before running behavioral contract validation, inspect:

1. Active Contracts Directory (`.tribunal/contracts/`) → Verify active `.yaml` rules and severities
2. Target File Scope → Determine modified or targeted files for contract validation
3. Failure Context Snapshots (`.tribunal/traces/`) → Check past captured trace snapshots for context

4. Required Skills → Before executing, load and follow procedural rules from:
   - `clean-code` (.agent/skills/clean-code/SKILL.md): Self-documenting naming, no over-engineering, error handling patterns
   - `code-review-checklist` (.agent/skills/code-review-checklist/SKILL.md): Code quality, security, and best practice review gates
   - `data-validation-schemas` (.agent/skills/data-validation-schemas/SKILL.md): Zod, Pydantic, and input validation schema patterns

---

## When to Use /contract

| Use `/contract` when...                | Move to...                             |
| :------------------------------------- | :------------------------------------- |
| Defining team behavioral rules         | After contract violation → `/fix`      |
| Verifying AI code before merge         | On failure → `tk contract replay <id>` |
| Converting Case Law to permanent rules | After verification → `/deploy`         |

---

## Subcommands Overview

```bash
# Scaffold .tribunal/contracts/ with starter rules
npx tribunal-kit contract init

# Verify all project code against loaded contracts
npx tribunal-kit contract verify

# Verify a single file against contracts
npx tribunal-kit contract verify --file src/api/user.ts

# List active loaded contracts and rules
npx tribunal-kit contract list

# List failure context snapshots
npx tribunal-kit contract trace list

# Replay a failure context trace snapshot in CLI
npx tribunal-kit contract replay <trace_id>

# Auto-generate a contract template from a Case Law entry
npx tribunal-kit contract generate --from-case 14
```

---

## Behavioral Contract Guard

```
❌ Never ignore 'block' severity contract violations before push
❌ Never bypass contract checks without explicit team approval
❌ Always convert repeated Case Law rejections into behavioral contracts
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.