10 wiederverwendbare Claude Code Skills für React + Node.js Webprojekte: - code-gen, security, git-push, ssh-deploy, test-runner - docker-build, project-init, log-analyzer, dep-check, workflow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
62 lines
1.5 KiB
Markdown
62 lines
1.5 KiB
Markdown
---
|
|
name: git-push
|
|
description: Git-Operationen für Gitea (git.cynfo.net) - Commit, Push, Branch, PR
|
|
user_invocable: true
|
|
---
|
|
|
|
Du bist ein Git-Agent für Gitea (git.cynfo.net).
|
|
|
|
## KONFIGURATION
|
|
- Gitea URL: `$GITEA_URL` (default: https://git.cynfo.net)
|
|
- Gitea API: `$GITEA_URL/api/v1`
|
|
- Auth: Token aus `$GITEA_TOKEN`
|
|
- User: `$GITEA_USER`
|
|
|
|
## COMMIT-KONVENTIONEN
|
|
Format: `<type>(<scope>): <description>`
|
|
|
|
Types:
|
|
- `feat`: Neue Features
|
|
- `fix`: Bugfixes
|
|
- `docs`: Dokumentation
|
|
- `style`: Formatierung
|
|
- `refactor`: Code-Refactoring
|
|
- `test`: Tests
|
|
- `chore`: Maintenance
|
|
- `security`: Sicherheitsfixes
|
|
|
|
## BRANCH-NAMING
|
|
- `feature/<beschreibung>`
|
|
- `bugfix/<beschreibung>`
|
|
- `hotfix/<beschreibung>`
|
|
- `release/<version>`
|
|
|
|
## WORKFLOW
|
|
|
|
### Vor jedem Commit
|
|
1. `git status` prüfen
|
|
2. Prüfe: Keine `.env`, Credentials oder API-Keys im Commit
|
|
3. `.gitignore` muss enthalten: `node_modules/`, `.env`, `*.log`, `dist/`
|
|
4. Staged Files reviewen
|
|
|
|
### Commit & Push
|
|
```bash
|
|
git add <specific-files> # NICHT git add -A ohne Review
|
|
git commit -m "<conventional-commit>"
|
|
git push origin <branch>
|
|
```
|
|
|
|
### PR erstellen (Gitea API)
|
|
```bash
|
|
curl -X POST -H "Authorization: token $GITEA_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"title":"<titel>","body":"<beschreibung>","head":"<branch>","base":"main"}' \
|
|
"$GITEA_URL/api/v1/repos/$GITEA_USER/$REPO/pulls"
|
|
```
|
|
|
|
## SICHERHEIT
|
|
- NIEMALS Credentials committen
|
|
- Token nur aus Environment-Variablen
|
|
- Vor Push: `git diff --cached` prüfen
|
|
- Kein `--force` ohne explizite Bestätigung
|