Add gitea skill - replaces 42.7k token Gitea MCP
- Wraps tea CLI for Gitea operations - Supports issues, PRs, releases, labels, milestones - 95% context savings vs MCP (42.7k → ~2k tokens) - First skill in collection
This commit is contained in:
59
README.md
Normal file
59
README.md
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# Claude Skills Collection
|
||||||
|
|
||||||
|
Custom Claude Code skills to replace heavy MCP servers with lightweight CLI wrappers.
|
||||||
|
|
||||||
|
## Why This Repo?
|
||||||
|
|
||||||
|
Some MCP servers consume massive amounts of context. This repo provides lightweight skill alternatives that:
|
||||||
|
- ✅ Only load when invoked (vs. always loaded MCPs)
|
||||||
|
- ✅ Use standard CLI tools (tea, gh, etc.)
|
||||||
|
- ✅ Save context budget for actual work
|
||||||
|
- ✅ Can be shared across projects
|
||||||
|
|
||||||
|
## Skills
|
||||||
|
|
||||||
|
### gitea
|
||||||
|
|
||||||
|
Wraps the `tea` CLI for Gitea repository management.
|
||||||
|
|
||||||
|
**Replaces:** Gitea MCP (42.7k tokens → ~2k tokens)
|
||||||
|
|
||||||
|
**Commands:** Issues, PRs, releases, labels, milestones, repos
|
||||||
|
|
||||||
|
**Installation:**
|
||||||
|
```bash
|
||||||
|
# Install tea CLI
|
||||||
|
brew install tea
|
||||||
|
|
||||||
|
# Configure for your Gitea instance
|
||||||
|
tea login add --url https://gitea.kostverse.com --token YOUR_TOKEN --name kostverse
|
||||||
|
|
||||||
|
# Copy skill to personal skills directory
|
||||||
|
cp -r gitea ~/.claude/skills/
|
||||||
|
|
||||||
|
# Restart Claude Code
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
```
|
||||||
|
/gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
Then use standard tea CLI commands as shown in the skill instructions.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
To add a new skill:
|
||||||
|
1. Create a directory with `SKILL.md`
|
||||||
|
2. Include YAML frontmatter with name and description
|
||||||
|
3. Document common operations
|
||||||
|
4. Test it works
|
||||||
|
5. Submit PR
|
||||||
|
|
||||||
|
## Context Savings
|
||||||
|
|
||||||
|
| MCP Server | Tokens | Skill Alternative | Tokens | Savings |
|
||||||
|
|------------|--------|-------------------|--------|---------|
|
||||||
|
| Gitea MCP | 42.7k | gitea skill | ~2k | 95% |
|
||||||
|
|
||||||
|
More skills coming as we identify heavy MCPs to replace.
|
||||||
151
gitea/SKILL.md
Normal file
151
gitea/SKILL.md
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
---
|
||||||
|
name: gitea
|
||||||
|
description: Interact with Gitea repositories using tea CLI. Use when managing issues, pull requests, releases, repos, labels, milestones on gitea.kostverse.com
|
||||||
|
allowed-tools: Bash
|
||||||
|
---
|
||||||
|
|
||||||
|
# Gitea Management via tea CLI
|
||||||
|
|
||||||
|
You have access to the `tea` CLI for managing Gitea repositories. This is a lightweight alternative to the Gitea MCP.
|
||||||
|
|
||||||
|
## Authentication
|
||||||
|
|
||||||
|
Already configured:
|
||||||
|
- Login: `kostverse`
|
||||||
|
- URL: `https://gitea.kostverse.com`
|
||||||
|
- User: `matt`
|
||||||
|
|
||||||
|
Always use `--login kostverse` with commands.
|
||||||
|
|
||||||
|
## Common Operations
|
||||||
|
|
||||||
|
### Issues
|
||||||
|
|
||||||
|
**List issues:**
|
||||||
|
```bash
|
||||||
|
tea issues list --repo OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create issue:**
|
||||||
|
```bash
|
||||||
|
tea issues create --repo OWNER/REPO --login kostverse \
|
||||||
|
--title "Issue title" \
|
||||||
|
--description "Issue body" \
|
||||||
|
--labels "bug,enhancement" \
|
||||||
|
--assignees "username"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Close issue:**
|
||||||
|
```bash
|
||||||
|
tea issues close ISSUE_NUMBER --repo OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
**Comment on issue:**
|
||||||
|
```bash
|
||||||
|
tea comment ISSUE_NUMBER --repo OWNER/REPO --login kostverse \
|
||||||
|
--body "Comment text"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pull Requests
|
||||||
|
|
||||||
|
**List PRs:**
|
||||||
|
```bash
|
||||||
|
tea pulls list --repo OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create PR:**
|
||||||
|
```bash
|
||||||
|
tea pulls create --repo OWNER/REPO --login kostverse \
|
||||||
|
--head BRANCH --base main \
|
||||||
|
--title "PR title" \
|
||||||
|
--description "PR body"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Merge PR:**
|
||||||
|
```bash
|
||||||
|
tea pulls merge PR_NUMBER --repo OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
### Repositories
|
||||||
|
|
||||||
|
**List repos:**
|
||||||
|
```bash
|
||||||
|
tea repos list --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
**Clone repo:**
|
||||||
|
```bash
|
||||||
|
tea clone OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
### Labels
|
||||||
|
|
||||||
|
**List labels:**
|
||||||
|
```bash
|
||||||
|
tea labels list --repo OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create label:**
|
||||||
|
```bash
|
||||||
|
tea labels create --repo OWNER/REPO --login kostverse \
|
||||||
|
--name "label-name" \
|
||||||
|
--color "ff0000" \
|
||||||
|
--description "Label description"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Releases
|
||||||
|
|
||||||
|
**List releases:**
|
||||||
|
```bash
|
||||||
|
tea releases list --repo OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create release:**
|
||||||
|
```bash
|
||||||
|
tea releases create --repo OWNER/REPO --login kostverse \
|
||||||
|
--tag v1.0.0 \
|
||||||
|
--title "Release title" \
|
||||||
|
--note "Release notes"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Milestones
|
||||||
|
|
||||||
|
**List milestones:**
|
||||||
|
```bash
|
||||||
|
tea milestones list --repo OWNER/REPO --login kostverse
|
||||||
|
```
|
||||||
|
|
||||||
|
**Create milestone:**
|
||||||
|
```bash
|
||||||
|
tea milestones create --repo OWNER/REPO --login kostverse \
|
||||||
|
--title "Milestone name" \
|
||||||
|
--description "Milestone description" \
|
||||||
|
--deadline "2026-12-31"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
1. **Always use `--login kostverse`** - Specifies which Gitea instance to use
|
||||||
|
2. **Repo format** - Use `OWNER/REPO` format (e.g., `matt/aurai-v2`)
|
||||||
|
3. **Help** - Use `tea COMMAND --help` for detailed options
|
||||||
|
4. **Output** - Most commands output tables or formatted text
|
||||||
|
5. **Error handling** - Check exit codes and stderr for failures
|
||||||
|
|
||||||
|
## Example Workflows
|
||||||
|
|
||||||
|
### Triage new issue
|
||||||
|
1. `tea issues list --repo matt/REPO --login kostverse` - See all issues
|
||||||
|
2. Read the issue details
|
||||||
|
3. Add labels: `tea issues create` with `--labels` flag
|
||||||
|
4. Assign: `tea issues create` with `--assignees` flag
|
||||||
|
|
||||||
|
### Create PR from feature branch
|
||||||
|
1. Make commits locally
|
||||||
|
2. Push branch to Gitea
|
||||||
|
3. `tea pulls create --repo matt/REPO --login kostverse --head feature-branch --base main --title "..." --description "..."`
|
||||||
|
4. Get PR URL from output
|
||||||
|
|
||||||
|
### Ship a release
|
||||||
|
1. Tag the commit: `git tag v1.0.0 && git push origin v1.0.0`
|
||||||
|
2. `tea releases create --repo matt/REPO --login kostverse --tag v1.0.0 --title "v1.0.0" --note "Release notes here"`
|
||||||
|
3. Verify at output URL
|
||||||
Reference in New Issue
Block a user