Loading...
Loading...
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".
npx skill4agent add marcioaltoe/claude-craftkit project-workflow# 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 testbun run quality # Executes all 5 stepsbun run craftbun run testbun run type-checkbun run lintbun run formattypescript-type-safetybun test # ❌ WRONG - May not work correctlybun run test # ✅ CORRECT - Uses package.json scriptbun run craft// ✅ 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!");
},
});bun testbun run testbun run craftbun run quality # Run all quality gates
git status # Verify changes
git add . # Stage changes
git commit -m "feat(scope): description" # Commit with conventiongit checkout dev
git pull origin dev
git checkout -b feature/feature-name
# ... make changes ...
bun run quality
git commit -m "feat: add feature"# Create new files
# ...
bun run craft # Update barrel files
bun run quality # Run quality gates
git commitbun run testbun testbun run craft