Files
Bifrost/.claude/skills/gitea-api-client/SKILL.md
T

1.8 KiB

name, description
name description
gitea-api-client Use when implementing or modifying Gitea API requests, pagination, authentication, DTOs, errors, or HTTP retry behavior.

Gitea API client

  • Assume Gitea REST API v1 (OpenAPI documented by Gitea); use documented paths: /user/orgs, /orgs/{org}/repos, and /user/repos when personal repositories are enabled.
  • Send the token only in the server-side Authorization: token … header; never echo it or include it in exceptions.
  • Paginate with bounded page and limit parameters and stop only when a page is shorter than the requested limit.
  • Use java.net.http.HttpClient with explicit connect and request timeouts.
  • Do not automatically retry non-idempotent operations. If retries are added for GET, cap attempts and honor Retry-After when valid.
  • Map 401 to invalid token, 403 to insufficient Gitea access, 404 to missing organization/resource, 429 to rate limit, and 5xx/network failures to temporary service errors.
  • Parse only fields needed by the UI; handle absent optional branch fields safely.
  • Validate configured base URL and disable redirects to prevent token forwarding to another host.

Checklist

  • Token remains server side and is redacted.
  • Pagination bounded and tested.
  • Timeouts and status mappings are explicit.
  • Redirects disabled; base URL validated.

Sources

Not verified

  • Deployment-specific Gitea version is unspecified; current endpoint compatibility across older Gitea versions must be checked against the test instance.