Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Boundary Contract

ASecurity

Use immediately after task-router routes boundary-contract: required. Before modification, implementation, or verification, declare objective, non-goals, allowed/prohibited surfaces, and stop conditions as a contract; do not execute the work.

15 stars
0 votes
0 copies
0 views
Added 9/28/2026
ai-agentsjavascriptpythongojavashell

Works with

terminal

Security Analysis

A100/100

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add AidALL/ghost-alice --skill boundary-contract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Boundary Contract?

Add the live security badge to your README — it updates automatically with every re-scan.

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

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: boundary-contract
description: "Use immediately after task-router routes boundary-contract: required. Before modification, implementation, or verification, declare objective, non-goals, allowed/prohibited surfaces, and stop conditions as a contract; do not execute the work."
compatibility:
  - "Python 3.11+ standard library"
---

# Boundary Contract

boundary-contract declares the work boundary before implementation, modification, or verification. It does not perform the work itself. Its only job is to state which surfaces are allowed, which surfaces are prohibited, what counts as success, and when the agent must stop.
## Contents

- [When To Use](#when-to-use)
- [Language Contract](#language-contract)
- [Core Rules](#core-rules)
- [Output Schema](#output-schema)
- [Phase Rules](#phase-rules)
  - [discovery](#discovery)
  - [execution](#execution)
  - [verification](#verification)
- [Source Rules](#source-rules)
- [Tool-Checkpoint Link](#tool-checkpoint-link)
- [Exact Protected-File Evidence](#exact-protected-file-evidence)
- [Failure Modes](#failure-modes)


## When To Use

Use this skill immediately when task-router outputs `boundary-contract: required`. task-router decides only whether a boundary is required, and it does not write `allowed-surface`, filenames, or test-purpose. This skill owns `allowed-surface`, filenames, phase, test purpose, and stop conditions.

## Language Contract

Use the current user language for human-readable explanations. Keep field names, enum values, literal tokens, gate schemas, and allowed/forbidden control values in English.

Stable contract phrase: Keep field names in English.

## Core Rules

- Do not modify code or documents while producing the contract.
- Do not guess filenames.
- Do not invent `allowed-surface` entries without evidence.
- If the target surface is unclear, use `phase: discovery`.
- Separate explicit user instructions from inferred decisions.
- Record the terminal objective separately from implementation and investigation means.
- Extract verifiable `acceptance-criteria` from the user intent and locked decisions.
- Acceptance criteria describe the requested outcome, not incidental methods, examples, artifact counts, or verification mechanics unless the user made them requirements.
- Attach a `source` to every criterion.
- Do not present `inferred` criteria as user-explicit instructions.
- Classify tests by the risk they reduce, not by whether they feel convenient.
- Always include `stop-conditions`.
- Do not perform execution under a discovery contract.
- If later work needs a surface outside the contract, stop and renew the contract first.
- Do not narrow the committed objective or `allowed-surface` by your own judgment. Covering only a subset ("key spots only", "a representative sample", "the important ones") when the user committed the full surface is a scope-narrowing violation, the mirror image of editing outside the contract.
- Scope changes need renegotiation in both directions. Widening requires stop-and-renew; narrowing requires stop-and-confirm with the user. Never shrink or grow the committed scope silently from the agent's own guess.
- Partial coverage is partial status, not completion. If the full committed scope is not finished, report what remains and do not speak as though the objective is met.
- When the objective is a full set (every file, every occurrence, all targets), record a coverage `acceptance-criteria` (an explicit count or enumerated list). Completion requires the whole set, not a sample.

## Output Schema

```text
[boundary-contract]
- id: <stable-id>
- phase: discovery | execution | verification
- objective: <work-objective>
- explicit-non-goals:
  - <non-goal>
- allowed-surface:
  - <allowed-read-or-write-surface>
- prohibited-surface:
  - <prohibited-file-layer-or-action>
- locked-decisions:
  - <locked-decision> [source: user-explicit | inferred | previous-tool | system-doc | unknown]
- acceptance-criteria:
  - <criterion-id>: <verifiable-condition> [source: user-explicit | inferred | previous-tool | system-doc]
- open-questions:
  - <non-blocking-open-question>
- test-purpose: none | smoke | regression | contract | domain-rule | visual | integration
- stop-conditions:
  - <condition-that-stops-work>
- next-allowed-actions:
  - <allowed-next-action>
```

## Phase Rules

### discovery

Use discovery when filenames, modules, or verification methods are not yet known. Only read-only discovery is allowed. Describe action surfaces such as "inspect project structure" or "identify UI directory candidates"; do not name files unless they have already been established.

### execution

Use execution after discovery identifies the actual files, modules, or contracts to change. Narrow `allowed-surface` to concrete files or directories. If an edit outside the list becomes necessary, stop and renew the contract.

### verification

Use verification after implementation. Separate verification commands, screenshots, visual smoke checks, and prohibited new edits. Keep the original `acceptance-criteria` so completion can map claims to evidence.

## Source Rules

- Assign a source to each atomic proposition. Split combined statements with different origins into separate items; a source label must not carry across mixed origins.
- `user-explicit`: The user directly stated the decision. Actual human approval remains user-explicit.
- `inferred`: The agent is locking a conservative assumption for this phase.
- `previous-tool`: A tool result produced the decision, including observed hook/runtime-generated controls even when transported with `role=user`. A generated approval digest and its preservation requirement have this source; transport role does not turn them into human approval.
- `system-doc`: AGENTS.md, SKILL.md, or policy docs require it.
- `unknown`: The source is unclear. Do not use it as an execution-phase lock.

Keep a user-protected file and a runtime generation separate:

```text
- Preserve protected.txt as the user requested. [source: user-explicit]
- Preserve the hook-provided approval-generation value. [source: previous-tool]
```

## Tool-Checkpoint Link

When a boundary contract is active, each tool checkpoint must include:

```text
- contract-ref: <boundary-contract-id>
- contract-check: <allowed-surface-item | next-allowed-action>
```

If `contract-check` does not map to the contract, do not make the tool call. Renew the contract or ask the user.

## Exact Protected-File Evidence

When an execution contract protects existing files or requires exact modification-time comparisons, use the installed `scripts/file_guard.py` before dependent writes. It captures file content, exact timestamp, identity and mode without writing task files. Resolve the script relative to this loaded skill directory; read its `--help` only if invocation details are needed.

```text
python3 <loaded-skill-directory>/scripts/file_guard.py capture --path <protected-file> [--path <another-protected-file>]
python3 <loaded-skill-directory>/scripts/file_guard.py check --token <unchanged-token-from-capture>
```

`capture` emits JSON containing a string `token` and its `paths`. Keep that token verbatim in current-session tool state and pass it to `check` using the host's structured arguments or proper shell quoting. Do not decode, regenerate or hand-copy its timestamp fields. Do not send nanosecond timestamps or large identity integers through JavaScript `Number`, JSON numeric fields, floating-point seconds or rounded displays. Do not create a replacement numeric baseline when the helper is available.

Capture once before the protected operation. Check immediately before a dependent write, and after the operation when preservation is an acceptance condition. A failed check stops the dependent write; investigate the original baseline instead of replacing it with the current state. If the installed helper is unavailable, keep capture and comparison in one exact-integer process or persist integer fields as strings from their original source. Never recover lost precision by converting an already rounded number to a string.

The guard observes regular files at a point in time; it is not an atomic write lock, authorization token or business-completion proof. It rejects symlink paths and parent traversal (`..`); use the actual absolute file path. It does not cover directory membership. Preserve any additional contract-specific checks separately. A bookkeeping-only recovery does not itself invalidate a completed guard or business check; do not rerun either without a relevant change or contrary evidence.

## Failure Modes

- task-router writes `allowed-surface` directly.
- A discovery contract guesses filenames.
- An `inferred` decision is presented as user-explicit.
- Verification proceeds without `acceptance-criteria`.
- `[completion-check]` omits `claim-evidence-map`.
- Peripheral evidence is treated as direct evidence for a user criterion.
- Work starts without stop conditions.
- A file outside the contract is changed because the edit seems small.
- New implementation is added during verification.
- The agent covers only part of the committed `allowed-surface` ("key spots only", "a representative sample") and speaks as if the objective is complete.
- The committed scope is shrunk silently instead of stopping to confirm, the mirror image of changing a file outside the contract.
- A full-set objective ("all files", "every occurrence") is reported complete after only a subset is done, with no coverage criterion to measure against.

Attribution

AidALLAidALL
View sourceMore from AidALL →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

695601 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →