.claude/skills/promote/SKILL.md
Promote generic patterns from this project back to the upstream agent-kit. Use when you have reusable patterns to share.
npx skillsauth add lucidlabs-hq/agent-kit promoteInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Promote generic, reusable patterns from this downstream project back to the upstream agent-kit template.
lucidlabs/
├── lucidlabs-agent-kit/ # Upstream template
└── projects/
└── [this-project]/ # You are here (downstream)
# Run promotion script (default path: ../../lucidlabs-agent-kit)
./scripts/promote.sh --upstream ../../lucidlabs-agent-kit
# Preview only (dry run)
./scripts/promote.sh --upstream ../../lucidlabs-agent-kit --dry-run
# Custom upstream path (if different structure)
./scripts/promote.sh --upstream /path/to/agent-kit
| Promotable | Description |
|------------|-------------|
| .claude/skills/* | Claude Code skills |
| .claude/reference/* | Best practice documentation |
| frontend/components/ui/* | Generic UI components |
| frontend/lib/utils.ts | Utility functions |
| frontend/lib/hooks/* | Generic React hooks |
| scripts/* | Utility scripts |
| Blacklisted | Reason |
|-------------|--------|
| .claude/PRD.md | Project-specific requirements |
| frontend/app/* | Project-specific pages |
| mastra/src/agents/* | Domain-specific agents |
| convex/* | Project-specific database |
WICHTIG: Promotions gehen IMMER über Pull Requests, NIE direkt auf main!
WICHTIG: VOR jeder Promotion MUSS ein Abgleich mit Upstream erfolgen!
1. FETCH → Upstream holen: git fetch origin (PFLICHT!)
2. DIFF → Änderungen prüfen: Hat sich upstream was geändert? (PFLICHT!)
3. SYNC → Falls Änderungen: Erst downstream syncen
4. DETECT → Promotable Änderungen finden
5. SELECT → Auswählen was promoted wird
6. BRANCH → Feature Branch im Upstream erstellen
7. COPY → Dateien übertragen
8. PR → Pull Request erstellen (PFLICHT!)
9. REVIEW → Code Review durch Team
10. MERGE → Nach Approval mergen
The promote script now automatically checks upstream before promoting.
It runs git fetch origin in the upstream repo and compares local HEAD with remote. If there are new commits, the script blocks and exits with a clear message:
╔════════════════════════════════════════════════════════════════╗
║ [BLOCKED] Upstream has new commits since last pull ║
╚════════════════════════════════════════════════════════════════╝
Why: The upstream agent-kit has commits that are not in your
local copy. Promoting now could cause merge conflicts
or overwrite recent upstream changes.
New commits:
abc1234 feat: add new skill
def5678 docs: update readme
Fix: 1. Pull upstream first:
cd /path/to/agent-kit && git pull origin main
2. Run /sync in your downstream project
3. Then retry /promote
If upstream is up-to-date:
✓ Upstream is up-to-date (abc1234)
This check is not optional — it runs every time and cannot be bypassed.
| Direkter Push | Pull Request | |---------------|--------------| | ❌ Keine Review | ✅ Code wird geprüft | | ❌ Konflikte möglich | ✅ Konflikte vor Merge sichtbar | | ❌ Fehler gehen direkt live | ✅ CI/CD Tests laufen | | ❌ Keine Dokumentation | ✅ PR dokumentiert Änderung |
The script warns if files contain domain-specific keywords like:
ticket, customer, invoice, orderproduct, user, account, paymentThese indicate the code may not be generic enough for the template.
| Option | Description |
|--------|-------------|
| --upstream PATH | Path to agent-kit (required) |
| --dry-run | Preview without changes |
| --all | Promote all without selection |
| --help | Show help |
╔════════════════════════════════════════════════════════════════╗
║ PATTERN PROMOTION ║
╚════════════════════════════════════════════════════════════════╝
ℹ Downstream: ~/coding/repos/lucidlabs/projects/customer-portal
ℹ Upstream: ~/coding/repos/lucidlabs/lucidlabs-agent-kit
▶ Step 1: Scanning for promotable changes...
Promotable changes found:
[1] .claude/skills/code-review/SKILL.md (NEW)
[2] .claude/reference/api-patterns.md (NEW)
[3] frontend/components/ui/data-table.tsx (MODIFIED)
Enter numbers to promote (e.g., 1,2 or 'all'): 1,2
▶ Step 2: Checking upstream main status...
Last commit: abc1234 "docs: update readme" (2 hours ago)
Your local: In sync ✓
▶ Step 3: Creating promotion branch...
Branch: promote/20260128-code-review-api-patterns
▶ Step 4: Copying files to upstream...
✔ Copied: .claude/skills/code-review/SKILL.md
✔ Copied: .claude/reference/api-patterns.md
▶ Step 5: Creating Pull Request...
✔ Branch pushed: promote/20260128-code-review-api-patterns
✔ PR created: https://github.com/lucidlabs-hq/agent-kit/pull/42
╔════════════════════════════════════════════════════════════════╗
║ ✓ PROMOTION COMPLETE ║
║ ║
║ PR: https://github.com/lucidlabs-hq/agent-kit/pull/42 ║
║ ║
║ Next steps: ║
║ 1. Review the PR ║
║ 2. Request team review if needed ║
║ 3. Merge after approval ║
╚════════════════════════════════════════════════════════════════╝
Falls das Script nicht verfügbar ist:
# 1. Upstream aktualisieren
cd /path/to/lucidlabs-agent-kit
git fetch origin
git checkout main
git pull origin main
# 2. Promotion Branch erstellen
git checkout -b promote/$(date +%Y%m%d)-pattern-name
# 3. Dateien kopieren
cp /path/to/downstream/.claude/skills/my-skill/SKILL.md .claude/skills/my-skill/
# 4. Committen
git add .
git commit -m "feat: promote [pattern] from [project]"
# 5. Branch pushen
git push -u origin promote/$(date +%Y%m%d)-pattern-name
# 6. PR erstellen (PFLICHT!)
gh pr create --title "Promote: [Pattern Name]" --body "..."
⚠️ NIEMALS git push origin main im Upstream!
Promote patterns when:
Do NOT promote:
| Direction | Command | Description |
|-----------|---------|-------------|
| Downstream → Upstream | /promote | This skill |
| Upstream → Downstream | ./scripts/sync-upstream.sh | Pull updates from template |
Aktiviere Branch Protection für main im Agent Kit:
# Via GitHub CLI
gh repo edit lucidlabs-hq/agent-kit --enable-branch-protection
# Oder via GitHub UI:
# Settings → Branches → Add rule → main
# ✓ Require pull request before merging
# ✓ Require approvals (1)
Bei Promotions prüft Claude automatisch:
main?IF upstream AND on_main THEN
→ create branch
→ commit to branch
→ create PR
→ NEVER push to main directly
Wenn jemand versucht direkt zu pushen (und Branch Protection aktiv):
remote: error: GH006: Protected branch update failed
remote: At least 1 approving review is required
## Pre-Promotion Checklist
- [ ] Ist das Pattern wirklich generisch?
- [ ] Keine Domain-Keywords (invoice, customer, etc.)?
- [ ] Upstream main ist aktuell (`git fetch && git status`)?
- [ ] Feature Branch erstellt (nicht auf main)?
- [ ] PR wird erstellt (nicht direkter Push)?
- [ ] PR Description erklärt das Pattern?
development
Deploy invoice-accounting-assistant to HQ server. Runs tests first (TDD), then builds and deploys. Use when ready to push changes to staging/production.
testing
Visual UI verification with agent-browser. Use after implementing UI components to take screenshots, verify interactions, and self-check your work. FASTER than E2E tests.
documentation
Update README with current project status and features. Use after completing features.
tools
--- name: time-report description: Cross-project time report. Aggregates all session data from ~/.claude-time/sessions/. Use to see how much time was spent across all projects. disable-model-invocation: true allowed-tools: Bash, Read argument-hint: [all | this-week | this-month | last-month | {project-name}] --- # Time Report: Cross-Project Session Overview ## Objective Read ALL session files from `~/.claude-time/sessions/*.json` and produce an aggregated time report. Supports filtering by pe