Skip to content

Commit 28b0792

Browse files
committed
docs: update dubbo-go agent skills
1 parent 173d928 commit 28b0792

37 files changed

Lines changed: 2099 additions & 1072 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3+
"name": "dubbo-go-agent-skills",
4+
"description": "Agent skills bundled with Apache dubbo-go for framework users and contributors",
5+
"owner": {
6+
"name": "Apache Dubbo"
7+
},
8+
"plugins": [
9+
{
10+
"name": "dubbo-go",
11+
"description": "AI skills for Apache dubbo-go contributors and v3 users: repository development, scaffolding, extensions, Java interop, debugging, guidance, and migration.",
12+
"category": "development",
13+
"source": {
14+
"source": "url",
15+
"url": "https://github.com/apache/dubbo-go.git"
16+
},
17+
"homepage": "https://github.com/apache/dubbo-go/tree/develop/.agents"
18+
}
19+
]
20+
}

.agents/.codex/INSTALL.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
# Installing dubbo-go Agent Skills for Codex
19+
20+
## Quick install
21+
22+
Tell Codex:
23+
24+
```text
25+
Fetch and follow instructions from https://raw.githubusercontent.com/apache/dubbo-go/main/.agents/.codex/INSTALL.md
26+
```
27+
28+
## Manual installation
29+
30+
Install the skills globally when you want Codex to use them outside an Apache dubbo-go checkout.
31+
32+
```bash
33+
git clone https://github.com/apache/dubbo-go.git ~/.codex/dubbo-go
34+
mkdir -p ~/.agents/skills
35+
ln -s ~/.codex/dubbo-go/.agents/skills ~/.agents/skills/dubbo-go
36+
```
37+
38+
Restart Codex.
39+
40+
### Windows
41+
42+
```powershell
43+
git clone https://github.com/apache/dubbo-go.git "$env:USERPROFILE\.codex\dubbo-go"
44+
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.agents\skills"
45+
cmd /c mklink /J "$env:USERPROFILE\.agents\skills\dubbo-go" "$env:USERPROFILE\.codex\dubbo-go\.agents\skills"
46+
```
47+
48+
## Updating
49+
50+
```bash
51+
cd ~/.codex/dubbo-go
52+
git pull --ff-only
53+
```
54+
55+
Restart Codex after updating.
56+
57+
## Usage
58+
59+
The installed skills cover repository development, scaffolding, extensions, Java interoperability, debugging, guidance, and migration for dubbo-go.

.agents/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
node_modules/
19+
.DS_Store
20+
*.log
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import { readFileSync } from 'fs';
19+
import { join, dirname } from 'path';
20+
import { fileURLToPath } from 'url';
21+
22+
const __dirname = dirname(fileURLToPath(import.meta.url));
23+
const pluginRoot = join(__dirname, '..', '..');
24+
25+
const skillNames = ['development', 'scaffolding', 'extensions', 'java-interop', 'debug', 'guide', 'migrate'];
26+
27+
export const skills = skillNames.map(name => {
28+
const skillPath = join(pluginRoot, 'skills', name, 'SKILL.md');
29+
let content;
30+
try {
31+
content = readFileSync(skillPath, 'utf-8');
32+
} catch (err) {
33+
throw new Error(`dubbo-go-agent-skills: failed to read ${skillPath}: ${err.message}`);
34+
}
35+
// Parse frontmatter (tolerates both LF and CRLF line endings)
36+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);
37+
const frontmatter = match ? match[1] : '';
38+
const body = match ? match[2] : content;
39+
const nameMatch = frontmatter.match(/^name:\s*(.+)$/m);
40+
const descMatch = frontmatter.match(/^description:\s*(.+)$/m);
41+
return {
42+
name: nameMatch ? nameMatch[1].trim() : `dubbo-go:${name}`,
43+
description: descMatch ? descMatch[1].trim() : '',
44+
content: body,
45+
};
46+
});

.agents/GEMINI.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
@./skills/development/SKILL.md
19+
@./skills/scaffolding/SKILL.md
20+
@./skills/extensions/SKILL.md
21+
@./skills/java-interop/SKILL.md
22+
@./skills/debug/SKILL.md
23+
@./skills/guide/SKILL.md
24+
@./skills/migrate/SKILL.md

