project-workflow
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)
When to Engage
You should proactively assist:
- Before committing code (most important)
- When user asks about workflow or process
- When setting up quality gates
- When troubleshooting Bun-specific issues
Pre-Commit Checklist
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:
- Files added/moved/deleted? Run
bun run craft - All tests passing? (
bun run test- green) - No TypeScript errors? (
bun run type-check- clean) - No linting errors? (
bun run lint- clean) - Code formatted? (
bun run format- applied) - Committed to feature branch? (not main/dev)
- Commit message follows conventions?
For complete TypeScript type safety rules (type guards), see typescript-type-safety skill
Bun-Specific Commands
Testing Commands
CRITICAL - NEVER use:
bun test # ❌ WRONG - May not work correctly
ALWAYS use:
bun run test # ✅ CORRECT - Uses package.json script
Barrel Files
ALWAYS run after creating/moving/deleting files:
bun run craft
This updates barrel files (index.ts exports) for clean imports.
When to run:
- After creating new files
- After moving/renaming files
- After deleting files
- Before committing changes
Bun Runtime APIs
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!");
},
});
Quality Gates Execution Order
Why this order matters:
- craft - Ensures imports are correct before other checks
- format - Auto-fixes formatting issues
- lint - Catches code quality issues
- type-check - Validates TypeScript correctness
- test - Ensures functionality works
Each step depends on the previous one passing.
Common Workflow Mistakes
Mistakes to avoid:
- ❌ Using
bun testinstead ofbun run test - ❌ Forgetting
bun run craftafter file operations - ❌ Committing with TypeScript errors
- ❌ Skipping quality gates
- ❌ Running quality gates out of order
- ❌ Committing directly to main/dev branches
- ❌ Using Node.js APIs instead of Bun APIs
- ❌ Relative imports instead of barrel files
Quick Reference
Before 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
Remember
- Quality gates are mandatory - Not optional
- Bun commands are specific - Use
bun run test, notbun test - Order matters - Follow the quality gates sequence
- Barrel files are critical - Run
bun run craftafter file changes - Check CLAUDE.md - For complete project rules and standards
More from marcioaltoe/claude-craftkit
ui-designer
Expert UI/UX designer for React applications with shadcn/ui and Tailwind CSS. **ALWAYS use when creating UI components, implementing responsive layouts, or designing interfaces.** Use when user needs component creation, design implementation, responsive layouts, accessibility improvements, dark mode support, or design system architecture. Examples - "create a custom card component", "build a responsive navigation", "setup shadcn/ui button", "implement dark mode", "make this accessible", "design a form layout".
13clean-architecture
Clean Architecture principles for Modular Monolith with bounded contexts and minimal shared kernel. **ALWAYS use when working on backend code, ESPECIALLY when creating files, deciding file locations, or organizing contexts (auth, tax, bi, production).** Use proactively to ensure context isolation and prevent "Core Obesity Syndrome". Examples - "create entity", "add repository", "where should this file go", "modular monolith", "bounded context", "shared kernel", "context isolation", "file location", "layer organization".
8architecture-auditor
Architecture audit and analysis specialist for Modular Monoliths. **ALWAYS use when reviewing codebase architecture, evaluating bounded contexts, assessing shared kernel size, detecting "Core Obesity Syndrome", or comparing implementation against ADR-0001 and anti-patterns guide.** Use proactively when user asks about context isolation, cross-context coupling, or shared kernel growth. Examples - "audit contexts structure", "check shared kernel size", "find cross-context imports", "detect base classes", "review bounded context isolation", "check for Core Obesity".
6code-standards
Expert in code design standards including SOLID principles, Clean Code patterns (KISS, YAGNI, DRY, TDA), and pragmatic software design. **ALWAYS use when designing ANY classes/modules, implementing features, fixing bugs, refactoring code, or writing functions.** Use proactively to ensure proper design, separation of concerns, simplicity, and maintainability. Examples - "create class", "design module", "implement feature", "refactor code", "fix bug", "is this too complex", "apply SOLID", "keep it simple", "avoid over-engineering".
5frontend-engineer
Expert frontend engineering with simplified pragmatic architecture, React 19, TanStack ecosystem, and Zustand state management. **ALWAYS use when implementing ANY frontend features.** Use when setting up project structure, creating pages and state management, designing gateway injection patterns, setting up HTTP communication and routing, organizing feature modules, or optimizing performance. **ALWAYS use when implementing Gateway Pattern (Interface + HTTP + Fake), Context API injection, Zustand stores, TanStack Router, or feature-based architecture.**
5backend-engineer
Backend engineering with Modular Monolith, bounded contexts, and Hono. **ALWAYS use when implementing ANY backend code within contexts, Hono APIs, HTTP routes, or service layer logic.** Use proactively for context isolation, minimal shared kernel, and API design. Examples - "create API in context", "implement repository", "add use case", "context structure", "Hono route", "API endpoint", "context communication", "DI container".
4