@amonstack/gitea-mcp 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ The server communicates over stdio and wraps the [Gitea REST API
18
18
 
19
19
  ## Installation
20
20
 
21
- ### From npm
21
+ ### From npm (npmjs.com)
22
22
 
23
23
  ```bash
24
24
  npm install -g @amonstack/gitea-mcp
@@ -30,6 +30,16 @@ Or run directly without global install:
30
30
  npx @amonstack/gitea-mcp
31
31
  ```
32
32
 
33
+ ### From GitHub Packages
34
+
35
+ Each release is also published to GitHub Packages. Route the `@amonstack` scope there
36
+ once, then install:
37
+
38
+ ```bash
39
+ echo "@amonstack:registry=https://npm.pkg.github.com" >> ~/.npmrc
40
+ npm install -g @amonstack/gitea-mcp
41
+ ```
42
+
33
43
  ### Build from source
34
44
 
35
45
  ```bash
@@ -97,17 +107,26 @@ Add to your opencode MCP configuration:
97
107
 
98
108
  If you built from source, use `node /path/to/gitea-mcp/dist/cli.js` instead.
99
109
 
100
- opencode also loads native **skills** — one per action (find, create, update,
101
- label, summarize, plan milestones, resolve repo) — that teach the assistant the
102
- safest workflow for that action, including pre-use checks and pitfalls. Install
103
- them once:
110
+ opencode and other AI tools can load native **skills** — one per action (find,
111
+ create, update, label, comment, summarize, plan milestones, resolve repo) — that
112
+ teach the assistant the safest workflow for that action, including pre-use checks
113
+ and pitfalls. Install them once with the `init` command, targeting your tool
114
+ (`--tool`, default `opencode`):
104
115
 
105
116
  ```bash
106
- gitea-mcp skills install # global (~/.config/opencode/skills/)
107
- gitea-mcp skills install --project # this project (./.opencode/skills/)
117
+ gitea-mcp init # opencode (global ~/.config/opencode/skills/)
118
+ gitea-mcp init --tool claude # Claude Code (~/.claude/skills/)
119
+ gitea-mcp init --tool cursor # Cursor (~/.cursor/skills/)
120
+ gitea-mcp init --project # this project (./.<tool>/skills/)
121
+ gitea-mcp init --dir /exact/path # custom location
108
122
  ```
109
123
 
110
- Then restart opencode. See [AI Guidance & Skills](#ai-guidance--skills) below.
124
+ Supported `--tool` values: `amazon-q`, `antigravity`, `auggie`, `claude`,
125
+ `cline`, `codex`, `codebuddy`, `continue`, `costrict`, `crush`, `cursor`,
126
+ `factory`, `gemini`, `github-copilot`, `iflow`, `kilocode`, `opencode`, `qoder`,
127
+ `qwen`, `roocode`, `windsurf`. Paths follow each tool's conventional skills
128
+ directory; use `--dir` for an exact location. Then restart your tool. See
129
+ [AI Guidance & Skills](#ai-guidance--skills) below.
111
130
 
112
131
  ### Other MCP Clients
113
132
 
@@ -185,12 +204,12 @@ through three channels:
185
204
  `summarize_issue`, `audit_labels`, `milestone_report`) and on-demand reference
186
205
  docs (field reference, label guide, tool cookbook) for clients that surface them.
187
206
 
188
- ### opencode skills
207
+ ### Action skills
189
208
 
190
- For opencode, the server ships a set of **action-scoped skills** — one per
191
- workflow, so the assistant loads only the guidance it needs (and never, say,
192
- delete instructions while creating). Install them with the
193
- `gitea-mcp skills install` command shown in the opencode section above.
209
+ For opencode and other tools, the server ships a set of **action-scoped skills**
210
+ — one per workflow, so the assistant loads only the guidance it needs (and never,
211
+ say, delete instructions while creating). Install them with the
212
+ `gitea-mcp init --tool <name>` command shown above.
194
213
 
195
214
  | Skill | Invoke when |
196
215
  |-------|-------------|
@@ -199,14 +218,17 @@ delete instructions while creating). Install them with the
199
218
  | `gitea-update-issue` | editing fields, closing, clearing assignee/milestone |
200
219
  | `gitea-label-issue` | adding / replacing / removing / clearing labels on an issue |
201
220
  | `gitea-manage-labels` | creating or editing label definitions |
221
+ | `gitea-comment-issue` | posting a comment that advances an issue's discussion |
202
222
  | `gitea-summarize-issue` | reading and summarizing an issue's discussion |
203
223
  | `gitea-plan-milestones` | creating / editing / closing milestones |
204
224
  | `gitea-resolve-repo` | resolving owner/repo or listing repositories |
205
225
 
206
226
  Each skill is a short, AI-facing action flow (purpose, when to use, when not to,
207
- rules, and what to check first). Destructive single-tool actions (delete issue /
208
- comment / label / milestone) are intentionally left to the tool descriptions so
209
- they never contaminate a creative workflow.
227
+ rules, and what to check first). The create, comment, and milestone skills also
228
+ embed **body templates** (bug / feature / performance issue, comment, milestone)
229
+ that standardize the format of what the assistant writes. Destructive
230
+ single-tool actions (delete issue / comment / label / milestone) are intentionally
231
+ left to the tool descriptions so they never contaminate a creative workflow.
210
232
 
211
233
  ## Development
212
234
 
package/README.zh-CN.md CHANGED
@@ -17,7 +17,7 @@ opencode、Cursor 等)后,AI 助手即可通过自然语言在 Gitea 实例
17
17
 
18
18
  ## 安装
19
19
 
20
- ### 从 npm 安装
20
+ ### 从 npm(npmjs.com)安装
21
21
 
22
22
  ```bash
23
23
  npm install -g @amonstack/gitea-mcp
@@ -29,6 +29,15 @@ npm install -g @amonstack/gitea-mcp
29
29
  npx @amonstack/gitea-mcp
30
30
  ```
31
31
 
32
+ ### 从 GitHub Packages 安装
33
+
34
+ 每个版本也会发布到 GitHub Packages。先把 `@amonstack` 作用域指向它,再安装:
35
+
36
+ ```bash
37
+ echo "@amonstack:registry=https://npm.pkg.github.com" >> ~/.npmrc
38
+ npm install -g @amonstack/gitea-mcp
39
+ ```
40
+
32
41
  ### 从源码构建
33
42
 
34
43
  ```bash
@@ -96,16 +105,24 @@ node dist/cli.js
96
105
 
97
106
  如果从源码构建,将 `command` 改为 `node /path/to/gitea-mcp/dist/cli.js`。
98
107
 
99
- opencode 还会加载原生**技能(skills)**——按动作拆分(查找、创建、更新、打
100
- 标签、总结、规划里程碑、解析仓库等),教会助手针对该动作的最安全工作流,含
101
- 使用前检查与各类陷阱。一次性安装:
108
+ opencode 及其它 AI 工具可加载原生**技能(skills)**——按动作拆分(查找、创建、
109
+ 更新、打标签、评论、总结、规划里程碑、解析仓库等),教会助手针对该动作的最安全
110
+ 工作流,含使用前检查与各类陷阱。用 `init` 命令一次性安装,并通过 `--tool` 指定
111
+ 目标工具(默认 `opencode`):
102
112
 
103
113
  ```bash
104
- gitea-mcp skills install # 全局(~/.config/opencode/skills/)
105
- gitea-mcp skills install --project # 仅当前项目(./.opencode/skills/)
114
+ gitea-mcp init # opencode(全局 ~/.config/opencode/skills/)
115
+ gitea-mcp init --tool claude # Claude Code(~/.claude/skills/)
116
+ gitea-mcp init --tool cursor # Cursor(~/.cursor/skills/)
117
+ gitea-mcp init --project # 仅当前项目(./.<tool>/skills/)
118
+ gitea-mcp init --dir /exact/path # 自定义路径
106
119
  ```
107
120
 
108
- 然后重启 opencode。详见下方 [AI 引导与技能](#ai-引导与技能)。
121
+ 支持的 `--tool` 取值:`amazon-q`、`antigravity`、`auggie`、`claude`、`cline`、
122
+ `codex`、`codebuddy`、`continue`、`costrict`、`crush`、`cursor`、`factory`、
123
+ `gemini`、`github-copilot`、`iflow`、`kilocode`、`opencode`、`qoder`、`qwen`、
124
+ `roocode`、`windsurf`。路径遵循各工具约定的 skills 目录;如需精确位置请用 `--dir`。
125
+ 随后重启对应工具。详见下方 [AI 引导与技能](#ai-引导与技能)。
109
126
 
110
127
  ### 其他 MCP 客户端
111
128
 
@@ -182,11 +199,11 @@ gitea-mcp
182
199
  `audit_labels`、`milestone_report`)与按需参考文档(字段参考、标签指南、工具
183
200
  食谱),供支持的客户端使用。
184
201
 
185
- ### opencode 技能
202
+ ### 动作技能
186
203
 
187
- 对 opencode,服务端内置了一组**按动作划分的技能**——每个工作流一个,助手只
188
- 加载所需指引(避免例如创建时把删除说明一并带入造成幻觉)。用上面 opencode
189
- 小节展示的 `gitea-mcp skills install` 命令安装。
204
+ 对 opencode 及其它工具,服务端内置了一组**按动作划分的技能**——每个工作流一
205
+ 个,助手只加载所需指引(避免例如创建时把删除说明一并带入造成幻觉)。用上方展示的
206
+ `gitea-mcp init --tool <name>` 命令安装。
190
207
 
191
208
  | 技能 | 何时触发 |
192
209
  |------|----------|
@@ -195,13 +212,15 @@ gitea-mcp
195
212
  | `gitea-update-issue` | 编辑字段、关闭、清空负责人/里程碑 |
196
213
  | `gitea-label-issue` | 为 issue 增加 / 替换 / 移除 / 清空标签 |
197
214
  | `gitea-manage-labels` | 创建或编辑标签定义 |
215
+ | `gitea-comment-issue` | 在 issue 下发表推动讨论的评论 |
198
216
  | `gitea-summarize-issue` | 读取并总结某 issue 的讨论 |
199
217
  | `gitea-plan-milestones` | 创建 / 编辑 / 关闭里程碑 |
200
218
  | `gitea-resolve-repo` | 解析 owner/repo 或列出仓库 |
201
219
 
202
220
  每个技能都是面向 AI 的简短动作流程(目的、何时用、何时不用、规则、先检查什么)。
203
- 破坏性的单工具操作(删除 issue / 评论 / 标签 / 里程碑)有意仅保留在工具描述里,
204
- 不会污染创建类工作流。
221
+ 创建、评论、里程碑三类技能还内嵌**正文模板**(bug / 新功能 / 性能 issue、评论、
222
+ 里程碑),用以规范助手所写内容的格式。破坏性的单工具操作(删除 issue / 评论 /
223
+ 标签 / 里程碑)有意仅保留在工具描述里,不会污染创建类工作流。
205
224
 
206
225
  ## 二次开发
207
226
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: gitea-comment-issue
3
+ description: Invoke to POST a new comment on a Gitea issue or pull request. The flow confirms the issue exists first, then posts. Do NOT invoke to edit or delete a comment (author/admin only, partly destructive — no skill), read or summarize the thread (gitea-summarize-issue), or create/edit the issue itself (gitea-create-issue / gitea-update-issue).
4
+ ---
5
+
6
+ # gitea-comment-issue
7
+
8
+ Post one new comment that advances an issue's discussion. Tools: `get_issue`, `create_comment`.
9
+
10
+ ## Prerequisites
11
+ - Resolve `owner`+`repo`: pass explicitly, else `GITEA_DEFAULT_OWNER`/`GITEA_DEFAULT_REPO`, else `resolve_repo` (gitea-resolve-repo). Never guess — wrong values post to the wrong place.
12
+ - `index` = the issue `number` (URL #N → N), never the internal `id`.
13
+
14
+ ## Flow
15
+ 1. CONFIRM TARGET: `get_issue({ index })` — verify the issue exists and is the one you mean. Do NOT post blind.
16
+ 2. POST: `create_comment({ index, body })`.
17
+
18
+ ## create_comment
19
+ - RULES: `body` required, Markdown. The comment APPENDS to the thread — it never edits or replaces prior content. The response carries the comment `id`; retain it only if a follow-up `update_comment` / `delete_comment` is planned.
20
+ - CHECK FIRST: re-read the latest thread (gitea-summarize-issue) so your comment is not redundant or contradicting a newer message.
21
+ - CHECK AFTER: the comment appears with the returned `id`.
22
+
23
+ ## Body template — standardize what you write into `body`
24
+ A useful comment is contextual, evidence-backed, and proposes a next step. Structure `body` with this template; drop sections that add nothing.
25
+
26
+ ```markdown
27
+ **Context:** <the point you are responding to>
28
+
29
+ **Finding / proposal:** <what you discovered or suggest>
30
+
31
+ **Evidence:** <log excerpt, link, reproduction, or metric>
32
+
33
+ **Suggested next step:** <the concrete action you propose>
34
+ ```
@@ -11,7 +11,7 @@ Open one new issue after ruling out a duplicate. Tools: `search_issues`, `create
11
11
  - Resolve `owner`+`repo`: pass explicitly, else `GITEA_DEFAULT_OWNER`/`GITEA_DEFAULT_REPO`, else `resolve_repo` (gitea-resolve-repo). Never guess — wrong values create the issue in the wrong repo.
12
12
 
13
13
  ## Flow
14
- 1. DUPLICATE CHECK (always first): `search_issues({ query: "<title keywords>", type: "issues" })`. If a match exists, comment on it (gitea-summarize-issue, then `create_comment`) instead of creating a duplicate. Do NOT skip this — creation does not de-duplicate.
14
+ 1. DUPLICATE CHECK (always first): `search_issues({ query: "<title keywords>", type: "issues" })`. If a match exists, comment on it (gitea-comment-issue) instead of creating a duplicate. Do NOT skip this — creation does not de-duplicate.
15
15
  2. CREATE: `create_issue({ title, body?, assignees? })`.
16
16
 
17
17
  ## create_issue
@@ -19,3 +19,46 @@ Open one new issue after ruling out a duplicate. Tools: `search_issues`, `create
19
19
  - Do NOT pass `labels` or `milestone` here: `labels` expect IDs (error-prone) and milestone needs an id. Create WITHOUT them, then attach labels by name via `add_issue_labels` (gitea-label-issue) and set the milestone via `update_issue` (gitea-update-issue).
20
20
  - CHECK FIRST: confirm no duplicate (step 1) and that `owner`/`repo` are correct before writing.
21
21
  - CHECK AFTER: the returned object's `number` is the new issue index.
22
+
23
+ ## Body templates — standardize what you write into `body`
24
+ Always structure `body` with the template matching the issue type. Ask the user which type if it is not obvious. Drop a section only when it is genuinely empty; never invent data. These are GitHub-OSS conventions adapted for the Markdown body that `create_issue` accepts.
25
+
26
+ ### Bug report
27
+ ```markdown
28
+ **Summary:** <one-line description of what is wrong>
29
+
30
+ **Steps to reproduce**
31
+ 1. <step>
32
+ 2. <step>
33
+
34
+ **Expected:** <what should happen>
35
+ **Actual:** <what happens instead>
36
+
37
+ **Environment**
38
+ - gitea-mcp version:
39
+ - Gitea version:
40
+ - Node / runtime:
41
+ - OS:
42
+ ```
43
+
44
+ ### Feature request
45
+ ```markdown
46
+ **Motivation:** <the problem or need this addresses>
47
+
48
+ **Proposal:** <what to add or change>
49
+
50
+ **Alternatives considered:** <other approaches and why they fall short>
51
+ ```
52
+
53
+ ### Performance issue
54
+ ```markdown
55
+ **Symptom:** <what is slow, or which metric regressed>
56
+
57
+ **How to reproduce:** <scenario + data size / load>
58
+
59
+ **Measurements**
60
+ - Before: <baseline metric>
61
+ - After / target: <current or goal metric>
62
+
63
+ **Suspected bottleneck:** <where the cost seems to come from>
64
+ ```
@@ -22,3 +22,20 @@ Create / edit / close milestones. Tools: `list_milestones`, `get_milestone`, `cr
22
22
 
23
23
  ## get_milestone
24
24
  - Read one milestone by `id`: includes `open_issues` / `closed_issues` counts for progress (progress = closed / (open + closed)).
25
+
26
+ ## Description template — standardize what you write into `description`
27
+ Milestones succeed when scope is explicit. When creating or editing, structure `description` with this template; keep it short and drop empty sections.
28
+
29
+ ```markdown
30
+ **Goal:** <the single outcome this milestone delivers>
31
+
32
+ **Scope**
33
+ - In: <what this milestone covers>
34
+ - Out: <what is explicitly deferred>
35
+
36
+ **Acceptance criteria**
37
+ - <observable, checkable condition>
38
+ - <observable, checkable condition>
39
+
40
+ **Owners:** <who is accountable>
41
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gitea-summarize-issue
3
- description: Invoke to READ and SUMMARIZE an issue's discussion — the issue body plus its comment thread. Do NOT invoke to create/edit an issue (gitea-create-issue / gitea-update-issue), post or edit a comment (no skill — single tool), or manage labels/milestones.
3
+ description: Invoke to READ and SUMMARIZE an issue's discussion — the issue body plus its comment thread. Do NOT invoke to create/edit an issue (gitea-create-issue / gitea-update-issue), post a comment (gitea-comment-issue), or manage labels/milestones.
4
4
  ---
5
5
 
6
6
  # gitea-summarize-issue
package/dist/cli.js CHANGED
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { runServer } from "./server.js";
3
3
  const argv = process.argv.slice(2);
4
- if (argv[0] === "skills") {
5
- // `gitea-mcp skills ...` manages the bundled opencode skill. It needs no Gitea
6
- // credentials, so it is dispatched before the env-var guard below.
7
- const { runSkillsCommand } = await import("./skills.js");
8
- runSkillsCommand(argv.slice(1)).catch((err) => {
4
+ if (argv[0] === "init") {
5
+ // `gitea-mcp init [--tool <name>]` installs the bundled skills into a target
6
+ // AI tool's skills directory. It needs no Gitea credentials, so it is
7
+ // dispatched before the env-var guard below.
8
+ const { runInitCommand } = await import("./skills.js");
9
+ runInitCommand(argv.slice(1)).catch((err) => {
9
10
  console.error("Fatal error:", err);
10
11
  process.exit(1);
11
12
  });
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;IACzB,+EAA+E;IAC/E,mEAAmE;IACnE,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IACzD,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC5C,OAAO,CAAC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AAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;QACnD,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;KAAM,CAAC;IACN,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACtC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;IACrD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAEnD,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;QACvB,OAAO,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;QACnF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;QAC1E,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1 @@
1
+ export { createServer, runServer } from "./server.js";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { createServer, runServer } from "./server.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
package/dist/skills.d.ts CHANGED
@@ -1,24 +1,44 @@
1
- export interface InstallOptions {
1
+ export interface InitOptions {
2
+ tool: string;
2
3
  project: boolean;
3
4
  dir?: string;
4
5
  }
6
+ /** A supported target tool and where its skills live. */
7
+ export interface ToolTarget {
8
+ /** Human-readable label. */
9
+ label: string;
10
+ /** Absolute global skills directory for this tool (lazy — evaluated at resolve time). */
11
+ globalSkillsDir: () => string;
12
+ /** Project-relative skills directory for this tool (relative to cwd). */
13
+ projectSkillsDir: string;
14
+ }
15
+ export declare const TOOL_REGISTRY: Record<string, ToolTarget>;
16
+ /** Sorted list of supported tool names (for help and error messages). */
17
+ export declare function supportedTools(): string[];
18
+ /** Look up a tool, throwing a helpful error listing every supported tool. */
19
+ export declare function resolveTool(name: string): ToolTarget;
5
20
  /** Absolute path to the directory of bundled skills shipped inside dist/. */
6
21
  export declare function bundledSkillsDir(): string;
7
22
  /**
8
23
  * Skills root to install into. Each bundled skill (a subdirectory containing a
9
24
  * SKILL.md) is copied to `<root>/<skill-name>/`. Precedence: explicit --dir >
10
- * --project (./.opencode/skills) > global opencode skills dir.
25
+ * --project (./.<tool>/skills) > the tool's global skills dir.
26
+ */
27
+ export declare function resolveInstallDir(opts: InitOptions): string;
28
+ /** Parse `gitea-mcp init [flags]`. Throws on unknown flags or missing values. */
29
+ export declare function parseInitArgs(argv: string[]): InitOptions;
30
+ /**
31
+ * Copy every skill (each subdirectory of `srcDir` containing a SKILL.md) into
32
+ * `<destRoot>/<skill-name>/`, recursing into nested folders. Returns the names
33
+ * of the skills installed. Throws if `srcDir` cannot be read or holds no skill.
34
+ * Extracted from `runInitCommand` so the copy loop (and its error branches) can
35
+ * be exercised against a crafted temp tree without mocking the filesystem.
11
36
  */
12
- export declare function resolveInstallDir(opts: InstallOptions): string;
13
- /** Parse `gitea-mcp skills <command> [flags]`. Throws on unknown flags or missing --dir value. */
14
- export declare function parseInstallArgs(argv: string[]): {
15
- command: string | undefined;
16
- opts: InstallOptions;
17
- };
37
+ export declare function installSkills(srcDir: string, destRoot: string): Promise<string[]>;
18
38
  /**
19
- * Implements `gitea-mcp skills install`: copies every bundled opencode skill
20
- * (each subdirectory of dist/assets/skills containing a SKILL.md) into the
21
- * opencode skills directory so opencode loads them on next start. Does NOT need
39
+ * Implements `gitea-mcp init`: copies every bundled skill (each subdirectory of
40
+ * dist/assets/skills containing a SKILL.md) into the target tool's skills
41
+ * directory so the tool loads them on next start. Does NOT need
22
42
  * GITEA_BASE_URL / GITEA_TOKEN.
23
43
  */
24
- export declare function runSkillsCommand(argv: string[]): Promise<void>;
44
+ export declare function runInitCommand(argv: string[]): Promise<void>;
package/dist/skills.js CHANGED
@@ -4,9 +4,64 @@ import { homedir } from "node:os";
4
4
  import { fileURLToPath } from "node:url";
5
5
  const BUNDLED_SKILLS_REL = ["assets", "skills"];
6
6
  const SKILL_FILENAME = "SKILL.md";
7
- const USAGE = `Usage: gitea-mcp skills install [--project] [--dir <path>]
8
- --project install into ./.opencode/skills/ (this project) instead of global
9
- --dir <path> install into this exact directory (treated as the skills root)`;
7
+ const DEFAULT_TOOL = "opencode";
8
+ const USAGE = `Usage: gitea-mcp init [--tool <name>] [--project] [--dir <path>]
9
+ --tool <name> target AI tool (default: ${DEFAULT_TOOL})
10
+ --project install into ./.<tool>/skills/ instead of the tool's global skills dir
11
+ --dir <path> install into this exact directory (overrides --tool and --project)
12
+ Supported tools:
13
+ amazon-q, antigravity, auggie, claude, cline, codex, codebuddy, continue,
14
+ costrict, crush, cursor, factory, gemini, github-copilot, iflow, kilocode,
15
+ opencode, qoder, qwen, roocode, windsurf`;
16
+ /** opencode honors OPENCODE_CONFIG_DIR; everything else is home-relative. */
17
+ function opencodeBase() {
18
+ return process.env.OPENCODE_CONFIG_DIR ?? join(homedir(), ".config", "opencode");
19
+ }
20
+ /**
21
+ * Registry of supported tools and their conventional skills directories.
22
+ *
23
+ * Global paths follow each tool's documented config home plus a `skills/`
24
+ * folder. For tools without a publicly documented skills folder, a
25
+ * `~/.config/<tool>/skills/` convention is used; override the destination
26
+ * with `--dir <path>` for an exact location.
27
+ */
28
+ /** Lazy home-relative path (homedir is read at call time). */
29
+ const home = (...parts) => join(homedir(), ...parts);
30
+ export const TOOL_REGISTRY = {
31
+ "amazon-q": { label: "Amazon Q", globalSkillsDir: () => home(".aws", "amazonq", "skills"), projectSkillsDir: join(".amazonq", "skills") },
32
+ antigravity: { label: "Antigravity", globalSkillsDir: () => home(".config", "antigravity", "skills"), projectSkillsDir: join(".antigravity", "skills") },
33
+ auggie: { label: "Auggie", globalSkillsDir: () => home(".config", "auggie", "skills"), projectSkillsDir: join(".auggie", "skills") },
34
+ claude: { label: "Claude Code", globalSkillsDir: () => home(".claude", "skills"), projectSkillsDir: join(".claude", "skills") },
35
+ cline: { label: "Cline", globalSkillsDir: () => home(".cline", "skills"), projectSkillsDir: join(".cline", "skills") },
36
+ codex: { label: "Codex CLI", globalSkillsDir: () => home(".codex", "skills"), projectSkillsDir: join(".codex", "skills") },
37
+ codebuddy: { label: "CodeBuddy", globalSkillsDir: () => home(".config", "codebuddy", "skills"), projectSkillsDir: join(".codebuddy", "skills") },
38
+ continue: { label: "Continue", globalSkillsDir: () => home(".continue", "skills"), projectSkillsDir: join(".continue", "skills") },
39
+ costrict: { label: "Costrict", globalSkillsDir: () => home(".config", "costrict", "skills"), projectSkillsDir: join(".costrict", "skills") },
40
+ crush: { label: "Crush", globalSkillsDir: () => home(".config", "crush", "skills"), projectSkillsDir: join(".crush", "skills") },
41
+ cursor: { label: "Cursor", globalSkillsDir: () => home(".cursor", "skills"), projectSkillsDir: join(".cursor", "skills") },
42
+ factory: { label: "Factory", globalSkillsDir: () => home(".factory", "skills"), projectSkillsDir: join(".factory", "skills") },
43
+ gemini: { label: "Gemini CLI", globalSkillsDir: () => home(".gemini", "skills"), projectSkillsDir: join(".gemini", "skills") },
44
+ "github-copilot": { label: "GitHub Copilot", globalSkillsDir: () => home(".config", "github-copilot", "skills"), projectSkillsDir: join(".github", "copilot", "skills") },
45
+ iflow: { label: "iFlow", globalSkillsDir: () => home(".config", "iflow", "skills"), projectSkillsDir: join(".iflow", "skills") },
46
+ kilocode: { label: "Kilo Code", globalSkillsDir: () => home(".kilo", "skills"), projectSkillsDir: join(".kilo", "skills") },
47
+ opencode: { label: "opencode", globalSkillsDir: () => join(opencodeBase(), "skills"), projectSkillsDir: join(".opencode", "skills") },
48
+ qoder: { label: "Qoder", globalSkillsDir: () => home(".config", "qoder", "skills"), projectSkillsDir: join(".qoder", "skills") },
49
+ qwen: { label: "Qwen Code", globalSkillsDir: () => home(".qwen", "skills"), projectSkillsDir: join(".qwen", "skills") },
50
+ roocode: { label: "Roo Code", globalSkillsDir: () => home(".roo", "skills"), projectSkillsDir: join(".roo", "skills") },
51
+ windsurf: { label: "Windsurf", globalSkillsDir: () => home(".codeium", "windsurf", "skills"), projectSkillsDir: join(".windsurf", "skills") },
52
+ };
53
+ /** Sorted list of supported tool names (for help and error messages). */
54
+ export function supportedTools() {
55
+ return Object.keys(TOOL_REGISTRY).sort();
56
+ }
57
+ /** Look up a tool, throwing a helpful error listing every supported tool. */
58
+ export function resolveTool(name) {
59
+ const target = TOOL_REGISTRY[name];
60
+ if (!target) {
61
+ throw new Error(`Unsupported tool: ${name}\nSupported tools: ${supportedTools().join(", ")}`);
62
+ }
63
+ return target;
64
+ }
10
65
  /** Absolute path to the directory of bundled skills shipped inside dist/. */
11
66
  export function bundledSkillsDir() {
12
67
  const moduleDir = dirname(fileURLToPath(import.meta.url));
@@ -15,25 +70,33 @@ export function bundledSkillsDir() {
15
70
  /**
16
71
  * Skills root to install into. Each bundled skill (a subdirectory containing a
17
72
  * SKILL.md) is copied to `<root>/<skill-name>/`. Precedence: explicit --dir >
18
- * --project (./.opencode/skills) > global opencode skills dir.
73
+ * --project (./.<tool>/skills) > the tool's global skills dir.
19
74
  */
20
75
  export function resolveInstallDir(opts) {
21
76
  if (opts.dir)
22
77
  return opts.dir;
78
+ const target = resolveTool(opts.tool);
23
79
  if (opts.project)
24
- return join(process.cwd(), ".opencode", "skills");
25
- const base = process.env.OPENCODE_CONFIG_DIR ?? join(homedir(), ".config", "opencode");
26
- return join(base, "skills");
80
+ return join(process.cwd(), target.projectSkillsDir);
81
+ return target.globalSkillsDir();
27
82
  }
28
- /** Parse `gitea-mcp skills <command> [flags]`. Throws on unknown flags or missing --dir value. */
29
- export function parseInstallArgs(argv) {
30
- const opts = { project: false };
31
- let command;
83
+ /** Parse `gitea-mcp init [flags]`. Throws on unknown flags or missing values. */
84
+ export function parseInitArgs(argv) {
85
+ const opts = { tool: DEFAULT_TOOL, project: false };
32
86
  for (let i = 0; i < argv.length; i++) {
33
87
  const a = argv[i];
34
88
  if (a === "--project") {
35
89
  opts.project = true;
36
90
  }
91
+ else if (a === "--tool") {
92
+ const val = argv[++i];
93
+ if (!val)
94
+ throw new Error("--tool requires a name argument");
95
+ opts.tool = val;
96
+ }
97
+ else if (a.startsWith("--tool=")) {
98
+ opts.tool = a.slice("--tool=".length);
99
+ }
37
100
  else if (a === "--dir") {
38
101
  const val = argv[++i];
39
102
  if (!val)
@@ -43,14 +106,14 @@ export function parseInstallArgs(argv) {
43
106
  else if (a.startsWith("--dir=")) {
44
107
  opts.dir = a.slice("--dir=".length);
45
108
  }
46
- else if (command === undefined && !a.startsWith("-")) {
47
- command = a;
109
+ else if (a === "--help" || a === "-h") {
110
+ throw new Error(USAGE);
48
111
  }
49
112
  else {
50
- throw new Error(`Unknown argument: ${a}`);
113
+ throw new Error(`Unknown argument: ${a}\n${USAGE}`);
51
114
  }
52
115
  }
53
- return { command, opts };
116
+ return opts;
54
117
  }
55
118
  /** Recursively copy a directory tree (no experimental fs.cp dependency). */
56
119
  async function copyTree(src, dest) {
@@ -68,18 +131,13 @@ async function copyTree(src, dest) {
68
131
  }
69
132
  }
70
133
  /**
71
- * Implements `gitea-mcp skills install`: copies every bundled opencode skill
72
- * (each subdirectory of dist/assets/skills containing a SKILL.md) into the
73
- * opencode skills directory so opencode loads them on next start. Does NOT need
74
- * GITEA_BASE_URL / GITEA_TOKEN.
134
+ * Copy every skill (each subdirectory of `srcDir` containing a SKILL.md) into
135
+ * `<destRoot>/<skill-name>/`, recursing into nested folders. Returns the names
136
+ * of the skills installed. Throws if `srcDir` cannot be read or holds no skill.
137
+ * Extracted from `runInitCommand` so the copy loop (and its error branches) can
138
+ * be exercised against a crafted temp tree without mocking the filesystem.
75
139
  */
76
- export async function runSkillsCommand(argv) {
77
- const { command, opts } = parseInstallArgs(argv);
78
- if (command !== "install") {
79
- const reason = command ? `Unknown skills subcommand: ${command}` : "Missing skills subcommand";
80
- throw new Error(`${reason}\n${USAGE}`);
81
- }
82
- const srcDir = bundledSkillsDir();
140
+ export async function installSkills(srcDir, destRoot) {
83
141
  let entries;
84
142
  try {
85
143
  entries = await readdir(srcDir, { withFileTypes: true });
@@ -87,7 +145,6 @@ export async function runSkillsCommand(argv) {
87
145
  catch {
88
146
  throw new Error(`Bundled skills not found at ${srcDir}. The package may be corrupted or was installed without its assets.`);
89
147
  }
90
- const destRoot = resolveInstallDir(opts);
91
148
  const installed = [];
92
149
  for (const entry of entries) {
93
150
  if (!entry.isDirectory())
@@ -105,9 +162,22 @@ export async function runSkillsCommand(argv) {
105
162
  if (installed.length === 0) {
106
163
  throw new Error(`No skills found to install under ${srcDir}.`);
107
164
  }
108
- process.stdout.write(`Installed ${installed.length} gitea-mcp skill(s) -> ${destRoot}\n`);
165
+ return installed;
166
+ }
167
+ /**
168
+ * Implements `gitea-mcp init`: copies every bundled skill (each subdirectory of
169
+ * dist/assets/skills containing a SKILL.md) into the target tool's skills
170
+ * directory so the tool loads them on next start. Does NOT need
171
+ * GITEA_BASE_URL / GITEA_TOKEN.
172
+ */
173
+ export async function runInitCommand(argv) {
174
+ const opts = parseInitArgs(argv);
175
+ const target = resolveTool(opts.tool);
176
+ const destRoot = resolveInstallDir(opts);
177
+ const installed = await installSkills(bundledSkillsDir(), destRoot);
178
+ process.stdout.write(`Installed ${installed.length} gitea-mcp skill(s) for ${target.label} -> ${destRoot}\n`);
109
179
  for (const name of installed)
110
180
  process.stdout.write(` - ${name}\n`);
111
- process.stdout.write("Restart opencode for the skills to take effect.\n");
181
+ process.stdout.write(`Restart ${target.label} for the skills to take effect.\n`);
112
182
  }
113
183
  //# sourceMappingURL=skills.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,kBAAkB,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AACzD,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC,MAAM,KAAK,GAAG;;8EAEgE,CAAC;AAO/E,6EAA6E;AAC7E,MAAM,UAAU,gBAAgB;IAC9B,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC,SAAS,EAAE,GAAG,kBAAkB,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAoB;IACpD,IAAI,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC;IAC9B,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACvF,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,g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AAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc;IACjD,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,gBAAgB,EAAE,EAAE,QAAQ,CAAC,CAAC;IAEpE,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,aAAa,SAAS,CAAC,MAAM,2BAA2B,MAAM,CAAC,KAAK,OAAO,QAAQ,IAAI,CACxF,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,SAAS;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;IACpE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,MAAM,CAAC,KAAK,mCAAmC,CAAC,CAAC;AACnF,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,15 @@
1
1
  {
2
2
  "name": "@amonstack/gitea-mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "MCP server for managing Gitea issues via API",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/amonstack/gitea_mcp.git"
8
+ },
9
+ "homepage": "https://github.com/amonstack/gitea_mcp#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/amonstack/gitea_mcp/issues"
12
+ },
5
13
  "type": "module",
6
14
  "main": "dist/index.js",
7
15
  "bin": {
@@ -29,8 +37,11 @@
29
37
  "gitea",
30
38
  "issues"
31
39
  ],
32
- "author": "",
40
+ "author": "amonstack",
33
41
  "license": "MIT",
42
+ "engines": {
43
+ "node": ">=18"
44
+ },
34
45
  "dependencies": {
35
46
  "@modelcontextprotocol/sdk": "^1.29.0",
36
47
  "zod": "^4.4.3"