home / skills / duong / dotfiles / canva-validate

canva-validate skill

/config/agents/skills/canva-validate

This skill runs Canva monorepo validation commands such as lint, tests, typechecking, and accessibility checks to ensure code quality before commits.

npx playbooks add skill duong/dotfiles --skill canva-validate

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.3 KB
---
name: canva-validate
description: Runs Canva monorepo validation commands - pnpm fin, taz check, pnpm test, a11y storybook tests, typechecking, linting, and dependency fixes. Run before committing/pushing. Use when asked to lint, typecheck, test, run storybook, fix imports, or validate code in the Canva monorepo.
---

# Canva Validation Commands

Validation and quality check commands for the Canva monorepo. Run before committing/pushing.

## Commands

| Command | Description |
|---------|-------------|
| `pnpm fin` | Runs a11y storybook tests, jest tests, taz linting, and typechecking |
| `pnpm fin --only types` | Runs TypeScript typechecking only (run from `~/work/canva/web`) |
| `pnpm fin --only a11y_storybook` | Runs a11y storybook tests only |
| `pnpm test` | Runs all unit tests (run from `~/work/canva/web`) |
| `taz check` | Runs all linters and formatters |
| `taz check --fix` | Fixes all linting and formatting issues |
| `pnpm lint:deps:fix` | Fixes dependency/import issues and regenerates tsconfig.json files |
| `pnpm lint:ts:types:changed` | Checks types only on changed files |

## Usage

Run commands from the Canva monorepo root (`~/work/canva`).

### Typecheck Only
```bash
pnpm fin --only types
```

### Lint and Fix
```bash
taz check --fix
```

### Run Specific Tests
```bash
cd ~/work/canva/web
pnpm test path/to/test.spec.ts
```

Overview

This skill runs Canva monorepo validation commands to catch accessibility, test, lint, type, and dependency issues before committing or pushing. It wraps common commands like pnpm fin, taz check, pnpm test, a11y Storybook tests, typechecking, and dependency fixes for a single validation workflow. Use it to enforce repo-wide quality gates and reduce CI failures.

How this skill works

The skill executes validation commands from the monorepo root (~/work/canva). It can run full validation (pnpm fin), targeted checks (types, a11y_storybook), linters/formatters (taz check), unit tests (pnpm test), and dependency/import fixes (pnpm lint:deps:fix). Commands run in the appropriate working directories when required, e.g., pnpm test from ~/work/canva/web.

When to use it

  • Before committing or pushing code to catch local issues early
  • When a PR fails CI and you want to reproduce and fix failures locally
  • When adding or changing TypeScript types or interfaces
  • When running accessibility checks for Storybook components
  • When dependency or import problems appear after upgrades

Best practices

  • Run pnpm fin from the monorepo root to perform the full validation suite
  • Use pnpm fin --only types for fast TypeScript-only checks during iterative work
  • Run taz check --fix to automatically correct lint and formatting problems
  • Run pnpm lint:deps:fix after dependency changes to regenerate tsconfig files
  • Execute pnpm test from ~/work/canva/web for granular unit test runs

Example use cases

  • A developer runs pnpm fin locally before creating a PR to avoid CI failures
  • Quickly verify type fixes with pnpm fin --only types after refactoring
  • Fix style and lint issues with taz check --fix during a code cleanup task
  • Run a11y Storybook tests before merging a UI component change
  • Resolve import or dependency errors after upgrading packages with pnpm lint:deps:fix

FAQ

Where should I run these commands?

Run most commands from the monorepo root (~/work/canva). Run pnpm test from ~/work/canva/web when targeting web unit tests.

How do I run only TypeScript checks?

Use pnpm fin --only types to run TypeScript typechecking only.