← 返回 Skills 市场
superworldsavior

Ax Development

作者 Erwan Lee Pesle · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
267
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ax-development
功能描述
Agent Experience (AX) development framework. Apply when building libraries, CLIs, APIs, or any software that will be consumed by AI agents — not just humans....
使用说明 (SKILL.md)

AX Development — Agent Experience Framework

Software is increasingly consumed by AI agents, not just humans. AX (Agent Experience) is the discipline of designing code, APIs, and interfaces that agents can operate reliably and autonomously.

The 8 Principles

1. Fast Fail Early

Reject invalid inputs before expensive operations. Validate at the boundary, not deep in the call stack.

// ✅ Validate sync rules before building composite
const errors = validateSyncRules(rules, knownSources);
if (errors.length > 0) throw new AXError("INVALID_SYNC_RULES", errors);

// ❌ Discover invalid rule during HTML rendering

2. Deterministic Outputs

Same inputs → same outputs. No wall-clock dependencies, no random IDs in deterministic paths, no hidden state mutations.

// ✅ Pure function, predictable
function buildDescriptor(resources, orchestration) { ... }

// ❌ Result depends on Date.now() or Math.random() silently

When non-determinism is necessary (UUIDs, timestamps), isolate it and make it injectable.

3. Machine-Readable Errors

Structured errors with codes, not just string messages. Agents parse error codes, not prose.

// ✅ Structured, parseable
{ code: "ORPHAN_SYNC_TARGET", target: "viz:render", available: ["postgres:query"] }

// ❌ Just a string
throw new Error("Target not found in resources");

4. Explicit Over Implicit

No magic defaults that silently change behavior. Every configuration has a visible default. No hidden heuristics.

// ✅ Default is explicit and documented
function render(descriptor, { theme = "auto" } = {}) { ... }

// ❌ Silently detects theme from environment variable

5. Composable Primitives

Each function does one thing. Pipeline steps are independent and recombinable. Agents can use each step separately.

Collector → Composer → Renderer  // Full pipeline
Collector → custom logic → Renderer  // Agent skips composer

6. Narrow Contracts

Minimal required inputs, maximal type safety. Accept only what you need. Return only what's useful. Avoid God objects.

// ✅ Takes exactly what it needs
function resolveSyncRules(rules: UiSyncRule[], sources: string[]): ResolvedSyncRule[]

// ❌ Takes the entire config object when it only needs two fields
function resolveSyncRules(config: FullAppConfig): ResolvedSyncRule[]

7. Co-located Documentation

Docs live next to the code they describe. Each module has its own contract. Agents find docs by exploring the file tree, not by searching a wiki.

src/sync/
├── mod.ts           # Public exports
├── resolver.ts      # Implementation
├── resolver_test.ts # Tests ARE documentation
└── contract.md      # I/O contract, invariants (optional, for complex modules)

8. Test-First Invariants

Every behavior has a test. Tests are the executable specification that agents read to understand contracts. Prioritize boundary tests over happy-path.

// Test the edges, not just the middle
Deno.test("empty resources → empty descriptor", ...);
Deno.test("orphan sync target → validation error", ...);
Deno.test("broadcast rule → resolves to all-except-sender", ...);

Applying AX — Decision Checklist

Before shipping any module, verify:

  • Can an agent call this function with zero ambient knowledge?
  • Are all errors machine-parseable (code + structured data)?
  • Does the output change if I run it twice with same inputs?
  • Is there any implicit behavior not visible in the function signature?
  • Can I use this module without importing unrelated modules?
  • Do the tests cover invalid/edge inputs, not just happy paths?
  • Is there documentation within 1 directory level of the code?
  • Would an agent need to read source code to understand the contract, or are types + tests sufficient?

CLI Contracts (for CLI tools)

When building CLIs that agents will invoke:

  • Default to machine-readable output (JSON/JSONL), human-readable opt-in via --human
  • Include stable keys in output (not just pretty-printed text)
  • Use exit codes consistently (0 = success, 1 = user error, 2 = system error)
  • Version output format — breaking changes to JSON structure need a flag or migration path
  • Prefer explicit flags over positional arguments for agent discoverability

See references/cli-contracts.md for detailed patterns.

Error Taxonomy

Standard error code prefixes for AX-compliant projects:

Prefix Domain Example
INVALID_* Input validation INVALID_SYNC_RULES
MISSING_* Required data absent MISSING_RESOURCE_URI
ORPHAN_* Reference to non-existent entity ORPHAN_SYNC_TARGET
CONFLICT_* Contradictory configuration CONFLICT_LAYOUT_CHILDREN
UNSUPPORTED_* Valid but not implemented UNSUPPORTED_LAYOUT

Adopt this taxonomy or define your own — the point is consistency within a project.

安全使用建议
This skill is an instruction-only AX development guide and appears coherent with its stated purpose. It does not request credentials or install code, so it is low-risk to add. Before adopting it as policy, review the content yourself (source and homepage are unknown) to ensure the conventions match your project and security policies. If you allow agents to invoke skills autonomously, be aware this skill is just guidance and cannot itself perform actions — but consider restricting autonomous invocation of other skills that implement these patterns until you've audited them.
功能分析
Type: OpenClaw Skill Name: ax-development Version: 1.0.0 The skill bundle is a purely educational framework and set of architectural guidelines for 'Agent Experience' (AX) development. It contains documentation (SKILL.md and references/cli-contracts.md) outlining best practices for building machine-readable APIs and CLIs, with no executable code, network requests, or instructions that could lead to unauthorized access or data exfiltration.
能力评估
Purpose & Capability
The name/description (Agent Experience framework) aligns with the provided SKILL.md and reference doc: both are developer guidance about deterministic design, machine-readable contracts, CLI patterns, and tests. No unrelated capabilities or secrets are requested.
Instruction Scope
The SKILL.md is purely prescriptive guidance for authors and CLI designers and does not instruct the agent to read or exfiltrate files, call external endpoints, or access environment variables. It suggests best practices (e.g., co-locate docs, JSONL output) but contains no runtime directives that would expand scope beyond documentation.
Install Mechanism
No install spec or code is included; this is instruction-only. Nothing will be written to disk or fetched during install by the skill itself.
Credentials
The skill declares no required environment variables, credentials, or config paths. The guidance references using exit codes/JSONL in CLIs, which does not imply any secret access by the skill itself.
Persistence & Privilege
always is false and model invocation is allowed (the platform default). The skill does not request persistent presence or system-wide changes. No indications it would modify other skills or agent configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ax-development
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ax-development 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of ax-development — an Agent Experience (AX) framework for building agent-friendly software. - Defines 8 core AX principles: fail-fast validation, deterministic outputs, structured errors, explicit defaults, composable primitives, minimal contracts, co-located documentation, test-first invariants. - Provides a practical checklist for making functions, APIs, or CLIs agent-consumable. - Details CLI contract guidelines for agent interaction, including output format, error codes, and versioning. - Introduces a standard error taxonomy for structured, machine-readable error handling. - Includes example patterns and reference file layout for AX-compliant development.
元数据
Slug ax-development
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Ax Development 是什么?

Agent Experience (AX) development framework. Apply when building libraries, CLIs, APIs, or any software that will be consumed by AI agents — not just humans.... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 267 次。

如何安装 Ax Development?

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

Ax Development 是免费的吗?

是的,Ax Development 完全免费(开源免费),可自由下载、安装和使用。

Ax Development 支持哪些平台?

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

谁开发了 Ax Development?

由 Erwan Lee Pesle(@superworldsavior)开发并维护,当前版本 v1.0.0。

💬 留言讨论