Code Quality Measure, enforce, and improve code quality across languages. Linting JavaScript/TypeScript Python Go Rust Formatting Code Coverage Complexity Metrics Tech Debt Indicators Look for these patterns: Notes - Run linting on changed files only in CI for speed: . - Coverage percentage alone is misleading — 80% with no edge case tests is worse than 60% with thorough tests. - Fix linting errors incrementally. Don't dump 500 fixes into one commit. - Complexity 10 is a code smell. 20 needs refactoring. ---

)`.\n- Coverage percentage alone is misleading — 80% with no edge case tests is worse than 60% with thorough tests.\n- Fix linting errors incrementally. Don't dump 500 fixes into one commit.\n- Complexity > 10 is a code smell. > 20 needs refactoring.\n---","attachment_filenames":[],"attachments":[],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Code Quality","type":"text"}]},{"type":"paragraph","content":[{"text":"Measure, enforce, and improve code quality across languages.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Linting","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"JavaScript/TypeScript","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# ESLint — find issues\nnpx eslint src/ --format json | jq '[.[] | select(.errorCount > 0 or .warningCount > 0) | {file: .filePath, errors: .errorCount, warnings: .warningCount}]'\n\n# Auto-fix\nnpx eslint src/ --fix\n\n# Specific rules only\nnpx eslint src/ --rule '{\"no-unused-vars\": \"error\"}'","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Python","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Ruff — fast linter + formatter\nruff check src/\nruff check src/ --fix\n\n# Type checking\nmypy src/ --ignore-missing-imports\n\n# Both together\nruff check src/ && mypy src/","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Go","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# golangci-lint — meta linter\ngolangci-lint run ./...\n\n# With specific linters\ngolangci-lint run --enable gosec,govet,errcheck,staticcheck ./...\n\n# JSON output\ngolangci-lint run --out-format json ./... | jq '.Issues[] | {file: .Pos.Filename, line: .Pos.Line, linter: .FromLinter, text: .Text}'","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Rust","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Clippy — Rust linter\ncargo clippy -- -W clippy::all\n\n# Treat warnings as errors\ncargo clippy -- -D warnings\n\n# With suggestions\ncargo clippy --fix","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Formatting","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Prettier (JS/TS/CSS/JSON/MD)\nnpx prettier --check \"src/**/*.{ts,tsx,js,jsx}\"\nnpx prettier --write \"src/**/*.{ts,tsx,js,jsx}\"\n\n# Ruff format (Python)\nruff format src/\nruff format --check src/\n\n# gofmt (Go)\ngofmt -l .\ngofmt -w .\n\n# rustfmt (Rust)\ncargo fmt --check\ncargo fmt","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Code Coverage","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Jest (JS/TS)\nnpx jest --coverage --json | jq '{lines: .coverageMap | to_entries | map(.value.s | to_entries | map(.value) | {total: length, covered: map(select(. > 0)) | length}) | {total: map(.total) | add, covered: map(.covered) | add} | {pct: (100 * .covered / .total | floor)}}'\n\n# Simpler: just run and read summary\nnpx jest --coverage 2>&1 | tail -10\n\n# pytest (Python)\npytest --cov=src --cov-report=term-missing\n\n# Go\ngo test -coverprofile=coverage.out ./...\ngo tool cover -func=coverage.out | tail -1\n\n# Rust\ncargo tarpaulin --out stdout","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Complexity Metrics","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Python — cyclomatic complexity\nradon cc src/ -a -s -nb\n\n# Python — maintainability index\nradon mi src/ -s -nb\n\n# JavaScript/TypeScript — complexity via ESLint\nnpx eslint src/ --rule '{\"complexity\": [\"warn\", 10]}' --format json | jq '[.[] | .messages[] | select(.ruleId == \"complexity\") | {file: input.filePath, line: .line, message: .message}]'","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Tech Debt Indicators","type":"text"}]},{"type":"paragraph","content":[{"text":"Look for these patterns:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# TODO/FIXME/HACK comments\ngrep -rn \"TODO\\|FIXME\\|HACK\\|XXX\\|TEMP\" src/ --include=\"*.ts\" --include=\"*.py\" --include=\"*.go\" | wc -l\n\n# List them\ngrep -rn \"TODO\\|FIXME\\|HACK\" src/ --include=\"*.ts\" --include=\"*.py\"\n\n# Long files (>300 lines)\nfind src/ -name \"*.ts\" -o -name \"*.py\" | xargs wc -l | sort -rn | head -20\n\n# Duplicate code detection (Python)\n# Install: pip install pylint\npylint --disable=all --enable=duplicate-code src/","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Notes","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Run linting on changed files only in CI for speed: ","type":"text"},{"text":"eslint $(git diff --name-only --diff-filter=ACMR HEAD~1 | grep -E '\\.(ts|tsx|js)

Code Quality Measure, enforce, and improve code quality across languages. Linting JavaScript/TypeScript Python Go Rust Formatting Code Coverage Complexity Metrics Tech Debt Indicators Look for these patterns: Notes - Run linting on changed files only in CI for speed: . - Coverage percentage alone is misleading — 80% with no edge case tests is worse than 60% with thorough tests. - Fix linting errors incrementally. Don't dump 500 fixes into one commit. - Complexity 10 is a code smell. 20 needs refactoring. ---

)","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Coverage percentage alone is misleading — 80% with no edge case tests is worse than 60% with thorough tests.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Fix linting errors incrementally. Don't dump 500 fixes into one commit.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Complexity > 10 is a code smell. > 20 needs refactoring.","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"code-quality","author":"@skillopedia","source":{"stars":0,"repo_name":"thinkfleet-engine","origin_url":"https://github.com/thinkfleetai/thinkfleet-engine/blob/HEAD/skills/code-quality/SKILL.md","repo_owner":"thinkfleetai","body_sha256":"fbc1d183b2ad513ec34d87c7906577b4884e1bc292878eaeee1ba8fccc91ab07","cluster_key":"b7c5cb5189cbf22cc2040dfa3f100d33ea2b4474541fd3c717e6cc4270df6ddc","clean_bundle":{"format":"clean-skill-bundle-v1","source":"thinkfleetai/thinkfleet-engine/skills/code-quality/SKILL.md","bundle_sha256":"a16360e039c87f56de9bf7b7e23e965a67596c3f836ebd87dca2f3b544aee1f7","attachment_count":0,"text_attachments":0,"binary_attachments":0},"cluster_size":1,"skill_md_path":"skills/code-quality/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"software-engineering","category_label":"Engineering"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"software-engineering","metadata":{"thinkfleetbot":{"emoji":"📊","requires":{"anyBins":["eslint","ruff","golangci-lint","clippy"]}}},"import_tag":"clean-skills-v1","description":"Measure and improve code quality: linting, complexity analysis, coverage reports, tech debt tracking, and formatting enforcement."}},"renderedAt":1782979602704}

Code Quality Measure, enforce, and improve code quality across languages. Linting JavaScript/TypeScript Python Go Rust Formatting Code Coverage Complexity Metrics Tech Debt Indicators Look for these patterns: Notes - Run linting on changed files only in CI for speed: . - Coverage percentage alone is misleading — 80% with no edge case tests is worse than 60% with thorough tests. - Fix linting errors incrementally. Don't dump 500 fixes into one commit. - Complexity 10 is a code smell. 20 needs refactoring. ---