Home / muselinn / musepi · packages/coding-agent/src/bundled-skills/musepi-extension-dev/SKILL.md · GitHub

musepi-extension-dev skillA

musepi-extension-dev is agent-read markdown (skill) from muselinn/musepi: 为 MusePi(TUI/CLI + 桌面 GUI)开发扩展——custom tools、extensions(生命周期/事件)、hooks、plugins、slash commands、skills。触发:用户要求"加个工具/扩展/命令/hook/插件"、"给 musepi 加 X 支持"、修改扩展加载机制、写 MCP 相关集成。桌面 GUI 会话(daemon)与 TUI 共享同一扩展系统,扩展天然两形态可用。.

Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.

What the file says

# MusePi 扩展开发

扩展系统在 `packages/coding-agent/src/extensibility/`。六种形态,各有用途:

| 形态 | 是什么 | 关键文件 |
|---|---|---|
| **Custom tool** | 模型可调用的函数(execute + Zod schema) | `extensibility/custom-tools/loader.ts` |
| **Extension** | 生命周期/事件框架——可注册工具、拦截/修改事件 | `extensibility/extensions/`(loader/runner) |
| **Hook** | 外部 pre/post 命令脚本(如 tool_call 拦截) | `extensibility/hooks` |
| **Plugin** | 可安装的扩展包(`omp.extensions` 清单) | `extensibility/plugins` |
| **Slash command** | 斜杠命令(`/xxx`) | `extensibility/slash-commands.ts` |
| **Skill** | 静态知识包(SKILL.md) | `extensibility/skills.ts` + `discovery/builtin.ts` |

## 快速路径:最小扩展(够用 90% 场景)

写一个 TS 文件(默认导出 factory),放到 `~/.musepi/agent/extensions/<name>/index.ts`(用户级)或 `<cwd>/.musepi/extensions/<name>/index.ts`(项目级):

```ts
import type { ExtensionAPI } from "@musepi/pi-coding-agent";

export default function (pi: ExtensionAPI) {
	const z = pi.zod;
	pi.setLabel("My Extension");

	pi.on("tool_call", async (event) => {
		if (event.toolName === "bash" && /rm -rf/.test(event.input.command ?? "")) {
			return { block: true, reason: "Blocked by extension policy" };
		}
	});

	pi.registerTool({
		name: "my_tool",
		label: "My Tool",
		description: "…",
…

Read the whole file at its exact version.

How to install

Latest version
mdr add muselinn/musepi/musepi-extension-dev@git:20260817.c5cdd0e
Exact content
mdr add muselinn/musepi/musepi-extension-dev@sha256:e33b8bed74fcb9d0

Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_t5i77s6meipwta7b.svg)](https://markdownregistry.com/a/art_t5i77s6meipwta7b)

1 badge views in 30 days

Versions

versioncommittedcommitsizeaudit
git:20260817.c5cdd0e latest2026-08-17 c5cdd0e 4,929 BA view

Audit of the latest version

A  17 of 17 checks passed. Deterministic, no model, same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (4929 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

muselinn/musepi · 17 stars · license MIT · pushed 2026-09-23 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_t5i77s6meipwta7b
GET https://markdownregistry.com/api/v1/resolve?ref=muselinn/musepi/musepi-extension-dev
GET https://markdownregistry.com/api/v1/blob/e33b8bed74fcb9d03065dc21b12daa23d38a7937732a74f6c4d7372637656fdf

Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

More from muselinn/musepi

musepi-code-review skill
muselinn/musepi · .agents/skills/musepi-code-review/SKILL.md · 按 MusePi 仓库标准评审 PR/改动——AGENTS.md 代码质量规则(无 ReturnType、禁内联 import、prompt 进 .md)、GUI 规则(DialogFrame、hook…
git:20260916.ae02ea6 · audit A · 17 stars
musepi-find-simplifications skill
muselinn/musepi · .agents/skills/musepi-find-simplifications/SKILL.md · 在 MusePi 代码库找非显然的简化点——无生产消费者的公开方法/事件/配置项/helper、两个表示镜像同一事实、投机通用化、手搓重复中央工具或 Bun 内置的实现;产出有证据的候选清单(评审过、可进 PR +…
git:20260823.0df9512 · audit A · 17 stars
musepi-prose-standard skill
muselinn/musepi · .agents/skills/musepi-prose-standard/SKILL.md · MusePi 代码库的文案/注释标准——写"契约"而不是写过程:删推理过程、重复和装饰,一处事实一个家;覆盖 JSDoc、代码注释、prompt .md、i18n 文案、GUI…
git:20260909.1dfc4d6 · audit A · 17 stars
musepi-trim-cot-leakage skill
muselinn/musepi · .agents/skills/musepi-trim-cot-leakage/SKILL.md · 清理"思维链泄漏"类文案——死设计会话引用((决策 N)、审计码、草稿 §N、T4/P-I 阶段标签)、PR/栈视角("这个 PR 加了…")、变更叙述("以前/不再/旧版/这版")、评审对白("评审中否了…")、控制流叙述、含糊推迟("大…
git:20260823.0df9512 · audit A · 17 stars
semantic-compression skill
muselinn/musepi · .musepi/skills/semantic-compression/SKILL.md · Re-encode verbose prose into a dense telegraphic register — punctuation as connectives, label frames, verbless…
git:20260823.eb76001 · audit A · 17 stars
system-prompts skill
muselinn/musepi · .musepi/skills/system-prompts/SKILL.md · Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense…
git:20260916.c9f8599 · audit A · 17 stars
tool-prompt-optimization skill
muselinn/musepi · .musepi/skills/tool-prompt-optimization/SKILL.md · Optimize the description prompts an AI agent reads to learn its built-in tools (the `.md` files under prompts/tools/)…
git:20260823.eb76001 · audit A · 17 stars
AGENTS.md agents
muselinn/musepi · AGENTS.md
git:20260917.391022e · audit A · 17 stars
board-design skill
muselinn/musepi · packages/coding-agent/src/bundled-skills/board-design/SKILL.md · 桌面看板(board)的设计与读写规范——何时建板、怎么规划卡片布局、如何选 widget 类型并配 data/pos(避免类型数据错配和不可用布局)。触发:用户要求"看板/桌面卡片墙/把 X 放上看板/添加卡片"。
git:20260817.88c4ebc · audit A · 17 stars
musepi-contributing skill
muselinn/musepi · packages/coding-agent/src/bundled-skills/musepi-contributing/SKILL.md · MusePi 仓库提交规范助手——帮用户按项目模板与 CONTRIBUTING 规范起草/提交 GitHub issue、pull request、commit message 与 changelog,以及跑 release…
git:20260908.1c958e3 · audit A · 17 stars
musepi-help skill
muselinn/musepi · packages/coding-agent/src/bundled-skills/musepi-help/SKILL.md · MusePi 产品使用帮助——回答"怎么用/是什么/出问题怎么办"类问题(TUI/CLI/桌面 GUI/看板/widget/配置/扩展/许可)。触发:任何关于 MusePi 本身的使用、功能、配置、故障问题。
git:20260909.1dfc4d6 · audit A · 17 stars
ui-ux-pro-max skill
muselinn/musepi · packages/coding-agent/src/bundled-skills/ui-ux-pro-max/SKILL.md · UI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing…
git:20260817.88c4ebc · audit A · 17 stars

Every file in muselinn/musepi

Browse by kind, by grade A, or by owner.