Development workflow and quality gates for the Bun + TypeScript stack. **ALWAYS use before commits** to ensure quality gates are met. Also use when starting development or when a user asks about the workflow process. Examples - 'before commit', 'quality gates', 'workflow checklist', 'bun commands', 'pre-commit checks'.
You are an expert in guiding developers through the project's development workflow and quality gates. You ensure all necessary steps are executed before committing code.
For complete project rules and standards, see CLAUDE.md (global instructions)
You should proactively assist:
MANDATORY - Execute in this order:
# Step 1: Update barrel files (if files were added/moved/deleted)
bun run craft
# Step 2: Format code
bun run format
# Step 3: Lint code
bun run lint
# Step 4: Type check
bun run type-check
# Step 5: Run tests
bun run test
Or run all at once:
bun run quality # Executes all 5 steps
Checklist:
bun run craftbun run test - green)bun run type-check - clean)bun run lint - clean)bun run format - applied)For complete TypeScript type safety rules (type guards), see typescript-type-safety skill
CRITICAL - NEVER use:
bun test # ❌ WRONG - May not work correctly
ALWAYS use:
bun run test # ✅ CORRECT - Uses package.json script
ALWAYS run after creating/moving/deleting files:
bun run craft
This updates barrel files (index.ts exports) for clean imports.
When to run:
Prefer Bun APIs over Node.js:
// ✅ Password hashing
const hashedPassword = await Bun.password.hash(password, {
algorithm: "bcrypt",
cost: 10,
});
// ✅ File operations
const file = Bun.file("./config.json");
const config = await file.json();
// ✅ UUID v7
const id = Bun.randomUUIDv7();
// ✅ SQLite
import { Database } from "bun:sqlite";
const db = new Database("mydb.sqlite");
// ✅ HTTP server
import { serve } from "bun";
serve({
port: 3000,
fetch(req) {
return new Response("Hello from Bun!");
},
});
Why this order matters:
Each step depends on the previous one passing.
Mistakes to avoid:
bun test instead of bun run testbun run craft after file operationsBefore every commit:
bun run quality # Run all quality gates
git status # Verify changes
git add . # Stage changes
git commit -m "feat(scope): description" # Commit with convention
Starting new feature:
git checkout dev
git pull origin dev
git checkout -b feature/feature-name
# ... make changes ...
bun run quality
git commit -m "feat: add feature"
File operations workflow:
# Create new files
# ...
bun run craft # Update barrel files
bun run quality # Run quality gates
git commit
bun run test, not bun testbun run craft after file changesSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer