Skip to content
Back to skills

Principle Boundary Discipline

ASecurity

Boundary discipline. Apply when reviewing or writing validation, error handling or framework adapters.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsrustshellgitapi

Works with

  • cursor
  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add erickb336/sage-stack --skill principle-boundary-discipline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Principle Boundary Discipline?

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

Security grade badge for Principle Boundary Discipline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/erickb336-principle-boundary-discipline/badge)](https://www.skillsdirectory.com/skills/erickb336-principle-boundary-discipline)

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: principle-boundary-discipline
description: "Boundary discipline. Apply when reviewing or writing validation, error handling or framework adapters."
license: MIT
metadata:
  source: "pstack principle-boundary-discipline, MIT, Copyright (c) 2026 Lauren Tan, github.com/cursor/plugins, adapted; checked against pstack 0.15.36 at commit 0bb6f37"
---

<!-- Generated by scripts/build.mjs from the sources; edit the source, then run npm run build. -->

# Boundary discipline

Put validation, type narrowing and error handling at the system's boundaries. Trust internal code. Keep business logic in pure functions; keep the shell thin and mechanical.

**Why.** Scattered validation is noisy, redundant, and gives a false sense of safety. Logic kept out of framework wiring can be tested without the framework.

**What to do.**
- At a boundary (command-line arguments, configuration files, external APIs, network input, files): validate, return errors, handle defensively.
- Inside: typed data, errors propagated, no re-validation. Trust the types.
- Across the boundary: expose domain concepts, not the boundary's private representation. Keep general mechanism inside and special-purpose policy at the edge.

**In practice.** Parse raw data into domain types at the boundary. Do not re-export transport, storage or framework types through the public surface. No redundant nil checks deep in call chains when the boundary already validated. Prompt construction, parsing and scoring are pure transforms.

**Two tests.** "Is this data crossing a boundary right now?" If not, validation is redundant. "Can this be a pure function the shell calls?" If yes, extract it.

As a reviewer, report input that reaches logic unvalidated.

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.