Skip to content
pre-flight-check logo

Pre-Flight Check Skill

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Pre-Flight Check Skill

Before writing code, run through these checklists to validate your approach and catch potential issues early.

⚠️ MANDATORY: Git Workflow Check (DO THIS FIRST)

STOP! Before ANY code changes, complete this checklist:

1. Issue Check

# What issue are you working on?
bd show <issue-id>

# If no issue exists, create one first:
bd create --title="..." --type=feature|bug|task --priority=2
  • Issue exists and is claimed (bd update <id> --status=in_progress)

2. Branch Check

# What branch are you on?
git branch --show-current

# Are you on main? CREATE A FEATURE BRANCH:
git checkout -b feature/<issue-id>-short-description
  • On a feature branch (NOT main)
  • Branch follows naming: <type>/<issue-id>-description

3. Worklog Check

# Does a worklog entry exist for this issue?
ls .worklog/​*<issue-id>*
  • Worklog entry exists or will be created before completing work

Red Flags - STOP if any are true:

SituationAction Required
No issue for this workRun bd create first
On main branchRun git checkout -b feature/​...
Issue not claimedRun bd update <id> --status=in_progress

Only proceed to code changes after ALL boxes are checked.


When to Use This Skill

Activate pre-flight checks when:

  • Starting work on any issue (git workflow check FIRST)
  • Creating a new file
  • Making significant edits to existing code
  • Implementing a new feature
  • Uncertain about the right approach

Quick Decision Tree

What are you creating?
│
├─ HTML page/​component
│  └─ Use: HTML Pre-Flight Checklist
│     └─ Check: xhtml-author, accessibility-checker, metadata skills
│
├─ CSS file
│  └─ Use: CSS Pre-Flight Checklist
│     └─ Check: css-author, design-tokens skills
│
├─ JavaScript file
│  └─ Use: JavaScript Pre-Flight Checklist
│     └─ Check: javascript-author skill
│
├─ Form
│  └─ Use: Forms Pre-Flight Checklist
│     └─ Check: forms skill
│
├─ Image addition
│  └─ Use: Images Pre-Flight Checklist
│     └─ Check: responsive-images skill
│
└─ New site/​project
   └─ Use: Site Essentials Pre-Flight Checklist
      └─ Check: site-scaffold skill

Auto-Invoke Rules

These skills should be invoked automatically based on context:

ContextAuto-invoke Skills
Any code changepre-flight-check (this skill) - ALWAYS FIRST
Creating/​editing .htmlxhtml-author, accessibility-checker
Creating/​editing .csscss-author
Creating/​editing .jsjavascript-author
Adding icons/​visual indicatorsicons - NEVER use inline SVGs
Adding imagesresponsive-images, placeholder-images
Creating formsforms - Use <form-field> pattern
API calls in codeapi-client - Retry logic, error handling
Web Componentscustom-elements, state-management

Common Multi-Skill Patterns

When building these features, invoke ALL listed skills:

FeatureSkills to Invoke
Theme toggle (dark/​light)css-author, javascript-author, data-storage, icons, progressive-enhancement
Contact formxhtml-author, forms, accessibility-checker, javascript-author
Product card gridxhtml-author, css-author, responsive-images, icons
Navigation menuxhtml-author, css-author, icons, accessibility-checker
API integrationjavascript-author, api-client, error-handling, state-management
User authenticationauthentication, security, forms, javascript-author

Critical: Icons

ALWAYS invoke the icons skill when adding visual indicators. Theme toggles, buttons with icons, navigation icons, status indicators - ALL should use <x-icon>, never inline SVGs.

See COMPOSITIONS.md for more multi-skill patterns.


HTML Pre-Flight Checklist

Before writing HTML, verify:

Structure

  • What page type is this? (homepage, article, product, contact, etc.)
  • What semantic landmark elements are needed? (<header>, <nav>, <main>, <aside>, <footer>)
  • Is there existing content to preserve or migrate?
  • What heading hierarchy makes sense? (single <h1>, logical <h2>-<h6>)

Patterns to Consider

  • Does this match an existing pattern in .claude/​patterns/​pages/?
  • Are there custom elements in .claude/​schemas/​elements.json that apply?
  • Should this use a documented page pattern from the patterns skill?

