Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计异常

hedera-plugin-creationhedera 插件创建

Agent Skill

hedera-plugin-creation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

9,790

周安装

549

GitHub Stars

19

下载量

7,021
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hedera-plugin-creation(hedera 插件创建)
来源仓库:https://github.com/hedera-dev/hedera-skills
仓库路径:skills/hedera-plugin-creation
安装命令:
npx skills add https://github.com/hedera-dev/hedera-skills --skill 'Hedera Plugin Creation'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

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

简介

hedera-plugin-creation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适用于围绕仓库状态、代码变更或协作事项进行整理和分析的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用该技能。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网或命令执行。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Creating Hedera Agent Kit Plugins

This skill provides guidance for creating custom plugins that extend the Hedera Agent Kit. Plugins allow adding new tools for Hedera network interactions—token operations, account management, consensus service, smart contracts, and custom integrations.

Quick Start

To create a Hedera plugin in 5 steps:

  1. Install dependencies: Set up a TypeScript project with hedera-agent-kit and @hashgraph/sdk
  2. Create plugin structure: Create an index.ts with the plugin definition and a tools/ directory
  3. Define tools: Create tool files with method, name, description, parameters, and execute function
  4. Export properly: Export the plugin object and tool name constants
  5. Register with agent: Import and register the plugin with PluginRegistry

Plugin Interface

Every Hedera plugin implements this interface from hedera-agent-kit:

import { Plugin } from 'hedera-agent-kit';

export interface Plugin {
  name: string;           // Unique kebab-case identifier
  version?: string;       // Semantic version (e.g., "1.0.0")
  description?: string;   // Brief explanation of plugin purpose
  tools: (context: Context) => Tool[];  // Factory returning tools
}

The tools function receives a Context object containing network configuration and returns an array of Tool objects.

Tool Interface

Each tool implements this interface:

import { Tool } from 'hedera-agent-kit';

export interface Tool {
  method: string;           // Unique snake_case identifier (e.g., "create_token_tool")
  name: string;             // Human-readable display name
  description: string;      // LLM-friendly description for the AI agent
  parameters: z.ZodObject;  // Zod schema for input validation
  execute: (client: Client, context: Context, params: any) => Promise<any>;
  outputParser?: (rawOutput: string) => { raw: any; humanMessage: string };
}

Tool Types

Mutation Tools - Perform state-changing operations:

  • Token creation, minting, transfers
  • Account creation, updates
  • Topic creation, message submission
  • Use handleTransaction() for execution
  • Use transactionToolOutputParser for output

Query Tools - Read data without state changes:

  • Token info, balances
  • Account details
  • Topic messages
  • Direct service calls
  • Use untypedQueryOutputParser for output

File Structure Pattern

Follow this structure for all Hedera plugins:

my-hedera-plugin/
├── index.ts                    # Plugin definition and exports
└── tools/
    └── category/               # Group related tools
        ├── create-something.ts
        └── get-something.ts

Creating a Tool

Step 1: Define the Tool Constant

export const MY_TOOL_NAME = 'my_tool_name_tool';

Use UPPER_SNAKE_CASE with _TOOL suffix for the constant. The value should be lowercase snake_case.

Step 2: Create the Prompt Function

const myToolPrompt = (context: Context = {}) => {
  return `This tool does X on Hedera.
Parameters:
- param1 (str, required): Description of param1
- param2 (int, optional): Description of param2, defaults to 0`;
};

Descriptions guide the AI agent on when and how to use the tool. Be specific about parameter types and requirements.

Step 3: Define Parameters with Zod

import { z } from 'zod';

const myToolParameters = (context: Context = {}) => {
  return z.object({
    param1: z.string().describe('Description of param1'),
    param2: z.number().optional().describe('Description of param2'),
  });
};

See references/zod-schema-patterns.md for common Hedera parameter patterns.

Step 4: Implement the Execute Function

const myToolExecute = async (
  client: Client,
  context: Context,
  params: z.infer<ReturnType<typeof myToolParameters>>,
) => {
  try {
    // Build and execute Hedera transaction
    const result = await handleTransaction(tx, client, context, postProcess);
    return result;
  } catch (error) {
    const message = 'Failed to execute' + (error instanceof Error ? `: ${error.message}` : '');
    return { raw: { error: message }, humanMessage: message };
  }
};

