← 返回 Skills 市场
bytesagain3

Assert

作者 bytesagain3 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
166
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install assert
功能描述
Assertion patterns reference — guard clauses, preconditions, invariants, and contract programming. Use when writing defensive code, validating inputs, or imp...
使用说明 (SKILL.md)

Assert — Assertion Patterns Reference

Quick-reference skill for assertion techniques, design-by-contract, and defensive programming patterns.

When to Use

  • Writing precondition checks for function inputs
  • Implementing class invariants and postconditions
  • Choosing between assertions and exceptions
  • Applying design-by-contract methodology
  • Understanding assertion behavior across languages

Commands

intro

scripts/script.sh intro

Overview of assertions — purpose, philosophy, and when to use them vs exceptions.

preconditions

scripts/script.sh preconditions

Precondition patterns: validating inputs, guard clauses, and fail-fast design.

postconditions

scripts/script.sh postconditions

Postcondition patterns: validating outputs and return value contracts.

invariants

scripts/script.sh invariants

Class and loop invariants — maintaining consistent state throughout execution.

languages

scripts/script.sh languages

Assertion syntax and behavior in Python, Java, C, JavaScript, Rust, Go.

contracts

scripts/script.sh contracts

Design-by-contract methodology — Bertrand Meyer's approach and modern implementations.

antipatterns

scripts/script.sh antipatterns

Common assertion mistakes: side effects, catching AssertionError, using in production flow.

strategies

scripts/script.sh strategies

Assertion strategies for different contexts: unit tests, production code, APIs, libraries.

help

scripts/script.sh help

version

scripts/script.sh version

Powered by BytesAgain | bytesagain.com | [email protected]

安全使用建议
This skill appears to be a local, read-only reference implemented as a shell script that prints documentation. If you want maximum assurance, open and inspect scripts/script.sh yourself (it’s included) to verify there are no hidden network calls or commands beyond printing text; otherwise it is reasonable to install and use. Also note that when invoked the agent will run the script locally (normal behavior) — no credentials or external installs are required.
功能分析
Type: OpenClaw Skill Name: assert Version: 1.0.0 The 'assert' skill is a purely educational reference tool providing information on assertion patterns, design-by-contract, and defensive programming. The 'scripts/script.sh' file contains only static text output via heredocs (cat << 'EOF') for various informational commands, and 'SKILL.md' contains standard instructions for an AI agent without any signs of prompt injection or malicious intent.
能力评估
Purpose & Capability
Name/description match the provided content: SKILL.md documents assertion patterns and the included scripts/script.sh prints reference material. No unrelated credentials, binaries, or install steps are requested.
Instruction Scope
Runtime instructions simply invoke scripts/script.sh with a single subcommand (intro, preconditions, etc.). The script prints documentation via here-docs; the SKILL.md does not instruct reading unrelated files, accessing environment secrets, or contacting external endpoints.
Install Mechanism
No install specification; the skill is delivered as an instruction file plus a local shell script. No external downloads, package installs, or archive extraction are requested.
Credentials
The skill declares no required environment variables, credentials, or config paths. The included shell script does not reference credentials or environment secrets in the provided content.
Persistence & Privilege
always is false and the skill does not request elevated or persistent presence. It does not modify other skills or system-wide configuration based on the provided files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install assert
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /assert 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
publish v1.0.0
元数据
Slug assert
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Assert 是什么?

Assertion patterns reference — guard clauses, preconditions, invariants, and contract programming. Use when writing defensive code, validating inputs, or imp... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 166 次。

如何安装 Assert?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install assert」即可一键安装,无需额外配置。

Assert 是免费的吗?

是的,Assert 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Assert 支持哪些平台?

Assert 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Assert?

由 bytesagain3(@bytesagain3)开发并维护,当前版本 v1.0.0。

💬 留言讨论