gitea-configure

gitea-configure is a skill for Claude Code, Codex from amonstack/gitea_mcp. It costs 152 tokens per session (1,478 once invoked), scanned C, original, MIT.

A procedure for setting up or repairing a connection to Gitea, a self-hosted code-hosting and issue-tracking service. It explains how the server finds the instance URL, repository, and access token.

In plain words
What is it for?
Configuring the Gitea URL and token, discovering the owner and repository from Git remotes, and fixing 401, 403, or unconfigured connection errors.
Why use it?
It resolves missing or invalid connection details, including authentication failures and projects without a usable Git remote, without guessing the target repository.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Configuring the Gitea URL and token, discovering the owner and repository from Git remotes, and fixing 401, 403, or unconfigured connection errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amonstack/gitea_mcp/gitea-configure
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add amonstack/gitea_mcp --skill gitea-configure
Clone the repo
git clone --depth 1 https://github.com/amonstack/gitea_mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gitea-configure

README.md
[![agentmods](https://agentmods.dev/badge/skills/amonstack/gitea_mcp/gitea-configure/github.svg)](https://agentmods.dev/skills/amonstack/gitea_mcp/gitea-configure)
Your own site
<a href="https://agentmods.dev/skills/amonstack/gitea_mcp/gitea-configure"><img src="https://agentmods.dev/badge/skills/amonstack/gitea_mcp/gitea-configure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gitea-configure

Your own site · 80×15
<a href="https://agentmods.dev/skills/amonstack/gitea_mcp/gitea-configure"><img src="https://agentmods.dev/badge/skills/amonstack/gitea_mcp/gitea-configure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,478 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00152 $0.01478
Opus 5.5 $0.00061 $0.00591
Sonnet 5.5 $0.00030 $0.00296
Haiku 4.5 $0.00015 $0.00148

Measured 1mo ago against content hash 2489344fa627, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

gitea-configure scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

store file (`~/.git-credentials`). If `gitea_status` reports
src/assets/skills/gitea-configure/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gitea-configure

When to use

Trigger when the user asks to configure / set up / fix the Gitea connection, instance URL, or token, or any tool call fails with 401/403 — 中文请求如「配置 Gitea 连接」「令牌怎么设」「为什么报 401 没权限」也 MUST 走本 skill。

Diagnose and fix the Gitea connection. The server auto-discovers its config from the project's git remotes; this skill is the fallback when that fails or the token is wrong.

How gitea-mcp discovers config (no env vars required)

On start, the server reads <cwd>/.git/config and resolves in this order:

  1. baseUrl — GITEA_BASE_URL env var; else the GITEA_REPO_URL repo URL's host; else derived from the selected remote's host. SSH remotes (git@host:owner/repo) resolve to https://host.
  2. owner / repo — GITEA_DEFAULT_OWNER / GITEA_DEFAULT_REPO env vars; else the GITEA_REPO_URL repo URL's path; else from the selected remote's URL.
  3. Remote selection — upstream remote first, falling back to origin, then any other remote. Both are surfaced in resolve_repo output (with embedded userinfo stripped from every echoed URL).

If the working directory has NO git remote and neither GITEA_BASE_URL nor GITEA_REPO_URL is set, the server starts in an unconfigured state — tools/list is available, but business tools return NotConfiguredError. Use the configure_gitea tool to set the connection at runtime (session-scoped, never persisted), or guide the user to restart from a cloned repo / with env vars set.

Token discovery chain (tried in order)

  1. GITEA_REPO_URL — a self-contained credentialed clone URL (https://<user>:<token>@<host>[:<port>]/<owner>/<repo>.git) whose userinfo becomes the top-priority candidate when the URL points at the instance host.
  2. .git/config — a [gitea "<baseUrl>"] section (read via git config get --url=<baseUrl> gitea.token), e.g.
    [gitea "https://gitea.example.com"]
        token = <your-token>
    
    A bare [gitea] section with token = ... is a host-wide fallback.
  3. GITEA_TOKEN env var.
  4. The credential git itself would use for the instance host, retrieved via git credential fill — this honors every configured credential helper, including OS keychains (wincred / osxkeychain / libsecret) and the store file (~/.git-credentials). If gitea_status reports gitAvailable: false, git could not be used at all — only the env sources (GITEA_REPO_URL / GITEA_TOKEN) remain; guide the user to install git (≥ 2.46) or set GITEA_TOKEN / GITEA_REPO_URL.
  5. If none of the above yield a token, the server starts WITHOUT a token (anonymous). Public repos may be read; writes and private repos return 401 — that is the signal to help the user add a token via one of the sources above.

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +14 lines · +58 tokens per session 2489344fa627
  2. 1mo ago First seen · 76 lines · 94 tokens per session scan C 55dff8b259c4

Subscribe to this mod's changes

gitea-configure is a skill published in the GitHub repository amonstack/gitea_mcp (1 stars, last pushed 21d ago), licensed MIT. It adds 152 tokens to every session and 1,478 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.