From eafd46a8baaf6d2d8b2616e3275293ae330b4cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=99=BD=E5=8F=94?= <11794527+absfan@user.noreply.gitee.com> Date: Tue, 26 May 2026 10:06:17 +0800 Subject: [PATCH] feat: add .codex-plugin/plugin.json for Codex / Codex++ install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codex CLI's /plugin add accepts arbitrary git URLs and installs into ~/.codex/plugins/cache, not just OpenAI's curated catalog. Modeled the manifest on Superpowers' .codex-plugin/plugin.json (skills field points at ./skills/, interface block for UI metadata). Bump both .claude-plugin/{plugin,marketplace}.json from 0.1.0 to 0.2.0 to signal Codex support. README updated: - Three install paths now: Claude Code plugin / Codex plugin / external spec - Codex section explains the "no SessionStart hook" caveat — agents need to invoke using-praxis manually on first turn (or get prompted by the user) Codex / Cursor users without plugin support continue to fall back to the AGENTS.md / skills/ direct-read path documented in the next section. Co-Authored-By: Claude Opus 4.7 --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 38 +++++++++++++++++++++++++++++ README.md | 43 ++++++++++++++++++++++++--------- 4 files changed, 72 insertions(+), 13 deletions(-) create mode 100644 .codex-plugin/plugin.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 7927780..c343e7a 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ { "name": "praxis", "description": "Simgreek team's AI coding agent rulebook: SOP for Node.js projects, git hygiene, debugging, verification.", - "version": "0.1.0", + "version": "0.2.0", "source": "./", "author": { "name": "Simgreek", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 68dafa9..4238f4a 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "praxis", "description": "Simgreek team's AI coding agent rulebook: SOP for Node.js projects, git hygiene, debugging, verification — practice over theory.", - "version": "0.1.0", + "version": "0.2.0", "author": { "name": "Simgreek", "url": "https://git.simgreek.com/simgreek" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json new file mode 100644 index 0000000..1faa64f --- /dev/null +++ b/.codex-plugin/plugin.json @@ -0,0 +1,38 @@ +{ + "name": "praxis", + "version": "0.2.0", + "description": "Simgreek team's AI coding agent rulebook: SOP for Node.js projects, git hygiene, debugging, verification.", + "author": { + "name": "Simgreek", + "url": "https://git.simgreek.com/simgreek" + }, + "homepage": "https://git.simgreek.com/simgreek/praxis", + "repository": "https://git.simgreek.com/simgreek/praxis", + "license": "Internal", + "keywords": [ + "skills", + "sop", + "nodejs", + "git", + "debugging", + "team-rules" + ], + "skills": "./skills/", + "interface": { + "displayName": "Praxis", + "shortDescription": "Simgreek team's AI coding agent SOP", + "longDescription": "Use Praxis to make AI coding agents follow Simgreek team conventions: project entry, task framing, git workflow, encoding checks, root-cause debugging, and verification before completion.", + "developerName": "Simgreek", + "category": "Coding", + "capabilities": [ + "Interactive", + "Read", + "Write" + ], + "defaultPrompt": [ + "I'm starting a new task in this project — what should I check first?", + "Help me bootstrap this project to follow Praxis conventions." + ], + "websiteURL": "https://git.simgreek.com/simgreek/praxis" + } +} diff --git a/README.md b/README.md index ee5a11b..51b1458 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,13 @@ Simgreek 团队的 AI 协作开发约定。**给 AI 看的**——每个项目 源自希腊语 *praxis*(实践)。Simgreek 团队的"踩过坑就写下来"的总和,给 AI agent 用。 -两种用法: +支持三种用法(按完整度排序): -- **作为 Claude Code 插件**(推荐)—— `/plugin install praxis` 之后,session 一开 hook 就把 `using-praxis` 强制注入 context,AI 行为受铁律约束。 -- **作为外部规范**—— 不装插件也能用:AI 进项目前读 `AGENTS.md` + 扫 `skills/`,靠自觉调用。Codex / Cursor 走这条。 +- **作为 Claude Code 插件** —— `/plugin install praxis` 之后,session 一开 SessionStart hook 就把 `using-praxis` 强制注入 context,AI 行为受铁律约束。 +- **作为 Codex / Codex++ 插件** —— `/plugin add ` 装上,Codex 把 skills/ 里的 SKILL.md 注册成可调用的 skill。Codex 没有 SessionStart hook,但 skill 的 description 会让模型按需 invoke。 +- **作为外部规范**—— 不装插件也能用:AI 进项目前读 `AGENTS.md` + 扫 `skills/`,靠提示词显式调用。Cursor / 其他工具走这条。 -## 安装(Claude Code 插件) +## 安装(Claude Code) simgreek 仓库要求登录访问,所以 plugin URL 里要带个人 access token。每个团队成员一次性配一下。 @@ -36,17 +37,37 @@ simgreek 仓库要求登录访问,所以 plugin URL 里要带个人 access tok 装完之后每次开新 session,praxis 的 `SessionStart` hook 会把 `using-praxis` 内容直接灌进 system context——AI 在做任何事之前都会读到铁律和 red flags。 -**安全提醒**: - -- token 会被 Claude Code 写进本地 settings——别让别人翻你电脑,也别把 settings 文件分享出去 -- token 不要提交进任何仓库 -- 共用电脑 / 临时机器装完用完,去 Gitea token 页面 revoke 掉 -- token 失效或换了,重新跑 `/plugin marketplace add` 用新 URL - 升级:`/plugin update praxis`(自动用同一个 token 拉新版本) 卸载:`/plugin uninstall praxis` +## 安装(Codex / Codex++) + +token 准备方式与 Claude Code 一致(上面第 1 步)。 + +**在 Codex CLI 或 Codex++ 里**: + +``` +/plugin add https://:@git.simgreek.com/simgreek/praxis +``` + +Codex 拉取仓库后会读 `.codex-plugin/plugin.json`,把 `skills/` 下所有带 frontmatter 的 SKILL.md 注册成可调用 skill。需要时 AI 自己 invoke。 + +**和 Claude 的差别**:Codex 没有 SessionStart hook,所以 `using-praxis` 不会被强制注入。AI 进项目时,建议你**第一句话**说: + +``` +先读 using-praxis skill,了解我们团队的 SOP 再开始。 +``` + +让 Codex 主动 invoke 一次,铁律就在 context 里了。后续任务正常用。 + +**安全提醒(两边都适用)**: + +- token 会被工具写进本地配置——别让别人翻你电脑、别把 config 分享出去 +- token 不要提交进任何仓库 +- 共用电脑 / 临时机器装完用完,去 Gitea token 页面 revoke 掉 +- token 失效或换了,重新跑 install 命令用新 URL + ## 不装插件怎么用 把这段提示词丢给 AI 当首句话: