@amonstack/gitea-mcp 0.2.1 → 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
@@ -107,17 +107,26 @@ Add to your opencode MCP configuration:
107
107
 
108
108
  If you built from source, use `node /path/to/gitea-mcp/dist/cli.js` instead.
109
109
 
110
- opencode also loads native **skills** — one per action (find, create, update,
111
- label, summarize, plan milestones, resolve repo) — that teach the assistant the
112
- safest workflow for that action, including pre-use checks and pitfalls. Install
113
- 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`):
114
115
 
115
116
  ```bash
116
- gitea-mcp skills install # global (~/.config/opencode/skills/)
117
- 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
118
122
  ```
119
123
 
120
- 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.
121
130
 
122
131
  ### Other MCP Clients
123
132
 
@@ -195,12 +204,12 @@ through three channels:
195
204
  `summarize_issue`, `audit_labels`, `milestone_report`) and on-demand reference
196
205
  docs (field reference, label guide, tool cookbook) for clients that surface them.
197
206
 
198
- ### opencode skills
207
+ ### Action skills
199
208
 
200
- For opencode, the server ships a set of **action-scoped skills** — one per
201
- workflow, so the assistant loads only the guidance it needs (and never, say,
202
- delete instructions while creating). Install them with the
203
- `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.
204
213
 
205
214
  | Skill | Invoke when |
206
215
  |-------|-------------|
@@ -209,14 +218,17 @@ delete instructions while creating). Install them with the
209
218
  | `gitea-update-issue` | editing fields, closing, clearing assignee/milestone |
210
219
  | `gitea-label-issue` | adding / replacing / removing / clearing labels on an issue |
211
220
  | `gitea-manage-labels` | creating or editing label definitions |
221
+ | `gitea-comment-issue` | posting a comment that advances an issue's discussion |
212
222
  | `gitea-summarize-issue` | reading and summarizing an issue's discussion |
213
223
  | `gitea-plan-milestones` | creating / editing / closing milestones |
214
224
  | `gitea-resolve-repo` | resolving owner/repo or listing repositories |
215
225
 
216
226
  Each skill is a short, AI-facing action flow (purpose, when to use, when not to,
217
- rules, and what to check first). Destructive single-tool actions (delete issue /
218
- comment / label / milestone) are intentionally left to the tool descriptions so
219
- 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.
220
232
 
221
233
  ## Development
222
234
 
package/README.zh-CN.md CHANGED
@@ -105,16 +105,24 @@ node dist/cli.js
105
105
 
106
106
  如果从源码构建,将 `command` 改为 `node /path/to/gitea-mcp/dist/cli.js`。
107
107
 
108
- opencode 还会加载原生**技能(skills)**——按动作拆分(查找、创建、更新、打
109
- 标签、总结、规划里程碑、解析仓库等),教会助手针对该动作的最安全工作流,含
110
- 使用前检查与各类陷阱。一次性安装:
108
+ opencode 及其它 AI 工具可加载原生**技能(skills)**——按动作拆分(查找、创建、
109
+ 更新、打标签、评论、总结、规划里程碑、解析仓库等),教会助手针对该动作的最安全
110
+ 工作流,含使用前检查与各类陷阱。用 `init` 命令一次性安装,并通过 `--tool` 指定
111
+ 目标工具(默认 `opencode`):
111
112
 
112
113
  ```bash
113
- gitea-mcp skills install # 全局(~/.config/opencode/skills/)
114
- 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 # 自定义路径
115
119
  ```
116
120
 
117
- 然后重启 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-引导与技能)。
118
126
 
119
127
  ### 其他 MCP 客户端
120
128
 
@@ -191,11 +199,11 @@ gitea-mcp
191
199
  `audit_labels`、`milestone_report`)与按需参考文档(字段参考、标签指南、工具
192
200
  食谱),供支持的客户端使用。
193
201
 
194
- ### opencode 技能
202
+ ### 动作技能
195
203
 
196
- 对 opencode,服务端内置了一组**按动作划分的技能**——每个工作流一个,助手只
197
- 加载所需指引(避免例如创建时把删除说明一并带入造成幻觉)。用上面 opencode
198
- 小节展示的 `gitea-mcp skills install` 命令安装。
204
+ 对 opencode 及其它工具,服务端内置了一组**按动作划分的技能**——每个工作流一
205
+ 个,助手只加载所需指引(避免例如创建时把删除说明一并带入造成幻觉)。用上方展示的
206
+ `gitea-mcp init --tool <name>` 命令安装。
199
207
 
200
208
  | 技能 | 何时触发 |
201
209
  |------|----------|
@@ -204,13 +212,15 @@ gitea-mcp
204
212
  | `gitea-update-issue` | 编辑字段、关闭、清空负责人/里程碑 |
205
213
  | `gitea-label-issue` | 为 issue 增加 / 替换 / 移除 / 清空标签 |
206
214
  | `gitea-manage-labels` | 创建或编辑标签定义 |
215
+ | `gitea-comment-issue` | 在 issue 下发表推动讨论的评论 |
207
216
  | `gitea-summarize-issue` | 读取并总结某 issue 的讨论 |
208
217
  | `gitea-plan-milestones` | 创建 / 编辑 / 关闭里程碑 |
209
218
  | `gitea-resolve-repo` | 解析 owner/repo 或列出仓库 |
210
219
 
211
220
  每个技能都是面向 AI 的简短动作流程(目的、何时用、何时不用、规则、先检查什么)。
212
- 破坏性的单工具操作(删除 issue / 评论 / 标签 / 里程碑)有意仅保留在工具描述里,
213
- 不会污染创建类工作流。
221
+ 创建、评论、里程碑三类技能还内嵌**正文模板**(bug / 新功能 / 性能 issue、评论、
222
+ 里程碑),用以规范助手所写内容的格式。破坏性的单工具操作(删除 issue / 评论 /
223
+ 标签 / 里程碑)有意仅保留在工具描述里,不会污染创建类工作流。
214
224
 
215
225
  ## 二次开发
216
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,CA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ions {
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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ACD,OAAO,SAAS,CAAC;AACnB,CAAC;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,6 +1,6 @@
1
1
  {
2
2
  "name": "@amonstack/gitea-mcp",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "MCP server for managing Gitea issues via API",
5
5
  "repository": {
6
6
  "type": "git",