templates/fullstack-convex-mastra/.claude/skills/deploy/SKILL.md
Deploy invoice-accounting-assistant to HQ server. Runs tests first (TDD), then builds and deploys. Use when ready to push changes to staging/production.
npx skillsauth add lucidlabs-hq/agent-kit deployInstall 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.
Deployment workflow with TDD integration. Tests MUST pass before deployment.
/deploy # Deploy to production (default)
/deploy staging # Deploy to staging (same as production for now)
Before deployment, verify:
KRITISCH: Deployment wird abgebrochen wenn Tests fehlschlagen.
cd frontend
# Unit Tests
pnpm run test
# Type Check
pnpm run type-check
# Lint
pnpm run lint
git status --porcelain
If there are changes:
⚠️ Uncommitted changes detected!
Options:
1. Commit changes first: /commit
2. Stash changes: git stash
3. Abort deployment
git branch --show-current
Warn if not on main:
⚠️ Not on main branch (currently on: feature/xyz)
Continue anyway? [y/N]
cd frontend
pnpm run build
If build fails:
❌ Build failed! Fix errors before deploying.
Common issues:
- TypeScript errors
- Missing dependencies
- Environment variables not set
rsync -avz --delete \
-e "ssh -p 2222" \
--exclude='.git' \
--exclude='node_modules' \
--exclude='.next' \
--exclude='.env.local' \
./ [email protected]:/opt/lucidlabs/projects/invoice/
ssh -p 2222 [email protected] << 'EOF'
cd /opt/lucidlabs/projects/invoice
# Build and deploy
docker compose -f docker-compose.hq.yml -p invoice up -d --build
# Wait for health check
sleep 15
# Show status
docker compose -f docker-compose.hq.yml -p invoice ps
EOF
curl -f https://invoice.lucidlabs.de/api/health || echo "Health check failed!"
┌─────────────────────────────────────────────────────────────────┐
│ ✅ DEPLOYMENT SUCCESSFUL │
├─────────────────────────────────────────────────────────────────┤
│ │
│ URL: https://invoice.lucidlabs.de │
│ Time: [timestamp] │
│ Branch: main │
│ Commit: [short-hash] │
│ │
│ Services: │
│ ├─ invoice-frontend ✅ Running │
│ ├─ invoice-mastra ✅ Running │
│ ├─ lucidlabs-convex ✅ Running │
│ └─ lucidlabs-portkey ✅ Running │
│ │
└─────────────────────────────────────────────────────────────────┘
If deployment fails:
ssh -p 2222 [email protected] << 'EOF'
cd /opt/lucidlabs/projects/invoice
# Rollback to previous version
git checkout HEAD~1
docker compose -f docker-compose.hq.yml -p invoice up -d --build
EOF
This deployment skill is integrated with the TDD workflow:
┌──────────────────────────────────────────────────────────────────┐
│ DEVELOPMENT WORKFLOW │
├──────────────────────────────────────────────────────────────────┤
│ │
│ 1. Write Test (RED) │
│ └─► pnpm run test │
│ │
│ 2. Implement Feature │
│ └─► pnpm run test (GREEN) │
│ │
│ 3. Refactor │
│ └─► pnpm run test (still GREEN) │
│ │
│ 4. Commit │
│ └─► /commit │
│ │
│ 5. Deploy │
│ └─► /deploy │
│ ├─► Tests (must pass) │
│ ├─► Build (must succeed) │
│ └─► Deploy to HQ │
│ │
└──────────────────────────────────────────────────────────────────┘
# Full deployment (with tests)
/deploy
# Skip tests (NOT RECOMMENDED)
# Only use in emergencies
pnpm run deploy:force
# Check deployment status
ssh -p 2222 [email protected] "docker ps | grep invoice"
# View logs
ssh -p 2222 [email protected] "docker logs invoice-frontend --tail 50"
Version: 1.0 Created: 29. Januar 2026
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
testing
Run tests with coverage report and gap analysis. MANDATORY before /commit and PR creation. Use after implementation or during validation.