From 3382ede9cf8b496c2217f7c4a88dc2873cc3c73a Mon Sep 17 00:00:00 2001 From: Kimiko Date: Mon, 23 Feb 2026 20:00:33 +0800 Subject: [PATCH] Initial commit: Gitea skill for OpenClaw - SKILL.md with tea CLI integration guide - README.md with installation instructions - LICENSE (MIT) This skill enables OpenClaw agents to interact with Gitea servers using the tea CLI tool for git operations, PRs, issues, and more. --- LICENSE | 21 ++++++++ README.md | 33 ++++++++++++ gitea/SKILL.md | 142 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 196 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 gitea/SKILL.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..748e7b3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Kimiko (Terraphim) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..feb9082 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Gitea Skill for OpenClaw + +A shareable skill for interacting with Gitea git forge servers using the tea CLI tool. + +## Installation + +1. Clone this repository: + ```bash + git clone https://git.terraphim.cloud/kimie05c34be198a20b9/gitea-skill.git + ``` + +2. Copy the skill to your OpenClaw skills directory: + ```bash + cp -r gitea-skill/gitea ~/.openclaw/skills/ + ``` + +3. Or use with `clawhub`: + ```bash + clawhub install gitea-skill + ``` + +## Requirements + +- tea CLI installed: `go install code.gitea.io/tea@latest` +- Gitea access token configured + +## Usage + +Once installed, the skill automatically triggers when you mention Gitea operations. + +## License + +MIT - See LICENSE file diff --git a/gitea/SKILL.md b/gitea/SKILL.md new file mode 100644 index 0000000..dce56d4 --- /dev/null +++ b/gitea/SKILL.md @@ -0,0 +1,142 @@ +--- +name: gitea +description: Interact with Gitea git forge servers using the tea CLI tool. Use for pushing commits, creating pull requests, managing issues, and working with repositories on Gitea instances. Requires tea CLI to be installed and configured. +--- + +# Gitea Skill + +Interact with Gitea servers using the tea CLI tool. + +## Prerequisites + +1. **tea CLI must be installed:** + ```bash + go install code.gitea.io/tea@latest + ``` + +2. **tea must be configured with a Gitea login:** + ```bash + tea login add --name --url --token + ``` + + To get an access token: + - Log in to your Gitea web interface + - Go to Settings → Applications → Generate New Token + - Or use the API: `POST /api/v1/users/{username}/tokens` + +## Quick Start + +### Check Logins +```bash +tea login ls +``` + +### Push to Gitea +```bash +# Using git with tea-configured remote +git push + +# Or configure git remote with token embedded +git remote set-url https://:@//.git +git push +``` + +### Create Pull Request +```bash +tea pr create --title "PR Title" --body "Description" --base main --head feature-branch +``` + +### List Issues +```bash +tea issues list --repo / +``` + +## Common Operations + +### Repository Operations +```bash +# Clone a repository +git clone https:////.git + +# View repository info +tea repos view --repo / + +# List repositories +tea repos list +``` + +### Issue Management +```bash +# List issues +tea issues list --repo / + +# Create issue +tea issues create --repo / --title "Issue Title" --body "Description" + +# Close issue +tea issues close --repo / +``` + +### Pull Request Management +```bash +# List PRs +tea pulls list --repo / + +# View PR +tea pulls view --repo / + +# Checkout PR locally +tea pr checkout +``` + +### Labels +```bash +# List labels +tea labels list --repo / + +# Create label +tea labels create --repo / --name "bug" --color "ff0000" +``` + +## Configuration + +### Environment Variables +```bash +export GITEA_SERVER_URL=https://git.example.com +export GITEA_SERVER_TOKEN=your-access-token +``` + +### Multiple Gitea Instances +```bash +# Add multiple logins +tea login add --name work --url https://git.company.com --token +tea login add --name personal --url https://git.example.com --token + +# Switch between them by specifying --login flag +tea issues list --login work --repo company/project +``` + +## Security Notes + +- **Never commit access tokens to git repositories** +- **Use environment variables or secure credential stores for tokens** +- **Rotate tokens periodically** +- **Use minimal scope tokens** (only permissions needed) + +## Troubleshooting + +### "No help topic for 'push'" +tea doesn't have a direct push command. Use standard `git push` with a properly configured remote. + +### Authentication failures +- Verify token hasn't expired +- Check tea login is configured: `tea login ls` +- Ensure correct permissions on token + +### "could not read Username" +Configure git remote with embedded credentials or use SSH keys instead of HTTPS. + +## References + +- tea CLI documentation: https://gitea.com/gitea/tea +- Gitea API documentation: https:///api/swagger