Agent Skills › block/berd › berdctl-new-command

berdctl-new-command

GitHub

用于指导在 berdctl CLI 中新增、修改或移除命令模块的操作规范。涵盖命令设计原则(如 UI 可见性、Zod 校验)、实现工作流及测试生成步骤,确保命令描述符与契约的一致性。

.agents/skills/berdctl-new-command/SKILL.md block/berd

触发场景

需要添加新的 berdctl 命令 修改现有 berdctl 命令的逻辑或结构 移除不再需要的 berdctl 命令

安装

npx skills add block/berd --skill berdctl-new-command -g -y
更多选项

非标准路径

npx skills add https://github.com/block/berd/tree/main/.agents/skills/berdctl-new-command -g -y

不安装直接使用

npx skills use block/berd@berdctl-new-command

指定 Agent (Claude Code)

npx skills add block/berd --skill berdctl-new-command -a claude-code -g -y

安装 repo 全部 skill

npx skills add block/berd --all -g -y

预览 repo 内 skill

npx skills add block/berd --list

SKILL.md

Frontmatter
{
    "name": "berdctl-new-command",
    "description": "Use when adding, extending, modifying, or removing berdctl commands, verbs, nouns, schemas, help text, or any of the berdctl surface."
}

berdctl command changes

One command is one renderer module. Descriptors are the source for zod validation, TS input types, CLI help, and generated contract JSON. Background: docs/berdctl-architecture.md.

Rules

  • Verbs must be UI-visible. Prefer reversible mutations, but one-way visible product actions like creating a session or sending a prompt are allowed. Delete, bulk, silent, invisible, or broadly destructive work requires auth/confirmation design review.
  • Put bounds in zod; clap mirrors them.
  • Keep descriptors import-pure. Import stores, Tauri APIs, navigation, providers, and caches only inside execute/precheck.
  • Do not hand-edit generated contract JSON.
  • Keep the broker command-agnostic; normal command changes do not touch src-tauri/plugins/berdctl/.
  • Breaking wire reshapes bump both discovery.rs constants and the contract mirror. New commands and optional fields are not reshapes.

Workflow

  • Add commands with just new-command <noun> <verb>.
  • Implement src/features/berdctl/commands/impl/<verbNoun>.ts with: .strict() schema, .describe() on every field, summary, description, helpFooter, safety metadata, optional precheck, and execute.
  • Update inventories only when needed: registry.ts group cli.about, top-level help pins in tree.rs, and distro/skills/berdctl/SKILL.md for overview changes.
  • Run pnpm generate:berdctl-contract, pnpm vitest run src/features/berdctl, and cargo test -p berdctl from src-tauri/.
  • Before review, confirm the verb is UI-visible and either reversible or a direct visible product action, help is complete, error messages name the fixing command, artifacts are regenerated, and tests cover the behavior.

Keep CLI shapes expressible by the generated field walker. If a requested operation needs an explicit null or another shape that generic flags cannot represent safely, model it as a separate command action instead of adding command-specific Rust mapping. Example: use session move --project-id <id> for moving into a project and session clear-project for moving out.

版本历史

  • 977d35f 当前 2026-08-19 11:30

同 Skill 集合

.agents/skills/assistive-ux/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/experimental-features/SKILL.md
distro/skills/agent-builder/SKILL.md
distro/skills/berd-help/SKILL.md
distro/skills/berd-monitor/SKILL.md
distro/skills/berd-orchestrator/SKILL.md
distro/skills/skill-builder/SKILL.md
skills/buzz-handoff/SKILL.md

元信息

文件数
0
版本
2d27546
Hash
8c6435c0
收录时间
2026-08-19 11:30

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-05 02:33
浙ICP备14020137号-1