From f5-core
Guides code quality via linting (ESLint, Prettier), static analysis, refactoring, naming, documentation, and JS/TS best practices with metrics and tool setup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/f5-core:code-qualityThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Code quality practices for writing clean, maintainable, and reliable code. These skills cover linting, static analysis, refactoring, naming conventions, documentation, and best practices.
documentation/code-comments.mddocumentation/jsdoc-tsdoc.mddocumentation/readme-standards.mdlinting/eslint.mdlinting/lint-staged.mdlinting/prettier.mdlinting/stylelint.mdnaming/function-naming.mdnaming/naming-conventions.mdnaming/variable-naming.mdpractices/boy-scout-rule.mdpractices/clean-code-principles.mdpractices/code-review-checklist.mdpractices/technical-debt.mdrefactoring/code-smells.mdrefactoring/extract-method.mdrefactoring/refactoring-techniques.mdrefactoring/when-to-refactor.mdreferences/linting.mdreferences/practices.mdCode quality practices for writing clean, maintainable, and reliable code. These skills cover linting, static analysis, refactoring, naming conventions, documentation, and best practices.
| Metric | Good | Warning | Bad |
|---|---|---|---|
| Cyclomatic Complexity | < 10 | 10-20 | > 20 |
| Function Length | < 20 lines | 20-50 | > 50 |
| File Length | < 300 lines | 300-500 | > 500 |
| Nesting Depth | < 3 | 3-4 | > 4 |
| Code Coverage | > 80% | 60-80% | < 60% |
| Duplicate Code | < 3% | 3-5% | > 5% |
| Technical Debt Ratio | < 5% | 5-10% | > 10% |
Automated code style enforcement and error detection:
Deep code analysis beyond linting:
Code improvement techniques:
Clear and consistent naming:
In-code documentation:
Development best practices:
# .f5/quality/code-quality-gate.yaml
code_quality_gate:
name: "Code Quality Standards"
metrics:
lint_errors: 0
lint_warnings: 10
complexity_max: 15
coverage_min: 80
duplication_max: 3
checks:
- eslint --max-warnings 0
- tsc --noEmit
- jest --coverage --coverageThreshold='{"global":{"lines":80}}'
| Tool | Purpose | Configuration |
|---|---|---|
| ESLint | Linting | eslint.config.js |
| Prettier | Formatting | .prettierrc |
| TypeScript | Type checking | tsconfig.json |
| Jest | Testing/Coverage | jest.config.js |
| Husky | Git hooks | .husky/ |
| lint-staged | Pre-commit | package.json |
# Install core tools
npm install -D eslint prettier typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
# Install formatting
npm install -D eslint-config-prettier eslint-plugin-prettier
# Install git hooks
npm install -D husky lint-staged
npx husky init
# Configure lint-staged
npm pkg set lint-staged='{"*.{ts,tsx}":["eslint --fix","prettier --write"]}'
npx claudepluginhub fujigo-software/f5-framework-claude --plugin f5-coreDefines code quality benchmarks, standards compliance, and best practices for Python (PEP8, type hints) and JavaScript/TypeScript (ESLint, Prettier), with quality scoring and components like tests and documentation. Use for validating codebases.
Assesses code quality through linting, formatting verification, test execution, coverage analysis, and maintainability metrics in JS/TS, Python, Rust, Elixir, Go projects.
Provides a structured approach to refining and improving code quality, architecture, and implementation patterns across projects.