Step 5: Create the Tool Factory

const tool = (context: Context): Tool => ({
  method: MY_TOOL_NAME,
  name: 'My Tool Display Name',
  description: myToolPrompt(context),
  parameters: myToolParameters(context),
  execute: myToolExecute,
  outputParser: transactionToolOutputParser,
});

export default tool;

Creating the Plugin Index

import { Context } from 'hedera-agent-kit';
import { Plugin } from 'hedera-agent-kit';
import myTool, { MY_TOOL_NAME } from './tools/category/my-tool';

export const myPlugin: Plugin = {
  name: 'my-hedera-plugin',
  version: '1.0.0',
  description: 'A plugin for custom Hedera operations',
  tools: (context: Context) => {
    return [
      myTool(context),
    ];
  },
};

export const myPluginToolNames = {
  MY_TOOL_NAME,
} as const;

export default { myPlugin, myPluginToolNames };

Post-Processing Results

Create human-readable output from transaction results:

const postProcess = (response: RawTransactionResponse) => {
  if (response.scheduleId) {
    return `Scheduled transaction created.
Transaction ID: ${response.transactionId}
Schedule ID: ${response.scheduleId.toString()}`;
  }
  return `Operation completed.
Transaction ID: ${response.transactionId}
Result: ${response.someValue}`;
};

Naming Conventions

ElementConventionExample
Plugin namekebab-casemy-token-plugin
Plugin variablecamelCasemyTokenPlugin
Tool constantUPPER_SNAKE_CASE + _TOOLCREATE_TOKEN_TOOL
Tool method valuesnake_case + _toolcreate_token_tool
Tool filekebab-casecreate-token.ts
Tool names exportcamelCase + ToolNamesmyTokenPluginToolNames

Common Imports

// From hedera-agent-kit
import { Context } from 'hedera-agent-kit';
import { Plugin } from 'hedera-agent-kit';
import { Tool } from 'hedera-agent-kit';
import { handleTransaction, RawTransactionResponse } from 'hedera-agent-kit';
import { transactionToolOutputParser, untypedQueryOutputParser } from 'hedera-agent-kit';

// From Hedera SDK
import { Client, Status } from '@hashgraph/sdk';

// For parameter validation
import { z } from 'zod';

Additional Resources

Reference Files

For detailed patterns and techniques, consult:

  • references/plugin-interface.md - Complete Plugin and Tool interface documentation
  • references/zod-schema-patterns.md - Common Zod schemas for Hedera parameters
  • references/prompt-patterns.md - Prompt generation patterns for tool descriptions
  • references/error-handling.md - Error handling and output parsing patterns

Example Files

Working examples in examples/:

  • examples/simple-plugin/ - Basic plugin with one tool (starter template)
  • examples/token-plugin/ - Full token plugin with mutation and query tools

Best Practices

  1. Group related tools: Use category directories under tools/
  2. Consistent naming: Follow the naming conventions strictly
  3. Clear descriptions: Write prompts that help the AI understand when to use the tool
  4. Validate inputs: Use Zod schemas with descriptive .describe() calls
  5. Handle errors: Always catch errors and return structured error responses
  6. Human-readable output: Use postProcess to format results for users
  7. Export tool names: Allow consumers to reference tools programmatically

Registering Plugins

After creating a plugin, register it with the Hedera Agent Kit:

import { PluginRegistry } from 'hedera-agent-kit';
import { myPlugin } from './my-hedera-plugin';

const registry = new PluginRegistry();
registry.register(myPlugin);

// Get all tools from registered plugins
const tools = registry.getTools(context);

Workflow Summary

  1. Create plugin directory with index.ts and tools/ subdirectory
  2. Create tool files following the 5-step pattern
  3. Export tools from plugin index with tool name constants
  4. Register plugin with PluginRegistry
  5. Tools become available to the AI agent

For complete working examples, see the examples/ directory.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.45%
按下载量换算2,559

Claude

31.56%
按下载量换算2,216

Cursor

17.23%
按下载量换算1,210

Gemini CLI

8.98%
按下载量换算630

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills