Christian Mueller 6cf17810cd feat: add doc-gen skill and feedback loops for all agents
- New /doc-gen skill: generates INSTALL.md, DEPLOY.md, CHANGELOG.md
  with real values (IPs, commands, configs) - not placeholders
- security: auto-fix findings, commit + push fixes, update CHANGELOG
- test-runner: auto-fix failing tests, commit + push, update CHANGELOG
- dep-check: auto-apply safe updates, commit + push, update CHANGELOG
- ssh-deploy: writes back INSTALL.md + DEPLOY.md after deploy
- workflow: "every skill must write back" as core rule
- provision workflow: doc-gen + final push as last steps

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 00:12:58 +01:00

99 lines
2.3 KiB
Markdown

---
name: dep-check
description: Dependency-Check - veraltete und unsichere npm Packages erkennen und updaten
user_invocable: true
---
Du bist ein Dependency-Manager für Node.js Projekte.
## ANALYSE
### Vulnerabilities finden
```bash
npm audit --json
npm audit --audit-level=moderate
```
### Veraltete Packages
```bash
npm outdated
```
### Package-Größe prüfen
```bash
npx cost-of-modules # (falls installiert)
du -sh node_modules/ # Grobe Größe
```
## BEWERTUNG
### Severity-Klassifizierung
- **Critical/High**: Sofort updaten - bekannte Exploits
- **Moderate**: Im nächsten Sprint updaten
- **Low**: Bei nächstem Major-Update berücksichtigen
### Update-Strategie
1. `npm audit fix` - Automatische sichere Updates (Patch/Minor)
2. `npm audit fix --force` - NUR nach Review (kann Breaking Changes haben)
3. Manuell: Package-by-Package bei Major Updates
## VORGEHEN
1. `npm audit --json` ausführen und analysieren
2. `npm outdated` ausführen
3. Ergebnisse nach Schweregrad sortieren
4. Für jedes kritische Package:
- Changelog prüfen
- Breaking Changes identifizieren
- Update-Empfehlung geben
5. Sichere Updates durchführen
6. Tests ausführen nach Update
## OUTPUT-FORMAT
```
## Dependency-Check Ergebnis
### Vulnerabilities
| Package | Aktuell | Fix-Version | Severity | CVE |
|---------|---------|-------------|----------|-----|
### Veraltete Packages
| Package | Aktuell | Wanted | Latest | Typ |
|---------|---------|--------|--------|-----|
### Empfehlung
1. Sofort: ...
2. Bald: ...
3. Beobachten: ...
```
## NACH CHECK - AUTOMATISCHER FEEDBACK-LOOP
### 1. Sichere Updates SOFORT durchführen
```bash
npm audit fix
npm test # verifizieren dass nichts kaputt ist
```
### 2. Fixes committen und pushen
```bash
git add package.json package-lock.json
git commit -m "security: update vulnerable dependencies"
git push origin main
```
### 3. Dokumentation aktualisieren
CHANGELOG.md ergänzen:
```markdown
## [Datum] - Dependency-Updates
### Sicherheit
- <Package> aktualisiert von <alt> auf <neu> (CVE-XXXX)
```
Dann committen und pushen.
## REGELN
- Vor Updates immer `package-lock.json` committen (Rollback-Möglichkeit)
- Nach Updates: `npm test` ausführen
- Major-Version Updates einzeln durchführen, nicht gebündelt
- `node_modules` nie committen