跳到正文
cccskills
免费在 GitHub 公开

handling-commands

Patterns for handling commands, validating input, and filtering messages in XMTP agents. Use when implementing slash commands, validators, or message filters. Triggers on command handling, input validation, or type guards.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md1.6 KB
  • rules/filters-message-types.md1.1 KB
  • rules/guards-codec.md1.1 KB
  • rules/validators-hex.md942 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

XMTP commands and validation

Best practices for handling commands, validating input, and filtering messages.

When to apply

Reference these guidelines when:

  • Implementing slash commands
  • Validating hex strings and addresses
  • Filtering message types
  • Using type guards instead of type assertions

Rule categories by priority

PriorityCategoryImpactPrefix
1ValidatorsCRITICALvalidators-
2FiltersHIGHfilters-
3Type GuardsHIGHguards-

Quick reference

Validators (CRITICAL)

  • validators-hex - Use validHex() for hex string validation
  • validators-address - Validate Ethereum addresses

Filters (HIGH)

  • filters-message-types - Filter by message type (SDK 2.0+: use direct imports isText, isReaction, isReply, etc. from @xmtp/agent-sdk; keep filter.fromSelf, filter.hasDefinedContent)
  • filters-sender - Filter out self-messages
  • filters-content - Check for defined content

Type Guards (HIGH)

  • guards-codec - Use usesCodec() instead of type assertions
  • guards-content-type - Use filter helpers for type safety

How to use

Read individual rule files for detailed explanations:

rules/validators-hex.md
rules/filters-message-types.md
rules/guards-codec.md

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Core XMTP Agent SDK setup and patterns. Use when creating new agents, handling messages, setting up middleware, or configuring environment variables. Triggers on agent setup, XMTP configuration, message handling, or middleware implementation.

中文简介正在准备中。当前显示原文说明。

xmtplabs/xmtp-agent-examples532026年2月21日 更新

Interactive button-based UI for XMTP agents following XIP-67. Use when creating menus, confirmation dialogs, selection options, or any button-based interaction. Triggers on inline actions, buttons, menus, or ActionBuilder.

中文简介正在准备中。当前显示原文说明。

xmtplabs/xmtp-agent-examples532026年2月21日 更新

File attachment handling for XMTP agents. Use when sending or receiving images, files, or any encrypted remote attachments. Triggers on file upload, image sending, or remote attachment handling.

中文简介正在准备中。当前显示原文说明。

xmtplabs/xmtp-agent-examples532026年2月21日 更新

Token transactions and wallet integration for XMTP agents. Use when sending USDC, creating transaction requests, or handling transaction confirmations. Triggers on USDC transfer, wallet calls, or transaction reference.

中文简介正在准备中。当前显示原文说明。

xmtplabs/xmtp-agent-examples532026年2月21日 更新

Group conversation management for XMTP agents. Use when creating groups, managing members, setting permissions, or sending welcome messages. Triggers on group creation, member management, or permissions.

中文简介正在准备中。当前显示原文说明。

xmtplabs/xmtp-agent-examples532026年2月21日 更新

ENS and Web3 identity resolution for XMTP agents. Use when resolving domain names, extracting mentions, or fetching Farcaster profiles. Triggers on ENS resolution, Farcaster lookup, or mention extraction.

中文简介正在准备中。当前显示原文说明。

xmtplabs/xmtp-agent-examples532026年2月21日 更新

查看 xmtplabs 的全部技能

报告此技能的问题