Agent SkillsAgent Skills
phananhtuan09

quality-code-check

@phananhtuan09/quality-code-check
phananhtuan09
0
0 forks
Updated 4/6/2026
View on GitHub

Code quality validation through linting, type checking, and build verification. Multi-language support for automated quality gates. Use when validating code quality: - After implementation to validate code meets standards - Before creating pull requests or commits - When debugging build/type/lint issues - User explicitly requests quality checks Provides language-specific tool commands and validation workflows for: - JavaScript/TypeScript (ESLint, tsc, build tools) - Python (Ruff, MyPy, Pyright) - Go (golangci-lint, go build) - Rust (Clippy, cargo check/build) - Java (Gradle, Maven) Focuses on detecting issues early through systematic automated checks.

Installation

$npx agent-skills-cli install @phananhtuan09/quality-code-check
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Path.opencode/skill/quality-code-check/SKILL.md
Branchmain
Scoped Name@phananhtuan09/quality-code-check

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: quality-code-check description: | Code quality validation through linting, type checking, and build verification. Multi-language support for automated quality gates.

Use when validating code quality:

  • After implementation to validate code meets standards
  • Before creating pull requests or commits
  • When debugging build/type/lint issues
  • User explicitly requests quality checks

Provides language-specific tool commands and validation workflows for:

  • JavaScript/TypeScript (ESLint, tsc, build tools)
  • Python (Ruff, MyPy, Pyright)
  • Go (golangci-lint, go build)
  • Rust (Clippy, cargo check/build)
  • Java (Gradle, Maven)

Focuses on detecting issues early through systematic automated checks.

Quality Code Check

Purpose

Establish consistent code quality standards through automated validation tools, ensuring code reliability, maintainability, and consistency.


Core Principle

Code quality validation is a safety gate that catches errors early, prevents tech debt accumulation, and ensures code meets project standards.


Quality Check Categories

1. Linting - Code Style & Best Practices

What linting detects:

  • Code style violations (indentation, spacing, naming)
  • Unused variables and imports
  • Missing error handling patterns
  • Potentially dangerous patterns
  • Code complexity issues

Language-specific tools:

  • JavaScript/TypeScript: ESLint
  • Python: Ruff, Flake8
  • Go: golangci-lint
  • Rust: Clippy
  • Java: Spotbugs, Checkstyle

Approach:

  • Run linting on all modified files
  • Auto-fix warnings when possible
  • Fix remaining errors manually
  • Minimize warnings to project standards

2. Type Checking - Type Safety

What type checking validates:

  • Type consistency
  • Function parameter and return types
  • Null/undefined safety
  • Generic type parameters

Language-specific tools:

  • TypeScript: tsc --noEmit
  • Python: MyPy, Pyright
  • Go: Compiler (built-in)
  • Rust: Compiler (built-in)
  • Java: Compiler (built-in)

Approach:

  • Enable strict type checking when available
  • Run on all modified code
  • Fix type errors before proceeding
  • Use type annotations for function signatures

3. Build Verification - Compilability & Packaging

What build checking validates:

  • Code compiles without errors
  • All imports and dependencies resolve
  • Asset bundling completes
  • Runtime entry points exist

Language-specific tools:

  • JavaScript/TypeScript: Webpack, Vite, or npm run build
  • Python: python -m py_compile or test imports
  • Go: go build ./...
  • Rust: cargo build
  • Java: Maven (mvn compile), Gradle (gradle build)

Approach:

  • Run full build after all changes complete
  • Use production build configuration when available
  • All build steps must succeed without errors

Tool Invocation

Note: Commands are examples. Adjust to your project's package manager, config files, and scripts.

Project Detection

Search for project type by looking for config files:

  • package.json → JavaScript/TypeScript
  • pyproject.toml or requirements.txt → Python
  • go.mod → Go
  • Cargo.toml → Rust
  • pom.xml or build.gradle → Java

Language-Specific Commands

JavaScript/TypeScript

# Check package.json scripts first
npm run lint
npx eslint . --max-warnings=0

# Type checking
npm run typecheck
npx tsc --noEmit

# Build
npm run build

Python

# Linting
ruff check .
ruff check . --fix  # auto-fix

# Type checking
mypy .
pyright

# Import check
python -c 'import your_package'

Go

# Linting
golangci-lint run
go vet ./...

# Build (includes type checking)
go build ./...

Rust

# Linting
cargo clippy -- -D warnings

# Type checking
cargo check

# Build
cargo build
cargo build --release  # production

Java

# Gradle
./gradlew check
./gradlew build

# Maven
mvn verify
mvn compile

Error Handling

Tool not found:

  • Try command, catch error
  • If not found: Skip check, notify user
  • Continue with remaining checks

Check fails:

  • Parse error output
  • Report specific violations
  • Suggest fixes based on error type
  • Retry after fixes

Validation Workflow

When to Run

  • After implementation is stable enough
  • Before creating pull requests or commits
  • When user explicitly requests
  • Incrementally during development (optional)

Quality Check Sequence

  1. Detect available tools from project configuration

    • Search for config files
    • Identify which tools are available
  2. Run linting (scoped to changed files when possible)

    • Execute appropriate commands
    • Fix auto-fixable issues first (--fix flag)
    • Manually fix remaining violations
    • Target: Meet project's warning standards
  3. Run type checks

    • Execute appropriate commands
    • Fix all type errors
    • Validate type consistency across modules
    • Target: No type errors
  4. Run build (full build, production config when available)

    • Execute appropriate commands
    • Ensure all code compiles
    • Validate all imports resolve
    • Confirm output artifacts generated
    • Target: Build succeeds without critical errors

