- 新增 plugins/huanxi:Bearer Token 模式 MCP Server + 6 个工作流技能 (日报/负责人日报/周报/任务/组织),修正全部 MCP 工具签名 - 新增 plugins/memcore:memory-sync/update/lint 三技能记忆引擎, 修正 git add 范围避免误提交敏感文件 - CLAUDE.md:移除 version 字段示例,补充 userConfig/mcpServers 说明, 注入「记忆体系(会话启动必读)」区块 - .claude/memory/:初始化项目记忆索引(decisions/project_overview/ feedback_plugin_dev/lint_report) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
111 lines
3.6 KiB
Markdown
111 lines
3.6 KiB
Markdown
<!-- Last updated: 2026-05-01 | Commit: 0c46ed0 -->
|
||
# CLAUDE.md
|
||
|
||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||
|
||
## 项目概述
|
||
|
||
蚁熊公司内部 Claude Code Plugin Marketplace(技能市场)。开发者在此仓库中维护供全员安装使用的 Claude Code 插件(Plugin)和技能(Skill)。
|
||
|
||
## 目录结构
|
||
|
||
```
|
||
.claude-plugin/
|
||
└── marketplace.json # 市场索引:声明本仓库包含哪些插件
|
||
|
||
plugins/
|
||
└── <plugin-name>/ # 每个插件独占一个子目录
|
||
├── .claude-plugin/
|
||
│ └── plugin.json # 插件元数据(name, description, version, author)
|
||
└── skills/
|
||
└── <skill-name>/
|
||
└── SKILL.md # 技能实现(frontmatter + Markdown 指令)
|
||
```
|
||
|
||
## 核心文件格式
|
||
|
||
### marketplace.json(市场索引)
|
||
|
||
```json
|
||
{
|
||
"name": "yixiong-claude-hub",
|
||
"owner": { "name": "蚁熊团队" },
|
||
"description": "...",
|
||
"plugins": [
|
||
{ "name": "<plugin-name>", "source": "./plugins/<plugin-name>", "description": "..." }
|
||
]
|
||
}
|
||
```
|
||
|
||
每新增一个插件,必须在 `plugins` 数组中追加对应条目。
|
||
|
||
### plugin.json(插件元数据)
|
||
|
||
```json
|
||
{
|
||
"name": "plugin-name",
|
||
"description": "...",
|
||
"author": { "name": "蚁熊团队" }
|
||
}
|
||
```
|
||
|
||
**不设 `version` 字段**:Claude Code 自动用 git commit SHA 作为版本基准,每次推送 main 分支即为新版本,已安装用户会话启动时自动检测更新。
|
||
|
||
含 MCP Server 的插件额外支持 `userConfig`(用户敏感配置,存系统钥匙链)和 `mcpServers`(服务器声明),可在 headers 中用 `${user_config.KEY}` 引用用户配置。
|
||
|
||
### SKILL.md(技能实现)
|
||
|
||
```markdown
|
||
---
|
||
description: 一句话说明该技能的用途(Claude 用此判断何时触发该技能)
|
||
---
|
||
|
||
技能的具体指令内容…
|
||
```
|
||
|
||
`description` 字段是触发判据,务必精确描述使用场景,避免与其他技能产生歧义。
|
||
|
||
## 新增插件流程
|
||
|
||
1. 在 `plugins/` 下创建目录 `plugins/<plugin-name>/`
|
||
2. 创建 `plugins/<plugin-name>/.claude-plugin/plugin.json`
|
||
3. 在 `plugins/<plugin-name>/skills/<skill-name>/SKILL.md` 编写技能
|
||
4. 在 `.claude-plugin/marketplace.json` 的 `plugins` 数组中追加该插件条目
|
||
|
||
## 已发布插件
|
||
|
||
| 插件 | 技能 | 说明 |
|
||
|------|------|------|
|
||
| `huanxi` | `/huanxi-shared` `/huanxi-report` `/huanxi-leader` `/huanxi-task` `/huanxi-weekly` `/huanxi-org` | 寰汐企业管理系统完整工作流,含 MCP Server 自动配置 |
|
||
| `memcore` | `/memory-sync` `/memory-update` `/memory-lint` | 项目记忆体系核心引擎 |
|
||
|
||
### memcore 技能调用关系
|
||
|
||
```
|
||
/memory-sync ← 总编排(11 phases),调用下面两个技能
|
||
├── /memory-update ← 增量写入,可独立执行
|
||
└── /memory-lint ← 健康校验,可独立执行
|
||
```
|
||
|
||
## 记忆体系(会话启动必读)
|
||
|
||
> 每次新会话或长会话压缩后,必须先读 `MEMORY.md` 索引再按需加载文件。代码与记忆冲突 → 以代码为准并更新记忆。
|
||
|
||
### 读取流程
|
||
|
||
1. `cat .claude/memory/MEMORY.md` 获取清单
|
||
2. **必读**(type=`project`/`feedback`):decisions.md / feedback_plugin_dev.md / project_overview.md
|
||
3. **按需**(type=`lint`):lint_report.md
|
||
|
||
### 记忆目录骨架
|
||
|
||
```
|
||
.claude/memory/
|
||
├── MEMORY.md # 索引(入口)
|
||
├── decisions.md # 关键架构决策
|
||
├── project_overview.md # 项目定位与结构
|
||
├── feedback_plugin_dev.md # 插件开发协作规范
|
||
└── lint_report.md # 记忆健康检查报告(按需)
|
||
```
|
||
|