跳到正文
cccskills
免费在 GitHub 公开

principle-boundary-discipline

Guide validation and error handling toward system boundaries, where external data enters the application. Keep business rules in functions independent of frameworks, use validated types internally, and avoid repeating checks throughout the code.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Apply when wiring validation, error handling, or framework adapters. Concentrate guards at system boundaries (CLI, config, network, external APIs); trust internal types and keep business logic in pure functions.

实测评分 未实测

查看安装方法

适用场景

  • Organizing configuration validation
  • Separating business rules from framework code
  • Reviewing repeated internal checks
  • Designing types for external API data

包含的文件(1)

  • SKILL.md1.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Boundary Discipline

Place validation, type narrowing, and error handling at system boundaries. Trust internal code unconditionally. Business logic lives in pure functions. The shell is thin and mechanical.

Why: Scattered validation is noisy, redundant, and gives a false sense of safety. Keep logic out of framework wiring so it can be tested without the framework.

The pattern:

  • At boundaries (CLI args, config files, external APIs, network protocols): validate, return errors, handle defensively.
  • Inside the system: typed data, error propagation, no re-validation. Trust the types.
  • Across the boundary. Expose domain concepts, not the boundary's private representation. Keep general-purpose mechanism inside and special-purpose policy at the edge.

Applications:

Validation and error handling:

  • Validate config at parse time (the boundary), not inside business logic
  • Parse raw data into domain types at the boundary
  • Do not re-export transport, storage, framework, or wire types through the public surface
  • No redundant nil checks deep in call chains if the boundary already validated

Code organization:

  • Business logic in pure functions with no framework dependencies
  • Parse functions: pure transforms from raw bytes to typed state
  • Prompt construction: structured state in, string out
  • Scoring and assessment: pure transforms from state to results

The tests:

  • "Is this data crossing a system boundary right now?" If not, validation is redundant.
  • "Can this be a pure function that the shell just calls?" If yes, extract it.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

architect

免费

Plan types, function inputs and outputs, and module boundaries before implementation. Compare structurally different designs from multiple AI models, document the chosen approach, and guide coding while tracking changes to the agreed design.

中文简介正在准备中。当前显示英语简介。

  • Designing a complex feature before coding
  • Comparing alternative module structures
  • Keeping implementation aligned with design decisions
michael-denyer/pstack-claude33702026年10月23日 更新

arena

免费

Generate several candidate solutions in parallel, compare them against concrete criteria, and choose a base. Combine useful parts from other candidates, then verify the final artifact and document why each major choice was made.

中文简介正在准备中。当前显示英语简介。

  • Compare multiple designs before choosing a direction
  • Explore different implementations of the same task
  • Combine useful elements from competing drafts
michael-denyer/pstack-claude33702026年10月23日 更新

Turn recurring work habits and communication preferences into a personal agent skill. It combines evidence from workspace conversations with direct questions, then drafts or updates instructions for how agents should work with you.

中文简介正在准备中。当前显示英语简介。

  • Capture preferred response length and tone
  • Document testing and review expectations
  • Update personal instructions as work habits change
michael-denyer/pstack-claude33702026年10月23日 更新

babysit

免费

Monitor an open pull request, fix failing automated checks and merge conflicts, and address straightforward review feedback. Recheck after updates, report the resulting status, and hand decisions requiring design judgment back to the user.

中文简介正在准备中。当前显示英语简介。

  • Following up on an open PR without repeated prompts
  • Fixing failed automated checks and rechecking results
  • Addressing straightforward review comments
michael-denyer/pstack-claude33702026年10月23日 更新

Checks whether performance measurements support a speedup, slowdown, or technology choice. It examines bottlenecks, production settings, errors, repeatability, and completed work, then guides reporting with run counts, ranges, and a clear verdict.

中文简介正在准备中。当前显示英语简介。

  • Checking before-and-after performance claims in a PR
  • Comparing libraries or configurations fairly
  • Investigating suspicious benchmark results
michael-denyer/pstack-claude33702026年10月23日 更新

Investigate what a code change could break beyond the edited files. Trace downstream effects, identify the key assumption behind its safety, and test that assumption with real code while clearly reporting unresolved risks.

中文简介正在准备中。当前显示英语简介。

  • Checking the wider impact of a small code change
  • Verifying assumptions about existing code before design
  • Testing the safety assumption before merging a change
michael-denyer/pstack-claude33702026年10月23日 更新

查看 michael-denyer 的全部技能

报告此技能的问题