.agents/README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
# dubbo-go Agent Skills
19+
20+
[English](README.md) | [中文](README_CN.md)
21+
22+
This directory contains AI agent skills bundled with [Apache dubbo-go](https://github.com/apache/dubbo-go). The skills help coding agents work with the dubbo-go repository, dubbo-go v3 applications, examples, extension points, Java interoperability, debugging, and migration tasks.
23+
24+
The package lives under `.agents/` so it can include multi-agent distribution metadata without overwriting dubbo-go repository root files.
25+
26+
> Note: All skills target dubbo-go v3. v1 and v2 are deprecated.
27+
28+
## Layout
29+
30+
- `skills/`: Codex-compatible skills. Codex reads this directory when working in this repository.
31+
- `.codex/INSTALL.md`: manual Codex installation notes for using these skills outside this checkout.
32+
- `.claude-plugin/marketplace.json`: Claude Code plugin marketplace metadata for this `.agents` package.
33+
- `.opencode/plugins/dubbo-go-agent-skills.js`: OpenCode adapter that exposes the bundled skills.
34+
- `GEMINI.md` and `gemini-extension.json`: Gemini CLI extension entry points.
35+
- `plugin.json` and `package.json`: generic plugin/package metadata for tools that can consume a package rooted at `.agents`.
36+
37+
## Using These Skills
38+
39+
When working inside an Apache dubbo-go checkout, Codex can load the repository-local skills from `.agents/skills` directly. No separate clone of a skills repository is required.
40+
41+
For global Codex usage outside this checkout, follow [.codex/INSTALL.md](.codex/INSTALL.md).
42+
43+
For OpenCode, Gemini CLI, or Claude Code packaging, treat `.agents` as the package root. The metadata files in this directory are intentionally relative to `.agents`.
44+
45+
## Skills
46+
47+
### development
48+
49+
Guides agents modifying the apache/dubbo-go repository itself. It covers current Go/toolchain expectations, package boundaries, validation commands, generated files, and repository-specific do-not rules.
50+
51+
### scaffolding
52+
53+
Generates provider or consumer skeletons in the current dubbo-go v3 code-API style. It covers direct mode, registry-backed services, Protobuf generation, OpenAPI, HTTP handler mounting, HTTP/3, and current sample patterns.
54+
55+
### extensions
56+
57+
Guides custom SPI extensions such as Filter, LoadBalance, Router, Registry, Protocol, ConfigCenter, and Logger. It covers the `extension.SetXxx` registration pattern, blank imports, activation options, and common failure modes.
58+
59+
### java-interop
60+
61+
Guides interoperability between dubbo-go and dubbo-java. It helps choose Triple+Protobuf or Dubbo+Hessian2, handle service discovery mapping, and debug cross-language serialization.
62+
63+
### debug
64+
65+
Provides structured diagnosis for runtime issues such as missing providers, registry mapping, connection failures, serialization mismatches, timeouts, OpenAPI issues, attached HTTP handlers, shutdown behavior, and filter panics.
66+
67+
### guide
68+
69+
Explains current dubbo-go architecture, extension points, and best practices. It covers Instance, Protocol, Registry, Metadata, Filter, Cluster, LoadBalance, Router, Triple OpenAPI, HTTP/3, CORS, graceful shutdown, observability, and sample locations.
70+
71+
### migrate
72+
73+
Guides migration from gRPC-Go, Spring Cloud, Gin/plain HTTP, older dubbo-go v1/v2 usage, YAML-heavy apps, Java Dubbo, and Hessian2 services to current dubbo-go v3 patterns.
74+
75+
## Contributing
76+
77+
Skills live in `.agents/skills`.
78+
79+
1. Add or edit a skill under `.agents/skills/<name>/SKILL.md`.
80+
2. Keep `SKILL.md` frontmatter concise and trigger-focused.
81+
3. Update this directory's metadata only when install paths, skill names, or supported agents change.
82+
4. Submit the change through the normal dubbo-go contribution workflow.
83+
84+
## License
85+
86+
Apache License 2.0

.agents/README_CN.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
# dubbo-go Agent Skills
19+
20+
[English](README.md) | 中文
21+
22+
本目录存放随 [Apache dubbo-go](https://github.com/apache/dubbo-go) 仓库一起维护的 AI Agent Skills。这些 skills 用于帮助编码 Agent 处理 dubbo-go 仓库源码、dubbo-go v3 应用、示例生成、扩展点、Java 互通、问题排查和迁移任务。
23+
24+
这套包放在 `.agents/` 下,是为了把多 Agent 分发元数据集中在一起,同时避免覆盖 dubbo-go 仓库根目录已有文件。
25+
26+
> 注意:所有 skills 都面向 dubbo-go v3。v1 和 v2 已废弃。
27+
28+
## 目录结构
29+
30+
- `skills/`:Codex 可直接加载的 skills。Codex 在本仓库工作时会读取该目录。
31+
- `.codex/INSTALL.md`:在本仓库外全局使用这些 skills 的 Codex 手动安装说明。
32+
- `.claude-plugin/marketplace.json`:面向 Claude Code 插件市场的元数据。
33+
- `.opencode/plugins/dubbo-go-agent-skills.js`:OpenCode 适配器,用于暴露本目录内的 skills。
34+
- `GEMINI.md``gemini-extension.json`:Gemini CLI 扩展入口。
35+
- `plugin.json``package.json`:供能够以 `.agents` 为包根目录的工具读取的通用元数据。
36+
37+
## 使用方式
38+
39+
在 Apache dubbo-go 仓库内工作时,Codex 可以直接从 `.agents/skills` 加载仓库内置 skills,不需要再单独克隆一个 skills 仓库。
40+
41+
如果要在本仓库外全局使用这套 Codex skills,请参考 [.codex/INSTALL.md](.codex/INSTALL.md)
42+
43+
如果用于 OpenCode、Gemini CLI 或 Claude Code 的插件包装,请把 `.agents` 视为包根目录。本目录中的元数据路径都按 `.agents` 为根来组织。
44+
45+
## Skills
46+
47+
### development
48+
49+
指导 Agent 修改 apache/dubbo-go 仓库本身,覆盖当前 Go/toolchain 要求、包边界、验证命令、生成文件和仓库级禁止事项。
50+
51+
### scaffolding
52+
53+
生成当前 dubbo-go v3 code API 风格的 provider 或 consumer 骨架,覆盖直连模式、注册中心服务、Protobuf 生成、OpenAPI、HTTP handler 挂载、HTTP/3 和当前示例模式。
54+
55+
### extensions
56+
57+
指导编写自定义 SPI 扩展,例如 Filter、LoadBalance、Router、Registry、Protocol、ConfigCenter、Logger。覆盖 `extension.SetXxx` 注册模式、blank import、启用方式和常见失败原因。
58+
59+
### java-interop
60+
61+
指导 dubbo-go 和 dubbo-java 互通。根据服务形态和兼容性需求,在 Triple+Protobuf 与 Dubbo+Hessian2 之间做选择,并处理服务发现映射和跨语言序列化问题。
62+
63+
### debug
64+
65+
为运行时问题提供结构化排查流程,例如 provider 找不到、注册中心映射、连接失败、序列化不匹配、超时、OpenAPI、HTTP handler 挂载、shutdown 和 filter panic。
66+
67+
### guide
68+
69+
解释当前 dubbo-go 架构、扩展点和最佳实践,覆盖 Instance、Protocol、Registry、Metadata、Filter、Cluster、LoadBalance、Router、Triple OpenAPI、HTTP/3、CORS、graceful shutdown、可观测性和示例位置。
70+
71+
### migrate
72+
73+
指导从 gRPC-Go、Spring Cloud、Gin/纯 HTTP、dubbo-go v1/v2、YAML-heavy 应用、Java Dubbo 和 Hessian2 服务迁移到当前 dubbo-go v3 模式。
74+
75+
## 贡献
76+
77+
Skills 位于 `.agents/skills`
78+
79+
1.`.agents/skills/<name>/SKILL.md` 下新增或修改 skill。
80+
2. 保持 `SKILL.md` frontmatter 简洁,并聚焦触发场景。
81+
3. 只有当安装路径、skill 名称或支持的 Agent 发生变化时,才更新本目录的元数据。
82+
4. 按 dubbo-go 正常贡献流程提交修改。
83+
84+
## License
85+
86+
Apache License 2.0

.agents/gemini-extension.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "dubbo-go-agent-skills",
3+
"description": "Agent skills bundled with Apache dubbo-go for repository development, v3 scaffolding, extensions, Java interop, debugging, guidance, and migration.",
4+
"version": "0.2.0",
5+
"contextFileName": "GEMINI.md"
6+
}

.agents/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "dubbo-go-agent-skills",
3+
"version": "0.2.0",
4+
"type": "module",
5+
"description": "Agent skills bundled with Apache dubbo-go for repository development, v3 scaffolding, extensions, Java interop, debugging, guidance, and migration.",
6+
"author": "Apache Dubbo contributors",
7+
"license": "Apache-2.0",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/apache/dubbo-go.git",
11+
"directory": ".agents"
12+
},
13+
"homepage": "https://github.com/apache/dubbo-go/tree/develop/.agents",
14+
"main": ".opencode/plugins/dubbo-go-agent-skills.js"
15+
}

.agents/plugin.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "dubbo-go",
3+
"version": "0.2.0",
4+
"description": "Agent skills bundled with Apache dubbo-go for repository development, v3 scaffolding, extensions, Java interop, debugging, guidance, and migration.",
5+
"author": "Apache Dubbo contributors",
6+
"skills": [
7+
"skills/development",
8+
"skills/scaffolding",
9+
"skills/extensions",
10+
"skills/java-interop",
11+
"skills/debug",
12+
"skills/guide",
13+
"skills/migrate"
14+
]
15+
}

0 commit comments

Comments
 (0)