Agent SkillsAgent Skills
phananhtuan09

quality-code-check

@phananhtuan09/quality-code-check
phananhtuan09
0
0 forks
Updated 3/31/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
design-responsive
0

Mobile-first responsive design for beautiful, multi-device UIs. Breakpoints, fluid layouts,touch optimization, and creative responsive patterns for distinctive experiences across screens.Use when building responsive UIs or adapting for mobile/tablet/desktop:- Creating mobile-first layouts, responsive landing pages, web apps- Defining breakpoints and fluid typography (mobile/tablet/desktop sizes)- Optimizing for touch devices, mobile users, smartphone/tablet interactions- Responsive component patterns (navigation, tables, forms, images)- User mentions "mobile", "responsive", "tablet", "multi-device", "touch"Keywords: responsive, mobile-first, mobile, tablet, desktop, breakpoints, touch, multi-deviceMobile-first approach: Design for mobile constraints first, enhance progressively.Integrates with design-fundamentals: Apply spacing, typography, color systems responsively.

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.

theme-factory
0

Interactive UI theme generation when user needs help choosing colors/fonts.Generates cohesive themes based on brand personality using color harmony theory.Use when user asks for theme/color help OR building UI without design:- "What theme should I use?" "Help me pick colors" "Generate theme"- "What colors work well together?" "Suggest color palette"- User uncertain about design direction, needs aesthetic suggestions- Building UI/landing page with no design specs, needs complete themeKeywords: theme, color palette, colors, fonts, brand personality, color harmonyInteractive workflow: Ask personality → Present options → Generate custom theme.References pre-defined themes in .claude/themes/.Do NOT load for: User has clear aesthetic/colors, Figma/design file provided.Integrates with design-fundamentals: Generates themes following design principles.