Metadata

  • What metadata profile applies? (default, article, product, etc.)
  • Is Open Graph data needed for social sharing?
  • What canonical URL should be used?

Accessibility

  • Will all interactive elements be keyboard accessible?
  • Are proper ARIA labels planned for navigation regions?
  • Will images have meaningful alt text?

Potential Issues

IssueCheck For
Multiple <h1>Only one per page allowed
Missing landmarksEvery page needs <main>
Div soupUse semantic elements instead
Inline stylesWill fail validation
Missing lang<html lang="..."> required

CSS Pre-Flight Checklist

Before writing CSS, verify:

Architecture

  • Which layer does this belong to? (base, components, utilities, overrides)
  • Does a token already exist for this value in _tokens.css?
  • Is this component-scoped, section-scoped, or page-scoped?

Patterns to Consider

  • Can this use existing custom properties?
  • Should this use native nesting (max depth 3)?
  • Would :has() enable CSS-only interactivity?
  • Are there existing patterns in .claude/​patterns/ or .claude/​styles/?

Selectors

  • Using element or attribute selectors? (preferred over classes)
  • Using data-* attributes for state? (not classes)
  • Avoiding overly specific selectors?

Potential Issues

IssueCheck For
Nesting > 3 levelsWill trigger stylelint warning
Magic numbersUse tokens for spacing, colors
Class-based stateUse data-* attributes
Missing layerCSS should use @layer
Duplicate propertiesSame property twice in block

JavaScript Pre-Flight Checklist

Before writing JavaScript, verify:

Architecture

  • Is JavaScript actually needed? (CSS-only alternatives?)
  • Is this a Web Component? (needs Shadow DOM, lifecycle methods)
  • What's the functional core? (pure getters, computed values)
  • What's the imperative shell? (DOM updates, event handlers)

File Structure

  • Does this need separate template/​styles/​i18n files?
  • Where should this file live? (src/​components/, src/​scripts/)
  • What should be exported? (named exports only)

Patterns to Consider

  • Language fallback chain pattern for i18n?
  • CustomEvent for component communication?
  • MutationObserver for lang changes?
  • Cleanup in disconnectedCallback?

Potential Issues

IssueCheck For
var usageUse const or let
Default exportsUse named exports only
Missing cleanupMemory leaks from listeners
No JSDocDocument classes and public methods
Complexity > 10Refactor into smaller functions

Forms Pre-Flight Checklist

Before building forms, verify:

Structure

  • Using <form-field> custom element pattern?
  • Is there a submit action and method defined?
  • What validation is needed? (HTML5 attributes vs custom)

Accessibility

  • Every input has a <label> with matching for/id?
  • Error messages have <output> containers?
  • Required fields marked with required attribute?
  • Field descriptions linked via aria-describedby?

Patterns to Consider

  • <output> for real-time validation feedback?
  • autocomplete attributes for user convenience?
  • inputmode for mobile keyboards?

Potential Issues

IssueCheck For
Unlabeled inputsMajor accessibility violation
Missing autocompleteHurts user experience
No error containersWhere will errors display?
Hidden labelsUse .visually-hidden, not display: none

Images Pre-Flight Checklist

Before adding images, verify:

Files

  • Do WebP and AVIF alternatives exist?
  • Is the file under 200KB?
  • Are multiple sizes available for srcset?

HTML Attributes

  • alt attribute with meaningful description?
  • loading="lazy" for below-fold images?
  • decoding="async" for non-critical images?
  • width and height for layout stability?

Patterns to Consider

  • Should this use <picture> for art direction?
  • What sizes attribute values are needed?
  • Should this be a <figure> with <figcaption>?

Potential Issues

IssueCheck For
Missing altAccessibility violation
No modern formatsLarge file sizes
Missing dimensionsLayout shift
No lazy loadingPerformance impact

Site Essentials Pre-Flight Checklist

Before launching or when setting up a new site, verify these essentials exist:

Core Files

  • robots.txt - Search engine directives
  • sitemap.xml - XML sitemap for crawlers
  • humans.txt - Team credits and site info
  • manifest.json - PWA web app manifest

Error & Fallback Pages

  • 404.html - Not found error page
  • 500.html - Server error page (static, minimal dependencies)
  • offline.html - Service worker offline fallback
  • noscript.html - JavaScript-disabled fallback (if app requires JS)

