agentleFS
Aidas-devAidas-dev/k8s-agent-skills/skills/gitea-tea/SKILL.md

gitea-tea

Skill4 starsChanged 5 months agoMITView on GitHub

Work with Gitea using tea CLI for auth, repo, issue, pull request, release, actions, webhook, and notification workflows. Use when user references Gitea, self-hosted git forges, or asks for tea commands.

  • Commits and pushes

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 1 is distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when tasks target Gitea and the tea CLI, especially if the user would normally use gh on GitHub.

    line 8
  2. Very specific:

    Prefer tea over gh for Gitea targets.

    line 20
  3. Distinctive:

    Always scope commands to target explicitly when ambiguity exists:

    line 21
  4. Very specific:

    If command flags differ by tea version, run tea <cmd> --help first and follow local help text.

    line 25
  5. Very specific:

    Only users subcommand currently.

    line 190
  6. Very specific:

    Run read-only commands first (ls, list, view) before mutating operations.

    line 194
  7. Very specific:

    If repo context unclear, require explicit --repo and --login.

    line 195
  8. Very specific:

    Before destructive actions (delete, close, merge), confirm target index and repository.

    line 196
  9. Very specific:

    If command fails, capture tea <subcommand> --help output and adapt flags to installed version.

    line 198

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Gitea + tea CLI

Use this skill when tasks target Gitea and the tea CLI, especially if the user would normally use gh on GitHub.

When To Use

  • User mentions Gitea, self-hosted git, forgejo-compatible flows, or tea
  • You need CLI automation for issues, pull requests, repos, comments, or releases
  • You need host-specific auth profiles (multiple Gitea instances)
  • Managing Gitea Actions (secrets, variables, runners, workflow runs)
  • Managing webhooks, notifications, or admin tasks

Core Rules

  1. Prefer tea over gh for Gitea targets.
  2. Always scope commands to target explicitly when ambiguity exists:
    • --repo owner/name
    • --login <profile>
    • --remote <remote-name>
  3. If command flags differ by tea version, run tea <cmd> --help first and follow local help text.
  4. For PR/review actions, ensure local branches are pushed before create/merge operations.

Auth Workflow

Create login profile (token)

tea logins add --name <profile> --url https://git.example.com --token <token>

Verify logins / switch default

tea logins ls
tea logins default <profile>

Quick auth check

tea whoami                         # Show current user

Optional env-based auth (automation)

  • GITEA_SERVER_URL
  • GITEA_SERVER_TOKEN
  • GITEA_SERVER_USER
  • GITEA_SERVER_PASSWORD

Command Mapping (gh -> tea)

  • Repo list: gh repo list -> tea repos ls
  • Issue list: gh issue list -> tea issues ls
  • Issue create: gh issue create -> tea issues create
  • PR list: gh pr list -> tea pulls ls or tea pr ls
  • PR create: gh pr create -> tea pulls create
  • PR checkout: gh pr checkout <n> -> tea pulls checkout <n>
  • Comment on PR/issue: gh pr comment / gh issue comment -> tea comment <index> [body]
  • Release list/create: gh release list/create -> tea releases ls / tea releases create

Practical Patterns

Work on a specific repo

tea issues ls --repo owner/name --login <profile>
tea pulls ls --repo owner/name --login <profile>

Create issue / PR

tea issues create --repo owner/name --title "Title" --description "Details"
tea pulls create --repo owner/name --head <branch> --title "Title" --description "Details"

Review / merge PR

tea pulls review <index>
tea pulls approve <index>
tea pulls merge <index>

Release workflow

tea releases create --repo owner/name --tag vX.Y.Z --title "vX.Y.Z"
tea releases assets --help

Clone repo

tea clone <repo-slug> [target-dir]
tea clone gitea/tea                                 # Short form
tea clone https://git.example.com/owner/repo.git    # Full URL

Supports various slug formats: owner/repo, host/owner/repo, full URLs. Overrides login when host specified.

Gitea Actions

Repository actions (secrets, variables, runs, workflows)

tea actions secrets ls --repo owner/name
tea actions secrets create --repo owner/name <name> <value>

tea actions variables ls --repo owner/name
tea actions variables set --repo owner/name <key> <value>

tea actions runs ls --repo owner/name
tea actions runs view <run-id> --repo owner/name
tea actions runs logs <run-id> --repo owner/name

tea actions workflows ls --repo owner/name
tea actions workflows dispatch <workflow-id> --repo owner/name
tea actions workflows enable <workflow-id> --repo owner/name
tea actions workflows disable <workflow-id> --repo owner/name

Host-mode runner on Talos

Talos has no Docker socket, so standard dind runners won't work. Use host-mode runner:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: gitea-runner
spec:
  template:
    spec:
      containers:
        - name: runner
          image: gitea/runner:latest
          env:
            - name: GITEA_INSTANCE_URL
              value: https://git.example.com
            - name: GITEA_RUNNER_REGISTRATION_TOKEN
              valueFrom:
                secretKeyRef:
                  name: gitea-runner-token
                  key: token
            - name: GITEA_RUNNER_LABELS
              value: "ubuntu-latest:host"    # Host mode = no Docker
  • Label must include :host suffix for host-mode execution
  • Job steps run as processes inside the runner container
  • Runner container needs tools that workflows require (curl, git, etc.)
  • For Kubernetes-specific workflows, mount kubeconfig or use SA token

Notifications

tea notifications ls               # List unread + pinned (default)
tea notifications ls --types issue,pull  # Filter by type
tea notifications read <id>        # Mark as read
tea notifications unread <id>      # Mark as unread

Defaults to current repo only. Use --mine for cross-repo notifications.

Webhooks

tea webhooks ls --repo owner/name
tea webhooks create https://hook.example.com/endpoint --repo owner/name --type gitea --events push
tea webhooks create --org my-org --type slack --events issues --secret <secret>
tea webhooks delete <id> --repo owner/name

--type options: gitea, gogs, slack, discord, dingtalk, telegram, msteams, feishu, wechatwork, packagist. Default events: push. Supports --org (org-level hooks) and --global (instance-wide).

Admin

tea admin users ls                 # List registered users
tea admin users list --login admin # Requires admin token

Only users subcommand currently. Requires login with admin privileges.

Safety + Verification

  • Run read-only commands first (ls, list, view) before mutating operations.
  • If repo context unclear, require explicit --repo and --login.
  • Before destructive actions (delete, close, merge), confirm target index and repository.
  • For actions: check workflow runs with ls before cancel/delete.
  • If command fails, capture tea <subcommand> --help output and adapt flags to installed version.

Common Mistakes

  • Wrong login profile — Running tea commands without --login uses the default profile. If multiple Gitea instances are configured, always pass --login <profile>.
  • Missing push before PR — tea pulls create does not push your branch. Run git push -u origin <branch> first.
  • teav1 vs v0 flags — Ensure tea version supports the flags you're using. Run tea <cmd> --help to verify before scripting.
  • Webhook secrets in output — tea webhooks create with --secret may leak the secret in shell history. Use --secret-stdin or env vars.
  • Actions runner registration — Token must be pre-created in Gitea admin UI (Settings → Actions → Runners). The CLI tea actions commands don't create tokens.

Troubleshooting

  • Auth failures: re-check login profile URL/token; verify tea logins ls.
  • Wrong target host/repo: pass both --login and --repo explicitly.
  • PR creation errors: ensure branch is pushed and upstream is configured.
  • TLS issues on internal hosts: prefer proper CA trust; use insecure flags only when user explicitly accepts risk.
  • Actions runner registration: pre-create the runner token in Gitea UI (Settings > Actions > Runners) or use API.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.