project-workflow
Original:🇺🇸 English
Translated
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 user asks about workflow process. Examples - "before commit", "quality gates", "workflow checklist", "bun commands", "pre-commit checks".
38installs
Added on
NPX Install
npx skill4agent add marcioaltoe/claude-craftkit project-workflowTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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:
bash
# 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 testOr run all at once:
bash
bun run quality # Executes all 5 stepsChecklist:
- Files added/moved/deleted? Run
bun run craft - All tests passing? (- green)
bun run test - No TypeScript errors? (- clean)
bun run type-check - No linting errors? (- clean)
bun run lint - Code formatted? (- applied)
bun run format - Committed to feature branch? (not main/dev)
- Commit message follows conventions?
For complete TypeScript type safety rules (type guards), see skill
typescript-type-safetyBun-Specific Commands
Testing Commands
CRITICAL - NEVER use:
bash
bun test # ❌ WRONG - May not work correctlyALWAYS use:
bash
bun run test # ✅ CORRECT - Uses package.json scriptBarrel Files
ALWAYS run after creating/moving/deleting files:
bash
bun run craftThis 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:
typescript
// ✅ 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 instead of
bun testbun run test - ❌ Forgetting after file operations
bun run craft - ❌ 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:
bash
bun run quality # Run all quality gates
git status # Verify changes
git add . # Stage changes
git commit -m "feat(scope): description" # Commit with conventionStarting new feature:
bash
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:
bash
# Create new files
# ...
bun run craft # Update barrel files
bun run quality # Run quality gates
git commitRemember
- Quality gates are mandatory - Not optional
- Bun commands are specific - Use , not
bun run testbun test - Order matters - Follow the quality gates sequence
- Barrel files are critical - Run after file changes
bun run craft - Check CLAUDE.md - For complete project rules and standards