Security

  • .well-known/​security.txt - Security contact info (RFC 9116)

Favicon Set

  • favicon.svg - Vector favicon (modern browsers)
  • favicon.ico - Legacy favicon (32x32)
  • apple-touch-icon.png - iOS home screen (180x180)
  • icon-192.png - PWA icon small
  • icon-512.png - PWA icon large
  • og-image.png - Social sharing (1200x630)

Quick Check Command

# Check for essential files in site root
ls -la robots.txt sitemap.xml humans.txt manifest.json 404.html 500.html 2>/​dev/​null
ls -la .well-known/​security.txt 2>/​dev/​null

When to Create These

FileWhen Required
robots.txtAll public sites
sitemap.xmlAll public sites with multiple pages
404.htmlAll sites
500.htmlAll sites with server-side processing
offline.htmlSites with service workers
noscript.htmlJS-required applications only
security.txtProduction sites accepting security reports
humans.txtOptional, but good practice

See site-scaffold skill for templates.


Pattern Matching Guide

When the user says... suggest this pattern:

User IntentSuggested Pattern/​Skill
"add a page"patterns skill, page templates
"create a form"forms skill, <form-field> pattern
"add navigation"<nav> with aria-label
"make it accessible"accessibility-checker skill
"add an image"responsive-images skill, <picture>
"style this"css-architecture skill, layers
"add interactivity"First check progressive-enhancement for CSS-only
"create a component"javascript-author skill, Web Component
"add metadata"metadata skill, profiles
"add dark mode"design-tokens skill, color-scheme

Red Flags to Watch For

Stop and reconsider if you notice:

  1. "Just add a div" - There's almost always a semantic element
  2. "Add a class for state" - Use data-* attributes instead
  3. "Quick inline style" - Will fail validation
  4. "Just copy this code" - Check if a pattern/​skill exists first
  5. "Add JavaScript for..." - Check if CSS can do it first
  6. "Skip the alt text" - Never acceptable
  7. "We'll fix it later" - Validation catches issues now

Verification Commands

After writing, verify with:

# HTML validation
npm run lint

# CSS validation
npm run lint:css

# JavaScript validation
npm run lint:js

# Accessibility check
npm run a11y

# Full validation
npm run lint:all

⚠️ MANDATORY: Completion Checklist (DO THIS LAST)

Before saying "done", complete this checklist:

1. Tests Pass

npm test
npm run lint:all
npm run test:coverage  # Check for missing tests
  • All tests pass
  • All linters pass
  • New scripts have corresponding test files

2. Worklog Updated

  • Worklog entry in .worklog/ documents changes made
  • Files modified are listed
  • Any decisions/​issues are noted

3. Commit Changes

git add <files>
git commit -m "type(scope): description"
  • Changes committed with conventional commit format
  • Commit message references issue if applicable

4. Request UAT

/​uat request <feature-name>
# This adds uat:requested label to the issue
  • UAT requested via /​uat request <feature-name>
  • Issue has uat:requested label
  • Testing instructions provided for human in .worklog/​uat-<feature>.md

5. Wait for Approval

# Check UAT status
/​uat status <feature-name>
# Or check issue labels
bd show <issue-id>
  • DO NOT close issue until uat:approved label is present
  • If denied (uat:denied label), address feedback and re-request UAT
  • Only close when approved: bd close <issue-id>

Completion Red Flags:

SituationAction Required
Tests failingFix before proceeding
No worklog entryCreate one now
On main branchShould have been on feature branch
No UAT requestedRun /​uat request <feature-name>
Closing without approvalSTOP - check bd show <id> for uat:approved label
uat:denied label presentAddress feedback, then /​uat request again

Related Skills

  • git-workflow - Enforce structured git workflow with conventional commits
  • unit-testing - Write unit tests for JavaScript files
  • xhtml-author - Write valid XHTML-strict HTML5 markup
  • css-author - Modern CSS organization with @layer
  • javascript-author - Vanilla JavaScript for Web Components
  • icons - Lucide icon library with <x-icon> Web Component
  • forms - HTML-first form patterns with CSS-only validation
  • accessibility-checker - Ensure WCAG2AA accessibility compliance

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View
check-code-quality logo
mattnigh/skills_collection

check-code-quality

Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.

24 0
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