Skip to content
quality-standards logo

Quality Standards Skill

quality-standards

Overview of protected quality thresholds and quick reference for all quality tools. Use when you need to understand quality metrics, run comprehensive quality checks, or learn which specialized skill to use. For specific issues, use dedicated skills (deptrac-fixer for Deptrac, complexity-manageme...

SKILL.md

Full skill instructions

Quality Standards Skill

Context (Input)

  • Need to understand protected quality thresholds
  • Running comprehensive quality checks before commit
  • Determining which specialized skill to use for specific issues
  • Quick reference for quality tool commands

Task (Function)

Understand quality metrics and route to appropriate specialized skill for fixes.

Success Criteria: Know which skill to use for your specific quality issue.

Protected Quality Thresholds

CRITICAL: These thresholds are protected and must NEVER be lowered.

PHPInsights (Source Code)

MetricRequiredFix With
Quality100%complexity-management
Complexity94%complexity-management
Architecture100%deptrac-fixer
Style100%Run make phpcsfixer

PHPInsights (Tests)

MetricRequiredFix With
Quality95%complexity-management
Complexity95%complexity-management
Architecture90%deptrac-fixer
Style95%Run make phpcsfixer

Other Tools

ToolMetricRequiredFix With
DeptracViolations0deptrac-fixer
PsalmErrors0Fix reported issues
PsalmSecurity Issues0Fix tainted flows
InfectionMSI100%testing-workflow
PHPUnitCoverage100%testing-workflow

Quick Reference Commands

Comprehensive Checks

# Run all CI checks (recommended before commit)
make ci

Success: Must output "✅ CI checks successfully passed!"

Individual Quality Checks

CheckCommandPurpose
Code qualitymake phpinsightsAll PHPInsights metrics
Complexity analysismake phpmdFind high-complexity methods
Static analysismake psalmType checking and errors
Security taintmake psalm-securitySecurity vulnerability scan
Architecturemake deptracLayer boundary validation
Code stylemake phpcsfixerAuto-fix PSR-12 style
Composer validationmake composer-validateValidate composer.json

Testing Commands

CheckCommandPurpose
Unit testsmake unit-testsDomain/​Application logic
Integration testsmake integration-testsComponent interactions
E2E testsmake behatFull user scenarios (Behat)
All testsmake all-testsUnit + Integration + E2E
Test coveragemake tests-with-coverageGenerate coverage report
Mutation testsmake infectionTest quality validation

Routing to Specialized Skills

When quality checks fail, use the appropriate specialized skill:

Architecture Issues

  • Deptrac violations → deptrac-fixer

    • Domain depends on Infrastructure
    • Layer boundary violations
    • "must not depend on" errors
  • DDD architecture patterns → implementing-ddd-architecture

    • Creating new entities/​value objects
    • Implementing CQRS patterns
    • Understanding layer responsibilities

Code Quality Issues

  • High cyclomatic complexity → complexity-management

    • PHPInsights complexity < 94%
    • PHPMD reports high CCN
    • Methods too complex
  • Code style issues → Run make phpcsfixer

    • PSR-12 violations
    • Line length > 100 chars
    • Formatting issues

Testing Issues

  • Test failures → testing-workflow
    • Unit/​Integration/​E2E failures
    • Mutation testing (Infection)
    • Test coverage < 100%

Workflow Integration

  • Before committing → ci-workflow

    • Run all checks systematically
    • Fix failures in priority order
    • Ensure all checks pass
  • PR review feedback → code-review

    • Fetch and address PR comments
    • Systematic comment resolution

Quality Improvement Workflow

Step 1: Run Comprehensive Checks

make ci

Step 2: Identify Failing Check

Check output for specific failure:

❌ CI checks failed:
  - phpinsights: Complexity score too low (93.5% < 94%)

Step 3: Use Specialized Skill

Based on failure type, use appropriate skill:

Failure PatternSkill to Use
"Complexity score too low"complexity-management
"Deptrac violations"deptrac-fixer
"must not depend on"deptrac-fixer
"tests failed"testing-workflow
"Psalm found errors"Fix type errors directly
"escaped mutants"testing-workflow

Step 4: Re-run CI

make ci

Repeat until: "✅ CI checks successfully passed!"

Constraints (Parameters)

NEVER

  • Lower quality thresholds in config files (phpinsights.php, infection.json5, etc.)
  • Skip failing checks to "save time"
  • Commit code without all CI checks passing
  • Modify deptrac.yaml to allow violations (fix code, not config)
  • Disable security checks

ALWAYS

  • Fix code to meet standards (not config to meet code)
  • Run make ci before creating commits
  • Use specialized skills for specific quality issues
  • Maintain 100% test coverage
  • Keep cyclomatic complexity low (target: < 5 per method)
  • Respect hexagonal architecture boundaries

Format (Output)

Expected CI Output

✅ CI checks successfully passed!

Expected PHPInsights Output

[CODE] 100.0 pts       ✅ Target: 100%
[COMPLEXITY] 94.0 pts  ✅ Target: 94%
[ARCHITECTURE] 100 pts ✅ Target: 100%
[STYLE] 100.0 pts      ✅ Target: 100%

Expected Deptrac Output

✅ No violations found

Expected Infection Output

Mutation Score Indicator (MSI): 100%

Verification Checklist

After using this skill:

  • Identified which quality check is failing
  • Selected appropriate specialized skill for the issue
  • Ready to execute specialized skill workflow
  • Understand which threshold applies to the failure
  • Know the command to re-run the check after fixes

Related Skills

Reference Documentation

For detailed examples and patterns, see:

  • Refactoring patterns → complexity-management skill
  • Architecture rules → implementing-ddd-architecture skill
  • Layer boundaries → deptrac-fixer skill
  • Testing strategies → testing-workflow skill

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View