← 返回 Skills 市场
snapsynapse

Graceful Boundaries

作者 Sam Rogers · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ✓ 安全检测通过
180
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install graceful-boundaries
功能描述
Assess any API or website's Graceful Boundaries conformance level and provide concrete guidance for reaching the next level. Use this skill when the user ask...
使用说明 (SKILL.md)

Graceful Boundaries Conformance Audit

What This Skill Does

Assesses a URL's Graceful Boundaries conformance level through direct HTTP inspection, then provides a concrete implementation plan for reaching the next level. The output is an actionable document with code examples the user can implement immediately. No special tooling or dependencies required — the skill works with any HTTP client.

When To Use This Skill

  • User provides a URL and asks about its rate limit communication
  • User asks to check Graceful Boundaries conformance for a service
  • User wants to know what level an API is at
  • User asks how to improve their API's 429 responses
  • User wants to elevate from one conformance level to the next
  • User says "audit this API" in the context of rate limits or boundaries

Assessment Process

Follow these phases in order. Each phase builds on the previous one.

Phase 1: Discovery Fetch

Fetch the limits discovery endpoint directly. Try both standard paths:

GET \x3Curl>/api/limits
GET \x3Curl>/.well-known/limits

Use curl, fetch, or any HTTP client available in the current environment. No special tooling is required.

If either path returns a JSON response, record:

  • Whether the response contains a service field
  • Whether the response contains a limits object
  • Whether limit entries are well-formed (each has type, maxRequests, windowSeconds, description)
  • Whether a conformance field is present (self-declared level)
  • Whether the response includes a Cache-Control header with s-maxage
  • Whether changelog or feed URLs are present (v1.1 change discovery)
  • Whether resource-dedup entries include returnsCached: true (v1.1)

If neither path returns a valid response, the service has no discovery endpoint and cannot be Level 2 or above.

Optional accelerator: If the graceful-boundaries repo is cloned locally, the automated checker provides a structured report:

node evals/check.js \x3Curl> --json

This is a convenience, not a requirement. The skill works entirely through direct HTTP inspection.

Phase 2: Proactive Header Check

If the limits endpoint documents specific API endpoints, fetch one of them and check for proactive headers on the success response:

  • RateLimit: limit=N, remaining=N, reset=N
  • RateLimit-Policy: N;w=N

These headers indicate Level 4 conformance.

Do NOT attempt to trigger 429s. That would require hammering the service and is not appropriate for an audit. Level 1 and Level 3 conformance cannot be verified without observing an actual refusal response — note these as unverifiable and explain why.

Phase 3: Level Assessment

Map findings to the conformance levels defined in spec.md:

Level How to verify
N/A Site has no API or agentic surface
0 Service exists but no limits endpoint, no structured responses
1 Cannot verify without a 429 response (note as unverifiable)
2 Limits endpoint exists and is well-formed
3 Cannot verify without a 429 response (note as unverifiable)
4 Level 2 confirmed + proactive headers present on success responses

If the service self-declares a conformance level via the conformance field, compare declared vs. validated. Flag any discrepancy.

Report the assessment as:

  • Confirmed level: what the evidence supports
  • Declared level: what the service claims (if any)
  • Likely level: best estimate including unverifiable aspects

Phase 4: Gap Analysis

For each level above the current confirmed level, list exactly what is missing. Reference specific sections of spec.md:

To reach Level 1 (spec sections 2 and 6):

  • Do ALL non-success responses (400, 401, 403, 404, 429, 500, 503) include error, detail, and why? (v1.1: why is MUST for all error classes)
  • Are 429 responses JSON with the 5 required fields (error, detail, limit, retryAfterSeconds, why)?
  • Does error use a stable machine-parseable string (snake_case)?
  • Does detail include a specific retry time in human-readable form?
  • Does why explain the purpose, not restate the error?
  • Is retryAfterSeconds a non-negative integer?
  • Does the HTTP response include a Retry-After header?
  • For HTML 429 pages: is there a \x3Cmeta name="retry-after" content="N"> tag or a \x3Clink rel="alternate" type="application/json" href="...">? (v1.1)