Error Recovery

If quality checks fail:

  1. Analyze errors - Identify root causes
  2. Fix issues - Make minimal changes to resolve
  3. Re-run checks - Execute same commands again
  4. Repeat - Continue until checks pass

If unable to fix:

  • Document the issue and root cause
  • Mark as blocked if preventing progress
  • Escalate or ask user for guidance

Common Mistakes

  1. Ignoring warnings - Warnings often indicate real problems → Fix them or understand why acceptable
  2. Only checking one file - Changes can break type checking across others → Check all modified files and dependencies
  3. Skipping the build step - Code might lint/type-check but fail to compile → Always verify full build
  4. Accepting auto-fixes blindly - Auto-fixes might hide real issues → Review each auto-fix before committing
  5. Not checking package.json scripts - Projects often define custom commands → Check scripts first before running tools directly
  6. Inconsistent standards - Allowing different levels across features → Maintain consistent standards for your project

Validation Checklist

Before considering quality checks complete:

  • Code is stable enough to validate
  • Linting tool runs successfully on changed files
  • Lint warnings minimized to project-acceptable levels
  • Type checking tool runs successfully
  • No critical type errors remain
  • Build completes successfully
  • No critical build errors present
  • Warnings at project-acceptable levels
  • All blocking issues fixed or escalated

Key Takeaway

Systematic quality validation catches issues early and maintains consistency.

Quality checks are flexible gates that validate code against project standards:

  • Run when code is stable enough
  • Adjust tool commands to your project's needs
  • Target project-appropriate warning levels
  • Use as validation before PRs, commits, or deployment

Commands shown are examples - check your project's scripts first. Quality standards should be consistent within your project but may vary between projects.

Systematic checks catch errors early, prevent tech debt accumulation, and build confidence in code readiness.

More by phananhtuan09

View all
frontend-design-theme-factory
0

Theme/color selection when user has no aesthetic direction and wants agent to decide. Use when: user is uncertain — "suggest colors", "what theme", "help me choose", "you pick". Keywords: suggest theme, suggest colors, what theme, what colors, help choose, help pick, no direction, you choose, recommend colors Do NOT use for: user has colors/style in mind, applying existing theme.

ux-accessibility
0

Accessibility principles for inclusive design - keyboard navigation, screen readers, ARIA, color contrast, and focus management. WCAG compliance for interfaces usable by all. Use when implementing interactive UI components requiring accessibility: - Forms, buttons, links, interactive elements needing keyboard access - Keyboard navigation, focus management, tab order - Screen reader support with semantic HTML and ARIA attributes - Color contrast validation for text/buttons (WCAG AA/AAA standards) - Modals, dialogs, dropdowns needing focus trapping - User mentions "accessible", "WCAG", "disabilities", "keyboard", "screen reader" Keywords: accessible, accessibility, WCAG, keyboard, screen reader, ARIA, contrast, a11y Focus on making UI usable via keyboard, screen readers, assistive technologies.

figma-design-extraction
0

Complete Figma design extraction for pixel-perfect implementation. Extracts design tokens, component specs, layouts, and responsive behavior systematically. Use when user provides Figma design: - Figma URL or file link provided - User mentions "Figma", "design file", "mockup", or "design system" - During /create-plan phase when design needs extraction - User says "extract from Figma" or references Figma link Extract systematically: - Design tokens: ALL colors (hex + usage), typography (sizes, weights, line heights), spacing scale, border radius, shadows, opacity values - Components: ALL states (default, hover, active, focus, disabled, loading, error), ALL variants (size/style/intent), exact dimensions, spacing, visual properties - Layouts: page structure, grid systems (columns, gutters), component hierarchy - Responsive: mobile/tablet/desktop differences explicitly documented - Assets: icons (names, sizes), images (dimensions, alt text), illustrations Goal: Extract ONCE completely during planning phase. Implementation should never need to re-fetch from Figma MCP. Focus on exact values only - no approximations, no guessing. Completeness prevents re-work and design inconsistencies. Critical for /create-plan workflow. Validates MCP connection before extraction. Documents everything in structured format for /execute-plan to implement accurately. Do NOT load for: Building UI without design (use theme-factory), implementing from already-extracted specs, responsive layout questions, or backend work.

design-fundamentals
0

Core design principles for creating distinctive, beautiful UIs with technical excellence. Combines creative direction with practical foundation for memorable, accessible interfaces. Use when building UI without specific design specs (Figma, screenshots, design files): - Creating landing pages, home pages, marketing pages from scratch - Building web apps, dashboards, admin panels without design - Choosing design system: typography, colors, spacing, visual hierarchy - Need to propose complete design (fonts, colors, layout, spacing) - Building distinctive UIs that avoid generic AI aesthetics Keywords: landing page, design system, typography, colors, spacing, visual hierarchy Two-part approach: 1. Creative Direction: Choose aesthetic tone (minimal, bold, elegant, playful) 2. Technical Foundation: Spacing scales, typography specs, WCAG contrast, hierarchy Goal: Create UIs that are BOTH beautiful (distinctive, memorable) AND correct (accessible, consistent, professional).