ima-claude 2.10.0 → 2.13.0
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 +20 -15
- package/dist/cli.js +385 -17
- package/package.json +1 -1
- package/platforms/gemini/adapter.ts +443 -0
- package/platforms/gemini/gemini-extension.json +17 -0
- package/platforms/gemini/hooks-translator.py +66 -0
- package/platforms/shared/detector.ts +5 -1
- package/plugins/ima-claude/.claude-plugin/plugin.json +2 -2
- package/plugins/ima-claude/skills/gh-cli/SKILL.md +286 -0
- package/plugins/ima-claude/skills/mcp-gitea/SKILL.md +358 -0
- package/plugins/ima-claude/skills/mcp-github/SKILL.md +200 -0
- package/plugins/ima-claude/skills/mcp-qdrant/SKILL.md +21 -10
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gh-cli
|
|
3
|
+
description: >-
|
|
4
|
+
GitHub CLI (gh) for pull requests, issues, releases, Actions, code review, and repo
|
|
5
|
+
management. Primary tool for GitHub operations — reliable, fast, always available.
|
|
6
|
+
Use when: creating PRs, reviewing PRs, managing issues, checking CI status, creating
|
|
7
|
+
releases, searching GitHub, or any github.com operation. Triggers on: GitHub, gh,
|
|
8
|
+
pull request, PR, issue, release, actions, workflow, CI status, code review, merge PR.
|
|
9
|
+
NOT for Gitea — use mcp-gitea for internal repos.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# GitHub CLI (`gh`) — GitHub Operations
|
|
13
|
+
|
|
14
|
+
The `gh` CLI is the primary tool for all GitHub operations. It's authenticated, reliable, and covers the full GitHub API surface.
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Verify authentication
|
|
20
|
+
gh auth status
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The CLI must be authenticated (`gh auth login`) before use. Verify scopes with `gh auth status`.
|
|
24
|
+
|
|
25
|
+
## Command Reference
|
|
26
|
+
|
|
27
|
+
### Pull Requests
|
|
28
|
+
|
|
29
|
+
| Operation | Command |
|
|
30
|
+
|-----------|---------|
|
|
31
|
+
| Create PR | `gh pr create --title "..." --body "..." --base main` |
|
|
32
|
+
| Create PR (fill from commits) | `gh pr create --fill` |
|
|
33
|
+
| Create draft PR | `gh pr create --draft --title "..." --body "..."` |
|
|
34
|
+
| List open PRs | `gh pr list` |
|
|
35
|
+
| List PRs by state | `gh pr list --state closed` |
|
|
36
|
+
| List PRs by author | `gh pr list --author "@me"` |
|
|
37
|
+
| List PRs by label | `gh pr list --label "bug"` |
|
|
38
|
+
| View PR details | `gh pr view 123` |
|
|
39
|
+
| View PR in browser | `gh pr view 123 --web` |
|
|
40
|
+
| View PR diff | `gh pr diff 123` |
|
|
41
|
+
| Check CI status | `gh pr checks 123` |
|
|
42
|
+
| Checkout PR locally | `gh pr checkout 123` |
|
|
43
|
+
| Merge PR (squash) | `gh pr merge 123 --squash` |
|
|
44
|
+
| Merge PR (rebase) | `gh pr merge 123 --rebase` |
|
|
45
|
+
| Merge PR (merge commit) | `gh pr merge 123 --merge` |
|
|
46
|
+
| Merge + delete branch | `gh pr merge 123 --squash --delete-branch` |
|
|
47
|
+
| Close PR | `gh pr close 123` |
|
|
48
|
+
| Reopen PR | `gh pr reopen 123` |
|
|
49
|
+
| Edit PR | `gh pr edit 123 --title "..." --body "..."` |
|
|
50
|
+
| Add reviewer | `gh pr edit 123 --add-reviewer username` |
|
|
51
|
+
| Add label | `gh pr edit 123 --add-label "bug"` |
|
|
52
|
+
| Mark as ready | `gh pr ready 123` |
|
|
53
|
+
| Comment on PR | `gh pr comment 123 --body "..."` |
|
|
54
|
+
| Review PR (approve) | `gh pr review 123 --approve --body "LGTM"` |
|
|
55
|
+
| Review PR (request changes) | `gh pr review 123 --request-changes --body "..."` |
|
|
56
|
+
| Review PR (comment only) | `gh pr review 123 --comment --body "..."` |
|
|
57
|
+
| My PR status | `gh pr status` |
|
|
58
|
+
|
|
59
|
+
### Issues
|
|
60
|
+
|
|
61
|
+
| Operation | Command |
|
|
62
|
+
|-----------|---------|
|
|
63
|
+
| Create issue | `gh issue create --title "..." --body "..."` |
|
|
64
|
+
| Create issue with labels | `gh issue create --title "..." --label "bug" --label "priority"` |
|
|
65
|
+
| Create issue with assignee | `gh issue create --title "..." --assignee "@me"` |
|
|
66
|
+
| List open issues | `gh issue list` |
|
|
67
|
+
| List by state | `gh issue list --state closed` |
|
|
68
|
+
| List by label | `gh issue list --label "bug"` |
|
|
69
|
+
| List by assignee | `gh issue list --assignee "@me"` |
|
|
70
|
+
| View issue | `gh issue view 42` |
|
|
71
|
+
| View in browser | `gh issue view 42 --web` |
|
|
72
|
+
| Close issue | `gh issue close 42` |
|
|
73
|
+
| Close with comment | `gh issue close 42 --comment "Fixed in v2.11.0"` |
|
|
74
|
+
| Reopen issue | `gh issue reopen 42` |
|
|
75
|
+
| Comment on issue | `gh issue comment 42 --body "..."` |
|
|
76
|
+
| Edit issue | `gh issue edit 42 --title "..." --body "..."` |
|
|
77
|
+
| Add label | `gh issue edit 42 --add-label "in-progress"` |
|
|
78
|
+
| Remove label | `gh issue edit 42 --remove-label "triage"` |
|
|
79
|
+
| Assign | `gh issue edit 42 --add-assignee username` |
|
|
80
|
+
| Pin issue | `gh issue pin 42` |
|
|
81
|
+
| Transfer issue | `gh issue transfer 42 owner/other-repo` |
|
|
82
|
+
| My issue status | `gh issue status` |
|
|
83
|
+
|
|
84
|
+
### Repositories
|
|
85
|
+
|
|
86
|
+
| Operation | Command |
|
|
87
|
+
|-----------|---------|
|
|
88
|
+
| View repo | `gh repo view owner/name` |
|
|
89
|
+
| View in browser | `gh repo view --web` |
|
|
90
|
+
| Clone repo | `gh repo clone owner/name` |
|
|
91
|
+
| Fork repo | `gh repo fork owner/name` |
|
|
92
|
+
| Create repo | `gh repo create name --public --description "..."` |
|
|
93
|
+
| Create private repo | `gh repo create name --private` |
|
|
94
|
+
| List my repos | `gh repo list` |
|
|
95
|
+
| List org repos | `gh repo list org-name` |
|
|
96
|
+
| Sync fork | `gh repo sync owner/name` |
|
|
97
|
+
| Set default repo | `gh repo set-default owner/name` |
|
|
98
|
+
|
|
99
|
+
### Releases & Tags
|
|
100
|
+
|
|
101
|
+
| Operation | Command |
|
|
102
|
+
|-----------|---------|
|
|
103
|
+
| Create release | `gh release create v1.0.0 --title "v1.0.0" --notes "..."` |
|
|
104
|
+
| Create draft release | `gh release create v1.0.0 --draft --title "v1.0.0" --notes "..."` |
|
|
105
|
+
| Create release from tag | `gh release create v1.0.0 --generate-notes` |
|
|
106
|
+
| Upload assets | `gh release upload v1.0.0 ./dist/*.tar.gz` |
|
|
107
|
+
| List releases | `gh release list` |
|
|
108
|
+
| View release | `gh release view v1.0.0` |
|
|
109
|
+
| Download assets | `gh release download v1.0.0` |
|
|
110
|
+
| Delete release | `gh release delete v1.0.0` |
|
|
111
|
+
| Edit release | `gh release edit v1.0.0 --title "..." --notes "..."` |
|
|
112
|
+
|
|
113
|
+
### GitHub Actions (Workflows & Runs)
|
|
114
|
+
|
|
115
|
+
| Operation | Command |
|
|
116
|
+
|-----------|---------|
|
|
117
|
+
| List workflows | `gh workflow list` |
|
|
118
|
+
| View workflow | `gh workflow view workflow-name` |
|
|
119
|
+
| Run workflow | `gh workflow run workflow-name` |
|
|
120
|
+
| Run with inputs | `gh workflow run workflow-name -f key=value` |
|
|
121
|
+
| Disable workflow | `gh workflow disable workflow-name` |
|
|
122
|
+
| Enable workflow | `gh workflow enable workflow-name` |
|
|
123
|
+
| List recent runs | `gh run list` |
|
|
124
|
+
| List runs for workflow | `gh run list --workflow workflow-name` |
|
|
125
|
+
| View run details | `gh run view 12345` |
|
|
126
|
+
| View run logs | `gh run view 12345 --log` |
|
|
127
|
+
| Watch run progress | `gh run watch 12345` |
|
|
128
|
+
| Download artifacts | `gh run download 12345` |
|
|
129
|
+
| Rerun failed jobs | `gh run rerun 12345 --failed` |
|
|
130
|
+
| Cancel run | `gh run cancel 12345` |
|
|
131
|
+
|
|
132
|
+
### Search (Cross-Repository)
|
|
133
|
+
|
|
134
|
+
| Operation | Command |
|
|
135
|
+
|-----------|---------|
|
|
136
|
+
| Search repos | `gh search repos "query" --sort stars` |
|
|
137
|
+
| Search issues | `gh search issues "query" --repo owner/name` |
|
|
138
|
+
| Search PRs | `gh search prs "query" --state open` |
|
|
139
|
+
| Search code | `gh search code "pattern" --repo owner/name` |
|
|
140
|
+
| Search commits | `gh search commits "query" --repo owner/name` |
|
|
141
|
+
|
|
142
|
+
### Labels
|
|
143
|
+
|
|
144
|
+
| Operation | Command |
|
|
145
|
+
|-----------|---------|
|
|
146
|
+
| List labels | `gh label list` |
|
|
147
|
+
| Create label | `gh label create "name" --color "0075ca" --description "..."` |
|
|
148
|
+
| Edit label | `gh label edit "name" --new-name "..." --color "..."` |
|
|
149
|
+
| Delete label | `gh label delete "name" --yes` |
|
|
150
|
+
| Clone labels to another repo | `gh label clone source-owner/source-repo` |
|
|
151
|
+
|
|
152
|
+
### Raw API Access
|
|
153
|
+
|
|
154
|
+
For operations not covered by built-in commands:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# GET request
|
|
158
|
+
gh api repos/{owner}/{repo}/topics
|
|
159
|
+
|
|
160
|
+
# POST request
|
|
161
|
+
gh api repos/{owner}/{repo}/labels -f name="priority" -f color="ff0000"
|
|
162
|
+
|
|
163
|
+
# With pagination
|
|
164
|
+
gh api repos/{owner}/{repo}/issues --paginate
|
|
165
|
+
|
|
166
|
+
# GraphQL
|
|
167
|
+
gh api graphql -f query='{ viewer { login } }'
|
|
168
|
+
|
|
169
|
+
# JSON output + jq filtering
|
|
170
|
+
gh api repos/{owner}/{repo}/pulls --jq '.[].title'
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Decision Logic
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Is this a GitHub-hosted repo?
|
|
177
|
+
Check: git remote -v → shows github.com
|
|
178
|
+
→ Yes: Use gh CLI (this skill)
|
|
179
|
+
→ No: Is it Gitea-hosted?
|
|
180
|
+
→ Yes: Use mcp-gitea tools (see mcp-gitea skill)
|
|
181
|
+
→ Unknown: Ask the user
|
|
182
|
+
|
|
183
|
+
For local-only git operations (commit, diff, log, stash, rebase):
|
|
184
|
+
→ Always use git CLI directly — gh is for GitHub API operations
|
|
185
|
+
|
|
186
|
+
Operation routing:
|
|
187
|
+
PRs (create, review, merge, list) → gh pr ...
|
|
188
|
+
Issues (create, comment, close) → gh issue ...
|
|
189
|
+
Releases (create, upload, list) → gh release ...
|
|
190
|
+
CI/CD status, rerun, logs → gh run ... / gh workflow ...
|
|
191
|
+
Search across GitHub → gh search ...
|
|
192
|
+
Anything not in built-in commands → gh api ...
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Common Workflows
|
|
196
|
+
|
|
197
|
+
### Create a PR with Body via HEREDOC
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
gh pr create --title "feat: add gh-cli skill" --body "$(cat <<'EOF'
|
|
201
|
+
## Summary
|
|
202
|
+
- Added gh-cli skill for GitHub CLI operations
|
|
203
|
+
- Replaces unreliable MCP GitHub integration
|
|
204
|
+
|
|
205
|
+
## Test plan
|
|
206
|
+
- [ ] Verify gh auth status
|
|
207
|
+
- [ ] Test PR creation workflow
|
|
208
|
+
EOF
|
|
209
|
+
)"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Check CI and Merge When Ready
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Check CI status
|
|
216
|
+
gh pr checks 123
|
|
217
|
+
|
|
218
|
+
# If all checks pass, merge
|
|
219
|
+
gh pr merge 123 --squash --delete-branch
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Create a Release with Changelog
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
gh release create v2.12.0 \
|
|
226
|
+
--title "v2.12.0 — Add gh-cli skill" \
|
|
227
|
+
--generate-notes \
|
|
228
|
+
--latest
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Cross-Repo Issue Search
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Find all open bugs assigned to me across repos
|
|
235
|
+
gh search issues "is:open assignee:@me label:bug" --limit 20
|
|
236
|
+
|
|
237
|
+
# Find PRs awaiting my review
|
|
238
|
+
gh search prs "is:open review-requested:@me" --limit 20
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### View PR Comments (API)
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# List PR review comments
|
|
245
|
+
gh api repos/{owner}/{repo}/pulls/123/comments --jq '.[].body'
|
|
246
|
+
|
|
247
|
+
# List issue/PR timeline comments
|
|
248
|
+
gh api repos/{owner}/{repo}/issues/123/comments --jq '.[] | "\(.user.login): \(.body)"'
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Output Formatting
|
|
252
|
+
|
|
253
|
+
The `gh` CLI supports structured output:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# JSON output
|
|
257
|
+
gh pr list --json number,title,state
|
|
258
|
+
|
|
259
|
+
# JSON + jq filter
|
|
260
|
+
gh pr list --json number,title --jq '.[] | "\(.number): \(.title)"'
|
|
261
|
+
|
|
262
|
+
# Table format (default for list commands)
|
|
263
|
+
gh issue list
|
|
264
|
+
|
|
265
|
+
# Web browser
|
|
266
|
+
gh pr view 123 --web
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Cross-Repository Operations
|
|
270
|
+
|
|
271
|
+
Use `--repo` or `-R` to target any GitHub repo:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
gh pr list -R owner/other-repo
|
|
275
|
+
gh issue create -R owner/other-repo --title "..."
|
|
276
|
+
gh run list -R owner/other-repo
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## When NOT to Use
|
|
280
|
+
|
|
281
|
+
| Situation | Use Instead |
|
|
282
|
+
|-----------|-------------|
|
|
283
|
+
| Gitea-hosted repos | `mcp-gitea` tools |
|
|
284
|
+
| Local git operations (commit, diff, stash) | `git` CLI directly |
|
|
285
|
+
| Reading local files | Read tool |
|
|
286
|
+
| Pushing/pulling code | `git push` / `git pull` |
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-gitea
|
|
3
|
+
description: >-
|
|
4
|
+
Gitea MCP for internal Git repository management — pull requests, issues, releases,
|
|
5
|
+
branches, tags, wikis, and CI/CD actions. Use when: creating/reviewing PRs, managing
|
|
6
|
+
issues, creating releases/tags, browsing repo contents, managing branches, wiki
|
|
7
|
+
operations, or any Gitea-hosted repository operation. Triggers on: Gitea, internal
|
|
8
|
+
repo, pull request, PR review, merge request, release, tag, branch, issue, milestone,
|
|
9
|
+
wiki, actions, CI/CD, timetracking. NOT for GitHub repos — use mcp-github for those.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Gitea MCP - Internal Git Repository Management
|
|
13
|
+
|
|
14
|
+
The team's internal Git platform. All tools prefixed `mcp__gitea__`.
|
|
15
|
+
|
|
16
|
+
Gitea is the **primary** tool for daily development work (PRs, issues, releases).
|
|
17
|
+
GitHub is FOSS publishing only — use `mcp-github` for GitHub operations.
|
|
18
|
+
The `gh` CLI is GitHub-only; it does not work with Gitea.
|
|
19
|
+
|
|
20
|
+
**Method-dispatch pattern:** Several tools (`pull_request_read`, `pull_request_write`, `pull_request_review_write`, `issue_read`, `issue_write`) use a required `method` parameter to select the operation. Always include `method` — omitting it causes a missing parameter error.
|
|
21
|
+
|
|
22
|
+
## Tool Catalog
|
|
23
|
+
|
|
24
|
+
### Identity & Discovery
|
|
25
|
+
|
|
26
|
+
| Tool | Purpose | Key Params |
|
|
27
|
+
|------|---------|------------|
|
|
28
|
+
| `get_me` | Current authenticated user | *(none)* |
|
|
29
|
+
| `get_user_orgs` | User's organizations | *(none)* |
|
|
30
|
+
| `search_users` | Search users by name/email | `query` |
|
|
31
|
+
| `search_repos` | Search repositories across Gitea | `query`, `owner` |
|
|
32
|
+
| `search_org_teams` | Find teams within an org | `org`, `query` |
|
|
33
|
+
| `list_my_repos` | List authenticated user's repos | `page`, `perPage` |
|
|
34
|
+
| `get_gitea_mcp_server_version` | Server version info | *(none)* |
|
|
35
|
+
|
|
36
|
+
### Repository Operations
|
|
37
|
+
|
|
38
|
+
| Tool | Purpose | Key Params |
|
|
39
|
+
|------|---------|------------|
|
|
40
|
+
| `create_repo` | Create a new repository | `owner`, `name`, `description`, `private` |
|
|
41
|
+
| `fork_repo` | Fork an existing repository | `owner`, `repo`, `organization` |
|
|
42
|
+
| `get_file_contents` | Get file contents at a path | `owner`, `repo`, `filepath`, `ref` |
|
|
43
|
+
| `get_dir_contents` | List directory contents | `owner`, `repo`, `filepath`, `ref` |
|
|
44
|
+
| `create_or_update_file` | Create or update a file | `owner`, `repo`, `filepath`, `content`, `message`, `sha` (required for updates) |
|
|
45
|
+
| `delete_file` | Delete a file | `owner`, `repo`, `filepath`, `message`, `sha` |
|
|
46
|
+
|
|
47
|
+
### Branches
|
|
48
|
+
|
|
49
|
+
| Tool | Purpose | Key Params |
|
|
50
|
+
|------|---------|------------|
|
|
51
|
+
| `list_branches` | List all branches | `owner`, `repo`, `page`, `perPage` |
|
|
52
|
+
| `create_branch` | Create a new branch | `owner`, `repo`, `new_branch_name`, `old_branch_name` |
|
|
53
|
+
| `delete_branch` | Delete a branch | `owner`, `repo`, `branch` |
|
|
54
|
+
|
|
55
|
+
### Pull Requests
|
|
56
|
+
|
|
57
|
+
| Tool | Purpose | Key Params |
|
|
58
|
+
|------|---------|------------|
|
|
59
|
+
| `list_pull_requests` | List PRs with filtering | `owner`, `repo`, `state` (open/closed/all), `sort`, `milestone`, `page`, `perPage` |
|
|
60
|
+
| `pull_request_read` | Read PR data and reviews | `method` (get/get_diff/get_reviews/get_review/get_review_comments), `owner`, `repo`, `index`; `review_id` for get_review/get_review_comments |
|
|
61
|
+
| `pull_request_write` | Create, update, merge PR; manage reviewers | `method` (create/update/merge/add_reviewers/remove_reviewers), `owner`, `repo`; `index` required except for create |
|
|
62
|
+
| `pull_request_review_write` | Submit, delete, or dismiss a PR review | `method` (create/submit/delete/dismiss), `owner`, `repo`, `index`; `review_id` required for submit/delete/dismiss |
|
|
63
|
+
|
|
64
|
+
**`pull_request_write` method details:**
|
|
65
|
+
- `create`: `title` (req), `head` (req), `base` (req), `body`
|
|
66
|
+
- `update`: `index` (req), `title`, `body`, `state`, `assignee`, `assignees`, `milestone`, `base`, `allow_maintainer_edit`
|
|
67
|
+
- `merge`: `index` (req), `merge_style` (merge/rebase/rebase-merge/squash/fast-forward-only), `message`, `delete_branch`, `title`
|
|
68
|
+
- `add_reviewers` / `remove_reviewers`: `index` (req), `reviewers` (string[]), `team_reviewers` (string[])
|
|
69
|
+
|
|
70
|
+
**`pull_request_review_write` method details:**
|
|
71
|
+
- `create`: `body`, `commit_id`, `comments` (inline array with `path`, `body`, `old_line_num`, `new_line_num`), `state`
|
|
72
|
+
- `submit`: `review_id` (req), `body`, `state` (APPROVED/REQUEST_CHANGES/COMMENT/PENDING)
|
|
73
|
+
- `delete`: `review_id` (req)
|
|
74
|
+
- `dismiss`: `review_id` (req), `message`
|
|
75
|
+
|
|
76
|
+
### Issues
|
|
77
|
+
|
|
78
|
+
| Tool | Purpose | Key Params |
|
|
79
|
+
|------|---------|------------|
|
|
80
|
+
| `list_issues` | List issues with filtering | `owner`, `repo`, `state` (default "all"), `page`, `perPage` |
|
|
81
|
+
| `issue_read` | Get issue details, comments, or labels | `method` (get/get_comments/get_labels), `owner`, `repo`, `index` |
|
|
82
|
+
| `issue_write` | Create, update, comment, or manage labels | `method` (create/update/add_comment/edit_comment/add_labels/remove_label/replace_labels/clear_labels), `owner`, `repo`; `index` required except for create |
|
|
83
|
+
|
|
84
|
+
**`issue_write` method details:**
|
|
85
|
+
- `create`: `title` (req), `body`, `assignees`, `labels` (number[]), `milestone`
|
|
86
|
+
- `update`: `index` (req), `title`, `body`, `state`, `assignees`, `milestone`
|
|
87
|
+
- `add_comment`: `index` (req), `body` (req)
|
|
88
|
+
- `edit_comment`: `index` (req), `commentID` (req), `body` (req)
|
|
89
|
+
- `add_labels` / `replace_labels`: `index` (req), `labels` (number[])
|
|
90
|
+
- `remove_label`: `index` (req), `label_id` (number)
|
|
91
|
+
- `clear_labels`: `index` (req)
|
|
92
|
+
|
|
93
|
+
### Labels
|
|
94
|
+
|
|
95
|
+
| Tool | Purpose | Key Params |
|
|
96
|
+
|------|---------|------------|
|
|
97
|
+
| `label_read` | Get label details | `owner`, `repo`, `id` |
|
|
98
|
+
| `label_write` | Create or update a label | `owner`, `repo`, `name`, `color` |
|
|
99
|
+
|
|
100
|
+
### Milestones
|
|
101
|
+
|
|
102
|
+
| Tool | Purpose | Key Params |
|
|
103
|
+
|------|---------|------------|
|
|
104
|
+
| `milestone_read` | Get milestone details | `owner`, `repo`, `id` |
|
|
105
|
+
| `milestone_write` | Create or update a milestone | `owner`, `repo`, `title`, `due_on`, `description` |
|
|
106
|
+
|
|
107
|
+
### Releases & Tags
|
|
108
|
+
|
|
109
|
+
| Tool | Purpose | Key Params |
|
|
110
|
+
|------|---------|------------|
|
|
111
|
+
| `list_releases` | List all releases | `owner`, `repo`, `page`, `perPage` |
|
|
112
|
+
| `get_release` | Get release by ID | `owner`, `repo`, `id` |
|
|
113
|
+
| `get_latest_release` | Get the latest published release | `owner`, `repo` |
|
|
114
|
+
| `create_release` | Create a new release | `owner`, `repo`, `tag_name`, `name`, `body`, `draft`, `prerelease` |
|
|
115
|
+
| `delete_release` | Delete a release | `owner`, `repo`, `id` |
|
|
116
|
+
| `list_tags` | List all tags | `owner`, `repo`, `page`, `perPage` |
|
|
117
|
+
| `get_tag` | Get tag by name | `owner`, `repo`, `tag` |
|
|
118
|
+
| `create_tag` | Create a new tag | `owner`, `repo`, `tag_name`, `message`, `target` |
|
|
119
|
+
| `delete_tag` | Delete a tag | `owner`, `repo`, `tag` |
|
|
120
|
+
|
|
121
|
+
### Commits
|
|
122
|
+
|
|
123
|
+
| Tool | Purpose | Key Params |
|
|
124
|
+
|------|---------|------------|
|
|
125
|
+
| `list_commits` | List commits on a branch | `owner`, `repo`, `sha`, `path`, `page`, `perPage` |
|
|
126
|
+
|
|
127
|
+
### Wiki
|
|
128
|
+
|
|
129
|
+
| Tool | Purpose | Key Params |
|
|
130
|
+
|------|---------|------------|
|
|
131
|
+
| `wiki_read` | Read a wiki page | `owner`, `repo`, `pageName` |
|
|
132
|
+
| `wiki_write` | Create or update a wiki page | `owner`, `repo`, `pageName`, `content`, `message` |
|
|
133
|
+
|
|
134
|
+
### CI/CD Actions
|
|
135
|
+
|
|
136
|
+
| Tool | Purpose | Key Params |
|
|
137
|
+
|------|---------|------------|
|
|
138
|
+
| `actions_config_read` | Read workflow/actions config | `owner`, `repo` |
|
|
139
|
+
| `actions_config_write` | Write workflow/actions config | `owner`, `repo`, `config` |
|
|
140
|
+
| `actions_run_read` | Read action run details/logs | `owner`, `repo`, `run_id` |
|
|
141
|
+
| `actions_run_write` | Trigger or manage action runs | `owner`, `repo`, `workflow_id`, `ref` |
|
|
142
|
+
|
|
143
|
+
### Time Tracking
|
|
144
|
+
|
|
145
|
+
| Tool | Purpose | Key Params |
|
|
146
|
+
|------|---------|------------|
|
|
147
|
+
| `timetracking_read` | Read time entries on an issue | `owner`, `repo`, `index` |
|
|
148
|
+
| `timetracking_write` | Log time on an issue | `owner`, `repo`, `index`, `time` (seconds) |
|
|
149
|
+
|
|
150
|
+
## Common Workflows
|
|
151
|
+
|
|
152
|
+
### Create a Pull Request
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
1. Ensure your feature branch is pushed:
|
|
156
|
+
git push origin feature/my-branch
|
|
157
|
+
|
|
158
|
+
2. pull_request_write(
|
|
159
|
+
method: "create",
|
|
160
|
+
owner: "FLCCC",
|
|
161
|
+
repo: "my-repo",
|
|
162
|
+
title: "feat: add new feature",
|
|
163
|
+
body: "## Summary\n- What changed\n- Why it changed\n\n## Test plan\n- [ ] Tested locally",
|
|
164
|
+
head: "feature/my-branch",
|
|
165
|
+
base: "main"
|
|
166
|
+
)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Review a Pull Request
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
1. pull_request_read(method: "get", owner: "FLCCC", repo: "my-repo", index: 42)
|
|
173
|
+
→ Review title, description, and diff summary
|
|
174
|
+
|
|
175
|
+
2. pull_request_read(method: "get_reviews", owner: "FLCCC", repo: "my-repo", index: 42)
|
|
176
|
+
→ Check existing reviews
|
|
177
|
+
|
|
178
|
+
3. pull_request_review_write(
|
|
179
|
+
method: "create",
|
|
180
|
+
owner: "FLCCC",
|
|
181
|
+
repo: "my-repo",
|
|
182
|
+
index: 42,
|
|
183
|
+
state: "APPROVED",
|
|
184
|
+
body: "LGTM — clean implementation, tests look solid"
|
|
185
|
+
)
|
|
186
|
+
→ Then submit it:
|
|
187
|
+
pull_request_review_write(
|
|
188
|
+
method: "submit",
|
|
189
|
+
owner: "FLCCC",
|
|
190
|
+
repo: "my-repo",
|
|
191
|
+
index: 42,
|
|
192
|
+
review_id: <id from create response>,
|
|
193
|
+
state: "APPROVED"
|
|
194
|
+
)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Merge a Pull Request
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
pull_request_write(
|
|
201
|
+
method: "merge",
|
|
202
|
+
owner: "FLCCC",
|
|
203
|
+
repo: "my-repo",
|
|
204
|
+
index: 42,
|
|
205
|
+
merge_style: "squash",
|
|
206
|
+
delete_branch: true
|
|
207
|
+
)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Create a Release
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
1. get_latest_release(owner: "FLCCC", repo: "my-repo")
|
|
214
|
+
→ Note current version for bump reference
|
|
215
|
+
|
|
216
|
+
2. create_tag(
|
|
217
|
+
owner: "FLCCC",
|
|
218
|
+
repo: "my-repo",
|
|
219
|
+
tag_name: "v2.1.0",
|
|
220
|
+
message: "Release v2.1.0",
|
|
221
|
+
target: "main"
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
3. create_release(
|
|
225
|
+
owner: "FLCCC",
|
|
226
|
+
repo: "my-repo",
|
|
227
|
+
tag_name: "v2.1.0",
|
|
228
|
+
name: "v2.1.0 — Feature Name",
|
|
229
|
+
body: "## Changes\n- ...\n\n## Breaking Changes\n- none",
|
|
230
|
+
draft: false,
|
|
231
|
+
prerelease: false
|
|
232
|
+
)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Manage Issues
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
# Create an issue
|
|
239
|
+
issue_write(
|
|
240
|
+
method: "create",
|
|
241
|
+
owner: "FLCCC",
|
|
242
|
+
repo: "my-repo",
|
|
243
|
+
title: "Bug: description of problem",
|
|
244
|
+
body: "## Steps to reproduce\n1. ...\n\n## Expected\n...\n\n## Actual\n..."
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
# Update an existing issue
|
|
248
|
+
issue_write(
|
|
249
|
+
method: "update",
|
|
250
|
+
owner: "FLCCC",
|
|
251
|
+
repo: "my-repo",
|
|
252
|
+
index: 15,
|
|
253
|
+
body: "<updated body>"
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
# Add a comment
|
|
257
|
+
issue_write(
|
|
258
|
+
method: "add_comment",
|
|
259
|
+
owner: "FLCCC",
|
|
260
|
+
repo: "my-repo",
|
|
261
|
+
index: 15,
|
|
262
|
+
body: "Confirmed — reproduced on v2.9.1."
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
# Filter open issues
|
|
266
|
+
list_issues(
|
|
267
|
+
owner: "FLCCC",
|
|
268
|
+
repo: "my-repo",
|
|
269
|
+
state: "open",
|
|
270
|
+
perPage: 20
|
|
271
|
+
)
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Browse Repo Contents
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
# List files in a directory
|
|
278
|
+
get_dir_contents(owner: "FLCCC", repo: "my-repo", filepath: "src/", ref: "main")
|
|
279
|
+
|
|
280
|
+
# Read a specific file
|
|
281
|
+
get_file_contents(owner: "FLCCC", repo: "my-repo", filepath: "package.json", ref: "main")
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Decision Logic
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
Is this a Gitea-hosted repo?
|
|
288
|
+
(check: git remote -v shows gitea.* or internal hostname)
|
|
289
|
+
→ Yes: Use mcp__gitea__* tools ← PRIMARY for daily work
|
|
290
|
+
|
|
291
|
+
→ No: Is it GitHub-hosted? (github.com in remote URL)
|
|
292
|
+
→ Yes: Use mcp__github__* tools (see mcp-github skill)
|
|
293
|
+
or gh CLI for GitHub-specific operations
|
|
294
|
+
|
|
295
|
+
For local-only git operations (commit, diff, log, stash, rebase):
|
|
296
|
+
→ Always use git CLI directly — no MCP needed for local ops
|
|
297
|
+
|
|
298
|
+
Operation decision tree:
|
|
299
|
+
Creating a PR → pull_request_write(method: "create")
|
|
300
|
+
Reading PR details/diff → pull_request_read(method: "get" | "get_diff")
|
|
301
|
+
Reviewing a PR → pull_request_review_write(method: "create" then "submit")
|
|
302
|
+
Merging a PR → pull_request_write(method: "merge")
|
|
303
|
+
Issue triage/tracking → issue_write(method: "create" | "update") / list_issues
|
|
304
|
+
Adding a comment → issue_write(method: "add_comment")
|
|
305
|
+
Cutting a release → create_tag → create_release
|
|
306
|
+
Browsing file contents → get_file_contents / get_dir_contents
|
|
307
|
+
Editing a file via MCP → create_or_update_file (need sha for updates)
|
|
308
|
+
Branch management → create_branch / delete_branch
|
|
309
|
+
CI/CD pipeline status → actions_run_read
|
|
310
|
+
Team documentation → wiki_write / wiki_read
|
|
311
|
+
Time logging → timetracking_write
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## Token-Saving Strategies
|
|
315
|
+
|
|
316
|
+
### 1. Paginate Large Lists
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
list_issues(owner: "FLCCC", repo: "my-repo", perPage: 15, page: 1)
|
|
320
|
+
# Default can return 30+ items. Set perPage to what you actually need.
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### 2. Filter by State
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
list_pull_requests(owner: "FLCCC", repo: "my-repo", state: "open") # "open" | "closed" | "all"
|
|
327
|
+
list_issues(owner: "FLCCC", repo: "my-repo", state: "open") # Skip closed unless historical review
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### 3. Target Specific Refs
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
get_file_contents(ref: "main") # Avoid default branch ambiguity
|
|
334
|
+
list_commits(sha: "feature-branch", perPage: 10, page: 1) # Last 10 commits only
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### 4. Avoid Redundant Discovery
|
|
338
|
+
|
|
339
|
+
Cache within a session (these don't change):
|
|
340
|
+
- Owner/org names from `get_me` or `get_user_orgs`
|
|
341
|
+
- Repo names once confirmed via `search_repos`
|
|
342
|
+
- Label IDs once fetched via `label_read`
|
|
343
|
+
- Milestone IDs once fetched via `milestone_read`
|
|
344
|
+
|
|
345
|
+
### 5. Read Before Write (Files)
|
|
346
|
+
|
|
347
|
+
`create_or_update_file` requires the current file `sha` for updates. Always call
|
|
348
|
+
`get_file_contents` first to extract the `sha` — skipping this causes a 409 conflict error.
|
|
349
|
+
|
|
350
|
+
## When NOT to Use Gitea MCP
|
|
351
|
+
|
|
352
|
+
| Situation | Use Instead |
|
|
353
|
+
|-----------|-------------|
|
|
354
|
+
| GitHub-hosted repo (github.com) | `mcp__github__*` tools or `gh` CLI |
|
|
355
|
+
| Local git operations (commit, diff, stash, rebase, cherry-pick) | `git` CLI directly |
|
|
356
|
+
| Pushing/pulling code | `git push` / `git pull` (git CLI) |
|
|
357
|
+
| GitHub Actions (github.com CI) | `gh` CLI |
|
|
358
|
+
| Cloning a repo | `git clone` (git CLI) |
|