127 lines
2.8 KiB
Markdown
127 lines
2.8 KiB
Markdown
|
|
# Prompt Templates
|
||
|
|
|
||
|
|
> Eine Sammlung von strukturierten Prompt-Templates für KI-Assistenten. Verwaltet über Git für Versionierung und Kollaboration.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Struktur
|
||
|
|
|
||
|
|
```
|
||
|
|
prompt_template/
|
||
|
|
├── templates/ # Haupt-Templates
|
||
|
|
│ ├── system/ # System-Prompts (Code, Analyse, etc.)
|
||
|
|
│ ├── user/ # Benutzer-Prompts (Emails, Texte, etc.)
|
||
|
|
│ └── custom/ # Benutzerdefinierte Templates
|
||
|
|
│
|
||
|
|
├── categories/ # Optional: Kategorisierte Templates
|
||
|
|
│ ├── marketing/
|
||
|
|
│ ├── technical/
|
||
|
|
│ └── creative/
|
||
|
|
│
|
||
|
|
├── scripts/ # Hilfsskripte
|
||
|
|
│ └── validate.py # Template-Validierung
|
||
|
|
│
|
||
|
|
├── README.md
|
||
|
|
└── .gitignore
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Dateiformate
|
||
|
|
|
||
|
|
### JSON (empfohlen für strukturierte Templates)
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"name": "Template Name",
|
||
|
|
"version": "1.0",
|
||
|
|
"description": "Beschreibung...",
|
||
|
|
"role": "Rolle der KI",
|
||
|
|
"template": "Der eigentliche Prompt mit {variables}",
|
||
|
|
"variables": {
|
||
|
|
"var1": {"type": "string", "required": true, "description": "..."}
|
||
|
|
},
|
||
|
|
"tags": ["tag1", "tag2"],
|
||
|
|
"language": "de"
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Markdown (für einfache Templates mit Dokumentation)
|
||
|
|
```markdown
|
||
|
|
# Template Name
|
||
|
|
|
||
|
|
**Rolle**: Beschreibung
|
||
|
|
|
||
|
|
**Template**:
|
||
|
|
```
|
||
|
|
Prompt-Text mit {variables}
|
||
|
|
```
|
||
|
|
|
||
|
|
**Variablen**:
|
||
|
|
| Variable | Typ | Required | Beschreibung |
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## erweitert verwenden
|
||
|
|
|
||
|
|
### Neues Template hinzufügen
|
||
|
|
1. Template in passendem Verzeichnis erstellen (`.json` oder `.md`)
|
||
|
|
2. Validieren:
|
||
|
|
```bash
|
||
|
|
python scripts/validate.py templates/system/mein_template.json
|
||
|
|
```
|
||
|
|
3. Commiten:
|
||
|
|
```bash
|
||
|
|
git add templates/system/mein_template.json
|
||
|
|
git commit -m "feat: neues Template XY hinzugefügt"
|
||
|
|
```
|
||
|
|
|
||
|
|
### Template validieren
|
||
|
|
```bash
|
||
|
|
# Einzelnes Template
|
||
|
|
python scripts/validate.py pfad/zum/template.json
|
||
|
|
|
||
|
|
# Alle Templates
|
||
|
|
python scripts/validate.py --all
|
||
|
|
|
||
|
|
# Nur JSON-Templates
|
||
|
|
python scripts/validate.py --json
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Git Workflow
|
||
|
|
|
||
|
|
### Branches
|
||
|
|
- `master` / `main`: Stabile Templates
|
||
|
|
- `feature/*`: Neue Templates in Entwicklung
|
||
|
|
- `fix/*`: Korrekturen an bestehenden Templates
|
||
|
|
|
||
|
|
### Commit Messages
|
||
|
|
- `feat: neues Template hinzugefügt`
|
||
|
|
- `fix: Variable in Template XY korrigiert`
|
||
|
|
- `docs: Beschreibung aktualisiert`
|
||
|
|
- `refactor: Template-Struktur verbessert`
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Tags
|
||
|
|
|
||
|
|
| Tag | Beschreibung |
|
||
|
|
|-----|--------------|
|
||
|
|
| `#code` | Code-bezogene Templates |
|
||
|
|
| `#text` | Textgenerierung/Verarbeitung |
|
||
|
|
| `#creative` | Kreatives Schreiben |
|
||
|
|
| `#analysis` | Analyse-Tasks |
|
||
|
|
| `#communication` | Emails, Chat, etc. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Beispiele
|
||
|
|
|
||
|
|
Siehe:
|
||
|
|
- [Code Reviewer](templates/system/code_reviewer.json) - Code-Analyse
|
||
|
|
- [Text Summarizer](templates/system/summarizer.json) - Textzusammenfassung
|
||
|
|
- [Email Draft](templates/user/email_draft.md) - Email-Generierung
|
||
|
|
- [Brainstorming](templates/custom/brainstorming.md) - Ideenfindung
|