To reach Level 2 (spec section 1):

  • Does a limits endpoint exist at /api/limits or /.well-known/limits?
  • Does it return JSON with a limits object?
  • Are limit entries well-formed (type, maxRequests, windowSeconds, description)?
  • Is the endpoint cacheable (Cache-Control header)?
  • Does it include changelog or feed URLs for change discovery? (v1.1, optional but recommended)

To reach Level 3 (spec sections 3 and 5):

  • Do refusal responses include constructive guidance fields?
  • Which guidance categories apply? (cachedResultUrl, alternativeEndpoint, upgradeUrl, humanUrl, cached)
  • Does the service prefer guidance in the recommended order: use cached > try alternative > upgrade > wait > human handoff?
  • For resource-dedup limits: does the service return cached results as a 200 instead of a 429? If so, does the discovery endpoint include returnsCached: true so agents skip retry logic? (v1.1)

To reach Level 4 (spec section 4):

  • Are RateLimit headers present on success responses?
  • Do they include all three components: limit, remaining, reset?
  • Is a RateLimit-Policy header present?
  • Does the policy format match N;w=N?

Phase 5: Implementation Guidance

Provide concrete, copy-pasteable code for each gap. Use the service's actual domain and endpoints in examples.

Limits discovery endpoint skeleton:

{
  "service": "\x3Cservice name>",
  "description": "\x3Cwhat the service does>",
  "conformance": "level-2",
  "changelog": "https://\x3Cdomain>/api/changelog.json",
  "feed": "https://\x3Cdomain>/feed.json",
  "limits": {
    "\x3Cendpoint-key>": {
      "endpoint": "\x3Cpath>",
      "method": "\x3CHTTP method>",
      "limits": [
        {
          "type": "ip-rate",
          "maxRequests": 100,
          "windowSeconds": 3600,
          "description": "100 requests per IP per hour."
        },
        {
          "type": "resource-dedup",
          "maxRequests": 1,
          "windowSeconds": 86400,
          "returnsCached": true,
          "description": "One operation per resource per day. Repeat requests return the cached result."
        }
      ]
    }
  }
}

Structured refusal body:

{
  "error": "rate_limit_exceeded",
  "detail": "You have exceeded the limit of 100 requests per hour. Try again in \x3CN> seconds.",
  "limit": "100 requests per IP per hour",
  "retryAfterSeconds": 1234,
  "why": "\x3Cone sentence explaining why this limit exists — not just restating the error>"
}

Constructive guidance fields (add to the refusal body):

{
  "cachedResultUrl": "/api/result?id=\x3Cresource>",
  "alternativeEndpoint": "/api/\x3Calternative>",
  "upgradeUrl": "https://\x3Cdomain>/pricing",
  "humanUrl": "https://\x3Cdomain>/contact"
}

Proactive headers (add to success responses):

RateLimit: limit=100, remaining=99, reset=3600
RateLimit-Policy: 100;w=3600

Reference security considerations where relevant:

  • SC-1: Published limits may be higher than enforced limits
  • SC-2: why must describe the category of protection, not the mechanism
  • SC-3: expected must use positive descriptions
  • SC-6: Guidance URLs must be relative or same-origin

Phase 6: Generate the Assessment Document

Output a structured markdown document:

# Graceful Boundaries Assessment: \x3Cdomain>

## Summary
- Confirmed level: \x3CN>
- Declared level: \x3CN or "not declared">
- Likely level: \x3CN>

## What was checked
- Limits endpoint: \x3Cpath> — \x3Cfound/not found>
- Proactive headers: \x3Cpresent/absent>
- Refusal format: \x3Cnot verifiable without triggering a 429>

## Gaps to next level
\x3Cprioritized list with spec section references>

## Implementation plan
\x3Cconcrete code examples using the service's actual domain>

## Security notes
\x3Crelevant SC-* considerations>

