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

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.

agentmods
npx agentmods add skills/amonstack/gitea_mcp/gitea-configure
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00152 $0.01478
Opus 5 $0.00076 $0.00739
Sonnet 5 $0.00030 $0.00296
Haiku 4.5 $0.00015 $0.00148

Measured today against content hash 2489344fa627, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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. baseUrlGITEA_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 / repoGITEA_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 selectionupstream 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. today Changed · +14 lines · +58 tokens per session 2489344fa627
  2. 4d 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 today), licensed MIT. It adds 152 tokens to every session and 1,478 once invoked, about $0.0008 per session on Opus 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens