# Code Quality Check

> Automatically runs code quality checks (format, lint, typecheck) after generating or modifying code. Use when writing code, generating files, or when code changes need to be validated. Use when this capability is needed.

- Skill: `tomevault-io/code-quality-check-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/code-quality-check-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/code-quality-check-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/code-quality-check-2

---


# Code Quality Check

## Critical: Always Run After Code Changes

**After generating or modifying any code, you MUST automatically execute:**

```bash
pnpm format && pnpm lint && pnpm typecheck
```

## Workflow

1. **Generate or modify code**
2. **Immediately run quality checks** (do not wait for user request)
3. **If checks fail**: Fix issues and re-run until all pass
4. **Only then**: Consider the task complete

## Command Details

1. **`pnpm format`**: Formats code using Prettier
   - Automatically fixes formatting issues
   - Ensures consistent code style

2. **`pnpm lint`**: Runs ESLint with auto-fix
   - Checks for code quality issues
   - Automatically fixes fixable issues

3. **`pnpm typecheck`**: Runs TypeScript type checking
   - Validates type safety
   - Catches type errors before runtime

## Execution Rules

**MANDATORY**: Execute these commands automatically after:

- Creating new files
- Modifying existing files
- Generating code
- Completing code changes

**DO NOT**:

- Skip these checks
- Wait for user to request them
- Consider task complete without running checks

**If checks fail**:

1. Review error messages carefully
2. Fix all issues
3. Re-run the full command sequence
4. Repeat until all checks pass

## Example Workflow

```
1. User: "Create a new component"
2. Agent: [Creates component code]
3. Agent: [Automatically runs: pnpm format && pnpm lint && pnpm typecheck]
4. Agent: [If passes] "Component created and all quality checks passed"
5. Agent: [If fails] "Component created but quality checks failed. Fixing issues..."
   [Fixes issues and re-runs checks]
```

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/davidkk) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

