Description 688 -> 282 chars, body 435 -> 293 words, Gotchas 5 entries/54% of body -> 3/23.5%. Clears the description FAIL and the Gotchas suggestion. Cut the second trigger register (six re-quoted user phrasings) and the capability enumeration; both moved to a new Boundaries section in the skill's own README. Kept all three boundary clauses -- git-branches, git-history and gitea-prs each defend a real activation steal, and gitea-prs is now the only guard on the branch/PR collision in either direction since gitea-prs's own retrofit narrowed its boundary to issues. Written as one arrow per target: the resolver extracts only the first name per arrow clause, so conjoined targets go unchecked. Two Gotchas deleted -- one paraphrased the step below it (its non-obvious half, the get_me/list_my_repos token-scope block, was folded into that step), the other is carried in full by references/branches.md:40-52. Repoint two reference pointers the rename broke: branches.md and commits.md named Gotchas by titles this retrofit changed. Now named by stable descriptors. Refs #99
2.9 KiB
name, description, compatibility, metadata, allowed-tools
| name | description | compatibility | metadata | allowed-tools | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gitea-branches | Use when listing, creating, or deleting branches in a Gitea repository, or reading its commit history — even when the user does not say "Gitea". Not a local working copy's branches -> `git-branches`. Not local history -> `git-history`. Not a PR's head or base branch -> `gitea-prs`. | Requires Gitea MCP server configured with a token with write:repository scope; this is confirmed to gate list_branches, create_branch, and delete_branch (Gitea gates reads behind write scope for repo-scoped operations), and is inferred by analogy (not explicitly confirmed by source docs) to also gate list_commits and get_commit. Requires git remote "origin" pointing to the Gitea instance. |
|
Bash mcp__gitea__list_branches mcp__gitea__create_branch mcp__gitea__delete_branch mcp__gitea__list_commits mcp__gitea__get_commit |
Gotchas
- 404 often means 403. Gitea masks permission errors as not-found; on an unexpected one, check token scope before reporting a branch or commit missing.
- Nothing auto-paginates.
list_branchesandlist_commitsreturn one page; iteratepageuntil the returned count is belowper_page. delete_branchhas no force-push guard. Checkprotectedfromlist_branchesfirst and require explicit confirmation — a protected branch need not be namedmain.
Step 1 — Resolve owner and repo
Before any tool call, extract owner and repo from the git remote:
git remote get-url origin
get_me and list_my_repos are blocked under the token scope this skill assumes, so the remote is the only source. If origin is not set or the URL is not a Gitea URL, stop and report: "No Gitea remote found — set origin to your Gitea instance URL."
Step 2 — Dispatch
| Invocation | Action |
|---|---|
/gitea-branches or /gitea-branches list |
List branches |
/gitea-branches create <name> [from <base>] |
Create branch |
/gitea-branches delete <name> |
Delete branch |
/gitea-branches commits [on <branch>] [touching <path>] |
List commit history |
/gitea-branches commit <sha> |
Get full detail for one commit |
For branch operations (list/create/delete), read references/branches.md — it carries the call signatures, the old_branch source rule, and the protected-branch refusal in full.
For commit operations (list/get), read references/commits.md.
Step 3 — Report
For reads: display branches as name + protected flag; display commits as SHA (short), message summary, author, date.
For writes (create/delete): confirm the action taken, the branch name, and (for create) the base it forked from.
For errors: surface the HTTP code and message, applying the 404 gotcha above before reporting "not found" to the user.