contract-authoring

Validate and create contract.toml files for app, policies, serve, smash, profiles, transports.

2|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/heyAyushh/hook --skill contract-authoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-authoring
Source: https://github.com/heyAyushh/hook/tree/main/skills/contract-authoring
Command: npx skills add https://github.com/heyAyushh/hook --skill contract-authoring

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps authors write, validate, and debug hook contract.toml files by translating intent into a correct, secure runtime contract and surfacing deterministic validation errors before runtime.

Core Features & Use Cases

  • Comprehensive schema guidance: Documents the top-level sections including app, policies, serve, smash, profiles, and transports.
  • Validation and diagnostics: Explains deny_unknown_fields behavior, required keys, empty-value checks, and maps validation failures to specific error codes.
  • Adapter, route, and driver checks: Covers ingress/egress driver configurations, profile activation rules, inactive destinations, and transport references for mcp_tool_output.
  • Plugin and discovery guidance: Describes plugin ordering, contract discovery precedence, minimal working examples, and common troubleshooting scenarios.
  • Use cases include creating a new app contract, extending existing profiles, CI preflight validation, and diagnosing contract validation failures.

Quick Start

Paste your contract.toml and ask the assistant to validate it, list validation errors with codes, and propose exact fixes.

Frequently Asked Questions about contract-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a hook contract.toml file for missing references and unknown keys?

To validate a hook contract.toml, paste the file content to enforce schema rules, detect unknown keys, and surface missing references with deterministic error codes before runtime execution.

What does deny_unknown_fields do when validating contract.toml schemas?

The deny_unknown_fields rule enforces strict schema validation by rejecting unrecognized keys in top-level sections like app, policies, serve, smash, profiles, and transports, preventing silent configuration drift.

How do I configure ingress and egress drivers in a contract.toml file?

Configure ingress and egress drivers within the transports section of contract.toml, ensuring correct adapter usage, validating driver support, and checking inactive destinations and mcp_tool_output references.

How do I fix contract.toml validation errors in a CI preflight workflow?

Fix contract.toml validation errors in CI by mapping reported error codes to specific schema violations, applying exact proposed corrections, and re-running preflight checks to ensure semantic correctness.

Can I use profile activation rules to extend existing app contracts?

Yes, you can extend existing app contracts by defining profile activation rules within the profiles section, validating transport references, and ensuring plugin ordering aligns with contract discovery precedence.