‹ 首页

formax-slash-command-workflow

@yusifeng · 收录于 5 天前 · 上游提交 3 周前

Use when adding/modifying Formax slash commands (/permissions /agents /hooks /todos etc), especially output rendering (command sublines), overlay dismiss messages, and whether outputs are injected into the next LLM turn.

适合你,如果你需要管理 Formax 斜杠命令的显示和交互逻辑。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add yusifeng/formax/formax-slash-command-workflow
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- yusifeng/formax/formax-slash-command-workflow
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify yusifeng/formax/formax-slash-command-workflow
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
192GitHub stars
~881上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 5a48573 · 表述以原文为准
它做什么

安装后,Claude在处理Formax斜杠命令(如/permissions、/agents等)时,会遵循命令发现、调度、UI输出渲染和下一轮注入的特定工作流程。它会用'command_subline'格式显示输出,并严格区分UI显示和模型注入。

什么时候触发

当你要求添加或修改Formax斜杠命令(如/permissions、/agents等),或调整命令的输出渲染、覆盖关闭信息、或注入下一轮对话行为时触发。

装好后可以这样说
Claude会更新命令结果渲染。
Claude会创建新命令并设置UI输出。
Claude会调整注入行为。
技能原文 SKILL.md作者撰写 · MIT · 5a48573

Formax slash command workflow

Goal

Use this skill when changing slash command discovery, dispatch, overlay dismissal output, or next-turn injection behavior.

Read First
  • docs/contracts/slash-command-contract.md
  • docs/contracts/semantics-contract.md when command behavior crosses canonical UI messages or routing
  • docs/contracts/config-settings-contract.md when the change touches /config

These docs are canonical. If stable behavior changes, update them before or with code.

Code Map
1) Command discovery + dispatch
  • packages/core/src/features/commands/registry.ts: command list/suggest/dispatch wiring
  • packages/core/src/features/commands/CommandStore.ts: disk scanning + precedence (project overrides user)
  • packages/core/src/features/semantics/core/commandRouting.ts: exact /clear / /compact and command-dispatch routing boundary
2) Command result contract (UI vs model)
  • packages/core/src/features/commands/contracts.ts: UiEffect / UiMessage / ModelEffect shapes
  • packages/core/src/features/commands/adapter.ts: maps command execution output → CommandResult
  • packages/core/src/features/repl/controller/send/send.ts: consumed slash handling, local_async, and injected-block plumbing
3) Overlay dismissal “subline output”
  • packages/core/src/features/repl/controller/ui/overlays.ts: overlay open/close + append “dismissed” sublines
4) REPL message plumbing + rendering
  • packages/core/src/features/repl/controller/send/send.ts: applies UiEffect.appendMessages to Msg
  • packages/core/src/screens/REPL.tsx: render msg.ui.kind === 'command_subline' as ⎿ ... (no )
  • packages/core/src/screens/REPL.slashSuggestions.test.tsx: duplicate command selection / preferredSlashSpecId
High-Signal Patterns
  • Pattern A: one-line overlay dismissal
  • append a single assistant Msg with ui.kind='command_subline'
  • keep copy stable unless the user explicitly requests copy changes
  • Pattern B: multi-line local output
  • split output into multiple command_subline rows
  • this is UI only; model injection remains separately controlled
  • Pattern C: inject-but-don't-spam
  • when a command needs to inform the model, keep UI output minimal and preserve recordForNextTurn / injected-block behavior separately
Minimal Workflow
  1. Classify the change first: discovery / precedence, local UI output, next-turn injection, or overlay dismiss behavior.
  2. Update the slash command contract first.
  3. Preserve “show in UI” vs “inject into model context” as separate concerns; local output alone must not imply injection.
  4. Use command_subline for Claude-style sublines; do not invent new message shapes.
  5. Run the minimum regression set below before review.
Minimum Regression
  • bun run test -- packages/core/src/features/commands/registry.test.ts packages/core/src/features/commands/CommandStore.test.ts packages/core/src/features/commands/adapter.test.ts packages/core/src/features/commands/contracts.test.ts
  • bun run test -- packages/core/src/features/repl/controller/ui/overlays.test.tsx
  • bun run test -- packages/core/src/features/repl/controller/send/send.test.ts packages/core/src/features/repl/useReplController.test.tsx
  • bun run test -- packages/core/src/screens/REPL.slashSuggestions.test.tsx packages/core/src/screens/repl/inputHint.test.ts
  • bun run type-check when command shapes or routing plumbing changes
Guardrails
  • Do not add bespoke commandSubLines-style structures; use Msg.ui.kind='command_subline'.
  • Do not change UI copy / spacing / colors as a side-effect of routing changes.
  • Do not patch only overlay output if the real bug is discovery or dispatch precedence.
  • If behavior is unclear, add or extend an Ink test first; tests are not the only spec, but they should lock the visible key path.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。