用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kachofugetsu09/akashic-agent --skill develop-akashic-plugin命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | develop-akashic-plugin |
| description | 创建、编写、修改并验证 Akashic v3 插件及插件内 Skill/MCP。用户要求创建插件、加入能力、安装候选、热重载后自测或递归自验证时使用。 |
只在插件的 canonical source 中修改文件。先确定 write set 并创建可恢复备份;不要直接编辑安装 cache、workspace 中的 Skill 投影、runtime pointer 或正式 plugin-data。
docs/INDEX.md、docs/WORKFLOW.md 及该仓库的本地指引。references/runtime-diagnostics.md,按真实 reload journal、SessionDB 和日志重建轨迹。agent/plugin_composition/、agent/plugins/static_manifest.py 和相邻 v3 样例为事实来源;旧文章或旧代码片段不构成 API。最小 source 如下:
plugin-repo/
├── akashic.plugin.toml # 外部安装包必需
├── plugin.py # v3 module namespace
├── skills/<skill>/SKILL.md # 可选
├── drift/skills/<skill>/ # 可选
├── mcp/ # 可选
└── requirements.txt # 只有确有 Python 依赖时才声明
akashic.plugin.toml 至少包含 schema_version = 1、name、version、api_version = 3 和 entrypoint = "plugin.py"。module namespace 同时导出同值的 api_version、name、version,以及唯一、无默认值、无额外参数的 apply(ctx, config);函数可以是同步或异步的。能力通过 Context 上的 typed ServiceKey 获取或提供,不通过隐式全局状态注册。
from agent.plugin_composition import Context, TOOL_CATALOG
api_version = 3
name = "example"
version = "1.0.0"
inject = (TOOL_CATALOG,)
async def apply(ctx: Context, config: object) -> None:
"""Register this generation's typed contributions."""
_ = config
tools = ctx.require(TOOL_CATALOG)
# 用 PluginToolDefinition 注册声明;handler_export 指向 source 内的可调用导出。
_ = tools
真实声明范例和字段表见 authoring reference;不要把 Core-private 的 Default/Wake proactive island 当作外部扩展入口,也不要导入其 factory、registry 或 bridge。
保持一个清楚的 capability owner:
skill_roots、drift_skill_roots、workspace_roots 和 dashboard_module 是 module namespace 的静态声明;路径必须位于插件 source,workspace root 只能是插件拥有的顶层目录。ctx.spawn,资源使用 ctx.effect,监听使用 typed event key;它们随当前 Fiber 逆序清理。source test 至少覆盖:
name/version/api_version/entrypoint 一致;plugin.py 可从干净 checkout 导入,apply 签名精确;缺少依赖、导入失败、配置错误、命令失败和数据损坏必须 fail-loud;不要用空结果、宽泛异常或假成功绕过检查。
先运行 source test,再提交 Git HEAD;远程 source 还要确认远端包含该 commit。父 Agent turn 只使用三个管理动作:
plugin-install 安装或更新本 turn 的候选
plugin-uninstall 登记本 turn 结束后的卸载
plugin-revert 撤销本 turn 最近一次尚未提交的 install/uninstall
安装命令从 active turn 的 Shell 发起:
python main.py plugin-install \
--source /absolute/path/to/committed-plugin \
--marketplace local
成功只表示候选已准备;父 turn 仍使用原 generation,本 turn 创建的 attached programmatic child 才会自动绑定候选。不要指定 runtime、手工切换 generation、启动第二个 Gateway 或编辑 cache。
source test → commit/push → plugin-install
→ attached child → identity + Skill/Tool 行为 oracle
├─ pass → 正常结束父 turn → Core 自动切换 → 下一 turn 生效
└─ fail → plugin-revert → 根据真实轨迹修复 source 后递归
attached child 必须实际加载新增 Skill、调用新增 Tool 或完成领域 oracle;只看 final response、只问“是否可见”、只跑 catalog 检查都不够。记录 execution_id、thread_id、turn_id、plugin_id、candidate generation/source revision、tool items 和 terminal;超时或 queued 不推进时按 runtime diagnostics 定位,不重复安装相同 source。
固定 listener 必须通过静态 [[processes]]/typed managed-process declaration 声明端口、readiness 和超时;服务进程及同插件 MCP 必须读取 Core 注入的 port_env。候选验证使用隔离端口和 plugin-data 副本,candidate read-only MCP 之外的写能力必须使用事务、dry-run、隔离目标或明确授权。
Channel candidate 不接管正式 token、webhook 或 long-poll ownership。父 turn 结束后的切换顺序是:
old Channel.stop → managed service switch → new Channel.start
└─ 任一步失败:恢复并验证 old generation
stop() 返回必须证明 ingress 已停止、在途工作已收束且 ownership 已释放;start() 返回必须证明新代已 ready。message_push 以真实 delivery receipt 和目标 owner 证据为准,不能凭字符串推断外部效果。
只有以下事实同时成立才报告完成:
一次性 workspace 中的行为验证只能报告“隔离候选验证完成”,不能升级为正式切换完成。最终报告简洁列出 source commit、验证 turn/child、关键 tool evidence、Core turn 后结果、备份位置和未验证边界。