What This Skill Does NOT Do

  • Does not implement changes on the target service
  • Does not deliberately trigger rate limits or 429 responses
  • Does not require access to the service's source code
  • Does not assess general API design quality beyond limit communication
  • Is distinct from the agent-readiness-audit skill (which assesses overall AI discoverability, not rate limit conformance specifically)
安全使用建议
This bundle appears coherent and safe for its stated purpose. Notes before you install or allow the agent to run it: (1) The package contains Node.js scripts you can run locally (node evals/check.js) but the skill metadata doesn't list 'node' as a required binary — ensure your runtime supports Node or run the scripts in a local sandbox. (2) The builder skill is designed to modify your project's source files to add error handlers/endpoints — back up your code, review diffs, and run tests before committing changes. (3) The audit explicitly warns not to 'hammer' services to induce 429s; follow that guidance. If you want a tighter assessment, provide the runtime environment (can the agent run node?), or confirm whether you will permit the agent to edit repository files autonomously; that would affect risk posture.
功能分析
Type: OpenClaw Skill Name: graceful-boundaries Version: 1.2.0 The bundle provides a comprehensive toolkit for auditing and implementing the 'Graceful Boundaries' specification, which standardizes how APIs communicate rate limits and errors. The core logic in `evals/check.js` performs standard HTTP GET requests to discover limit endpoints and verify headers, while the AI instructions in `SKILL.md` and `SKILL-builder.md` guide the agent through the audit and implementation process. The specification itself (found in `spec.md`) includes proactive security considerations (SC-1 through SC-9) to prevent information leakage and SSRF, and the code contains no evidence of malicious intent, data exfiltration, or unauthorized execution.
能力评估
Purpose & Capability
Name/description (assess Graceful Boundaries conformance) matches the included docs, checker, and builder code. All requested actions (HTTP fetches, adding structured error responses) are coherent with the stated purpose.
Instruction Scope
SKILL.md and builder instructions limit activity to HTTP inspection and source-code changes for implementing the spec. The audit explicitly disallows hammering endpoints to trigger 429s and does not instruct reading unrelated files or secrets.
Install Mechanism
No install spec is declared (instruction-only), which is low risk. The bundle includes Node.js scripts (evals/check.js, tests) that the SKILL.md suggests running as an optional accelerator, but the skill metadata does not declare 'node' as a required binary — a minor documentation inconsistency. There are no downloads or remote install URLs in the bundle.
Credentials
The skill requests no environment variables, credentials, or config paths. All operations are network calls to the user-provided target URL or local code edits (builder). No unrelated secrets are requested.
Persistence & Privilege
always:false and normal autonomous invocation settings. The skill does not request permanent system presence or modify other skills' configs. The builder variant performs code edits in the current project (expected for a builder skill) — this is normal but impactful, see user guidance.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install graceful-boundaries
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /graceful-boundaries 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
Agent-facing channels: builder skill (SKILL-builder.md), spec Appendix B for autonomous implementers, CLAUDE.md snippet. Landing page at gracefulboundaries.dev. Checker now validates Level 4 proactive headers. Error field requires snake_case. All URLs updated to gracefulboundaries.dev.
v1.1.0
Remove Node.js runtime dependency. All assessment phases now use direct HTTP fetching. Node checker is an optional accelerator. Resolves OpenClaw security scan inconsistency.
v1.0.1
Add Skill Provenance metadata to SKILL.md frontmatter. Add .clawhubignore for clean bundle packaging.
v1.0.0
Initial release: conformance audit skill for the Graceful Boundaries specification. Includes the full spec, eval suite (104 tests), live conformance checker, and curl examples.
元数据
Slug graceful-boundaries
版本 1.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Graceful Boundaries 是什么?

Assess any API or website's Graceful Boundaries conformance level and provide concrete guidance for reaching the next level. Use this skill when the user ask... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 180 次。

如何安装 Graceful Boundaries?

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

Graceful Boundaries 是免费的吗?

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

Graceful Boundaries 支持哪些平台?

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

谁开发了 Graceful Boundaries?

由 Sam Rogers(@snapsynapse)开发并维护,当前版本 v1.2.0。

💬 留言讨论