Token导航 LogoToken导航TokenDH.com
AI 工具只读github未标认证来源可访问clear审计提醒

instruction-design-and-validation指令设计和验证

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

259

周安装

11

GitHub Stars

3

下载量

91
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:instruction-design-and-validation(指令设计和验证)
来源仓库:https://github.com/sanctifiedops/solana-skills
仓库路径:skills/instruction-design-and-validation
安装命令:
npx skills add https://github.com/sanctifiedops/solana-skills --skill instruction-design-and-validation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/sanctifiedops/solana-skills --skill instruction-design-and-validation

简介

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。

  • 适合生成 UI 方案、检查视觉一致性或改进组件层级。
  • 结合品牌和设计系统,避免堆砌装饰元素。
  • 涉及页面改动时需通过截图或预览检查文本溢出和对齐表现。
  • instruction-design-and-validation 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Instruction Design and Validation

Role framing: You are an instruction architect. Your goal is to define minimal, safe instruction interfaces with explicit constraints and thorough validation.

Initial Assessment

  • What state changes are needed? Which accounts and authorities are involved?
  • Are inputs fixed-size or variable? Any untrusted user data?
  • Cross-program interactions? Which programs and CPIs?
  • Performance needs: expected tx size, compute budget, number of accounts?

Core Principles

  • Keep instructions single-responsibility; avoid multi-mode flags when possible.
  • Validate all caller-provided addresses; re-derive PDAs inside program.
  • Enforce authority at the smallest scope: signer + owner + custom invariants.
  • Fail fast with descriptive errors; keep error enum tight.
  • Bound untrusted data lengths; avoid realloc unless necessary.

Workflow

  1. Define intent: describe state transition in one sentence.
  2. Specify inputs

- Accounts table (role, owner, signer, writable, seeds). - Instruction data struct with versioning field if necessary.

  1. Write validation logic

- Ownership, signer, seeds/bump, data length bounds, relationship checks (e.g., same mint). - Custom invariants (e.g., price bounds, timestamp windows).

  1. Compute budget planning

- Estimate compute; add ComputeBudgetInstruction if needed; minimize account count.

  1. Error design

- Add specific errors for each validation step; map to user-facing messages.

  1. Tests

- Happy path; each validation failure; edge sizes; CPI failure propagation.

Templates / Playbooks

  • Account table format (reuse from solana-account-model).
  • Validation pattern in Anchor:

- #[account(mut, seeds = [...], bump, has_one =...)] - Manual checks in handler for cross-account relationships.

  • Versioned instruction data: include u8 version + enum payload.

Common Failure Modes + Debugging

  • Missing signer/writable flags causing runtime failure: align Anchor constraints with client metas.
  • Seed mismatch between client and program: recompute seeds and confirm bump.
  • Data length overflow on realloc: pre-calc size, fund rent.
  • CPI returns Constraint... errors: inspect callee IDL and account order.

Quality Bar / Validation

  • Instruction spec includes account table + data schema + invariants.
  • All validations covered by tests with clear errors.
  • Compute budget measured; no unnecessary accounts.
  • Versioning/compatibility plan noted when needed.

Output Format

Deliver instruction spec containing intent, accounts table, data schema, validation steps, error list, and test checklist.

Examples

  • Simple: Update config parameter

- Accounts: config PDA (w), authority signer; validation: seeds, has_one authority.

  • Complex: Place order on orderbook via CPI

- Accounts: user, market, event queue, bids/asks, token accounts; validation of owner/mint match; compute budget ix; error mapping for CPI failures; tests for bad mints and missing signer.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenCode

28.47%
按下载量换算26

Cursor

20.47%
按下载量换算19

Claude Code

16.7%
按下载量换算15

Codex

11.86%
按下载量换算11

Antigravity

7.76%
按下载量换算7

Gemini CLI

3.36%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills