Initial: gitea-api (read-only) + sporel-commit tools with Claude skills

This commit is contained in:
Calic
2026-06-17 11:47:37 +00:00
commit 5c377a15e0
6 changed files with 304 additions and 0 deletions

30
skills/gitea-api/SKILL.md Normal file
View File

@@ -0,0 +1,30 @@
---
name: gitea-api
description: Read-only Gitea API queries (list org repos, inspect a repo/PR/issue, check CI runs). Use instead of hand-writing curl with tokens. GET-only and allowlisted, so it never prompts.
---
# Gitea API (read-only)
Run for any read query against Gitea instead of constructing `curl` with a token:
```bash
/root/projects/gitea-devtools/gitea-api.sh <path> | jq <filter>
```
Path omits the `api/v1/` prefix and an optional leading `/`. Examples:
| Goal | Command |
|------|---------|
| List org repos | `gitea-api.sh /orgs/sporel/repos?limit=100 \| jq -r '.[].full_name'` |
| Inspect a repo | `gitea-api.sh repos/calic/claude-config` |
| Default branch | `gitea-api.sh repos/sporel/sporel-engine \| jq -r .default_branch` |
| Open PRs | `gitea-api.sh repos/<owner>/<name>/pulls?state=open` |
| Recent CI runs | `gitea-api.sh repos/<owner>/<name>/actions/tasks` |
It auto-resolves a temp read-scope token via the local `gitea` container (or
uses `$GITEA_TOKEN`). GET-only — it cannot mutate anything, which is why it's
safe to run without prompting.
On `ERROR: ... HTTP <code>` read the hint line (401 = token/scope, 404 = path).
If a real query path is missing from this list, just use it — the script
accepts any GET path.