# verify > Run code quality checks (lint, type check, tests). Use this after writing or modifying code to ensure quality. - Author: 6m1w - Repository: 6m1w/claude_dotfiles - Version: 20260121132432 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/6m1w/claude_dotfiles - Web: https://mule.run/skillshub/@@6m1w/claude_dotfiles~verify:20260121132432 --- --- name: verify description: Run code quality checks (lint, type check, tests). Use this after writing or modifying code to ensure quality. --- # Code Verification Run all quality checks for the current project. Auto-detects project type. ## Steps ### 1. Detect Project Type ```bash echo "=== Detecting Project Type ===" if [ -f "package.json" ]; then echo "Detected: Node.js/TypeScript project" PROJECT_TYPE="node" elif [ -f "pyproject.toml" ] || [ -f "setup.py" ] || [ -f "requirements.txt" ]; then echo "Detected: Python project" PROJECT_TYPE="python" elif [ -f "Cargo.toml" ]; then echo "Detected: Rust project" PROJECT_TYPE="rust" elif [ -f "go.mod" ]; then echo "Detected: Go project" PROJECT_TYPE="go" else echo "Unknown project type" PROJECT_TYPE="unknown" fi ``` ### 2. Run Checks Based on Project Type #### For Node.js/TypeScript: ```bash if [ "$PROJECT_TYPE" = "node" ]; then echo "" echo "=== TypeScript Type Check ===" if [ -f "tsconfig.json" ]; then npx tsc --noEmit 2>&1 || echo "Type errors found" fi echo "" echo "=== Lint ===" if [ -f "eslint.config.js" ] || [ -f ".eslintrc.js" ] || [ -f ".eslintrc.json" ]; then npm run lint 2>&1 || npx eslint . 2>&1 || echo "Lint errors found" elif [ -f "biome.json" ]; then npx biome check . 2>&1 || echo "Biome errors found" fi echo "" echo "=== Tests ===" if grep -q '"test"' package.json 2>/dev/null; then npm test 2>&1 || echo "Test failures" else echo "No test script found" fi fi ``` #### For Python: ```bash if [ "$PROJECT_TYPE" = "python" ]; then # Activate venv if exists if [ -d "venv" ]; then source venv/bin/activate elif [ -d ".venv" ]; then source .venv/bin/activate fi echo "" echo "=== Lint (ruff/flake8) ===" if command -v ruff &> /dev/null; then ruff check . 2>&1 || echo "Lint errors found" elif command -v flake8 &> /dev/null; then flake8 . --max-line-length=120 2>&1 || echo "Lint errors found" fi echo "" echo "=== Type Check (mypy/pyright) ===" if command -v mypy &> /dev/null; then mypy . --ignore-missing-imports 2>&1 || echo "Type errors found" elif command -v pyright &> /dev/null; then pyright 2>&1 || echo "Type errors found" fi echo "" echo "=== Tests (pytest) ===" if command -v pytest &> /dev/null; then pytest -v --tb=short 2>&1 || echo "Test failures" else echo "pytest not installed" fi fi ``` #### For Rust: ```bash if [ "$PROJECT_TYPE" = "rust" ]; then echo "" echo "=== Cargo Check ===" cargo check 2>&1 echo "" echo "=== Cargo Clippy ===" cargo clippy 2>&1 || echo "Clippy warnings" echo "" echo "=== Cargo Test ===" cargo test 2>&1 || echo "Test failures" fi ``` #### For Go: ```bash if [ "$PROJECT_TYPE" = "go" ]; then echo "" echo "=== Go Vet ===" go vet ./... 2>&1 echo "" echo "=== Go Test ===" go test ./... 2>&1 || echo "Test failures" fi ``` ### 3. Summary After running all checks, provide a summary: ```markdown ## Verification Results | Check | Status | Notes | |-------|--------|-------| | Lint | ✅/❌ | ... | | Type Check | ✅/❌ | ... | | Tests | ✅/❌ | X passed, Y failed | ### Issues Found - [ ] Issue 1 - [ ] Issue 2 ### Suggested Fixes 1. ... ``` ## Notes - Always run this after making code changes - If tests fail, analyze and fix before proceeding - Report results clearly to the user