营销与写作

Hedera Policy Creation

hedera-dev/hedera-skills

This skill should be used when the user asks to "create a hedera policy", "block a tool", "limit recipients", "extend AbstractPolicy", "reject a tool", "enforce a threshold", "rate limit a tool", "block transfers over X", "allowlist tools", or needs guidance on writing blocking validation rules for Hedera Agent Kit tools. Policies block tool execution by throwing — for non-blocking observation use the hook skill instead.

  • 0 次安装
  • 28 星标

安装命令

npx skills add https://github.com/hedera-dev/hedera-skills --skill 'Hedera Policy Creation'

SKILL.md

Creating Hedera Agent Kit Policies

Policies are blocking validation rules layered on the BaseTool lifecycle. A policy checks the call at one or more stages and throws to abort execution — the error propagates back to the LLM agent. Use them to enforce thresholds, allowlists/blocklists, rate limits, business hours, compliance rules, etc.

Policies fire only for tools that extend BaseTool. A tool that implements the Tool interface directly without extending BaseTool bypasses policies entirely.

Policy vs. hook

Goal Use
Stop a call when a condition holds Policy (this skill)
Reject specific tool methods Policy
Threshold / rate-limit / allowlist / blocklist Policy
Log, audit, enrich context Hook (see agent-kit-hook skill)

AbstractPolicy extends AbstractHook, so policies live in the same Context.hooks array and run through the same lifecycle.