Git Operations Skill (Codeup)
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
CODEUP_TOKEN |
Yes | — | Codeup personal access token |
CODEUP_ORG_ID |
Yes | — | Codeup organization ID |
CODEUP_DOMAIN |
No | openapi-rdc.aliyuncs.com |
Codeup API domain |
GIT_WORKSPACE |
No | ./repos |
Local directory for cloned repositories |
Important
All required environment variables (CODEUP_TOKEN, CODEUP_ORG_ID) are pre-configured. Do NOT ask the user for credentials — just run the search/clone directly.
Workflow
Search repositories
Use scripts/codeup_search.py to fuzzy-search by name:
python3 scripts/codeup_search.py "quan-ai"
python3 scripts/codeup_search.py --list # list all repos
Clone a repository
After finding the repo URL from search results, clone via HTTPS with token auth:
git clone https://oauth2:${CODEUP_TOKEN}@codeup.aliyun.com/path/to/repo.git "${GIT_WORKSPACE:-./repos}/repo-name"
The clone URL is the webUrl from search results with https://oauth2:${CODEUP_TOKEN}@ prepended (replace https://).
Common git operations
These are standard git commands the planner can use directly:
git pull --rebase— pull latest changesgit log --oneline -20— recent commitsgit diff HEAD~1— show last changegit branch -a— list branches
Rules
- NEVER push without explicit user approval
- NEVER force-push under any circumstances
- Check if directory exists before cloning — pull instead if already cloned
- When searching, show the user the results and let them choose which repo to clone