Agent skill

Preflight

by linuxfoundation in linuxfoundation/insights

Pre-PR validation — license headers, format, lint, TypeScript check, build, and protected file check.

MITAuto-check: notesDevelopment

Install Preflight

skills CLI
$ npx skills add linuxfoundation/insights --skill preflight -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install linuxfoundation/insights preflight --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/linuxfoundation/insights.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/preflight .claude/skills/preflight && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
preflight
GitHub stars
280
Token cost
~1.5k tokens
SKILL.md length
521 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Pre-PR validation — license headers, format, lint, TypeScript check, build, and protected file check.

  • Works in 5 steps: New files created — with their purpose → Modified files — with what changed → Server API changes — any new or modified… → …
  • Tasks that involve Linting and formatting
  • SKILL.md covers Check 0: Working Tree Status, Check 1: License Headers, Check 2: Formatting and Check 3: Linting, plus 6 more sections
  • Calls git, pnpm and claude

What it does

Preflight is an agent skill from linuxfoundation/insights. Pre-PR validation — license headers, format, lint, TypeScript check, build, and protected file check. Use before submitting any PR, to check if code is ready, validate changes, or verify a branch before review.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. It works with TypeScript and Vue.js. The repository describes itself as: Insights into the world's most critical open source software. The licence is MIT.

When your agent uses it

  • Tasks that involve Linting and formatting

Example prompts

  • “/preflight”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Glob, Grep, AskUserQuestion

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. New files created — with their purpose
  2. Modified files — with what changed
  3. Server API changes — any new or modified routes in server/api/
  4. Component changes — any new or modified components
  5. Data/query changes — any TanStack Query or Pinia store changes

What it can do on your machine

Read from SKILL.md and the folder at commit 3df53b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Glob
    • Grep
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • pnpm
    • claude
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, pnpm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Preflight loads about 1.5k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 521 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Glob, Grep, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from linuxfoundation/insights at commit 3df53b5, republished under its MIT licence (© linuxfoundation). 521 words, ~1,499 tokens.

Download SKILL.mdSave it as .claude/skills/preflight/SKILL.md (or your agent's skills folder).
name
preflight
description
Pre-PR validation — license headers, format, lint, TypeScript check, build, and protected file check. Use before submitting any PR, to check if code is ready, validate changes, or verify a branch before review.
allowed-tools
Bash, Read, Glob, Grep, AskUserQuestion

Pre-Submission Preflight Check

You are running a comprehensive validation before submitting a pull request. Run each check in order, report results clearly, and help fix any issues found.

All script commands run from the frontend/ directory unless otherwise noted.

Check 0: Working Tree Status

Before running any validation, check the state of the working tree:

bash
git status
git diff --stat origin/main...HEAD
git log --format="%h %s%n%b" origin/main...HEAD

Evaluate:

  • Uncommitted changes? — Ask the contributor: commit now or stash?
  • No commits ahead of main? — The branch has nothing to validate. Ask if they're on the right branch.
  • Commit messages missing JIRA ticket? — Flag commits that don't include IN- references inline in the description.
  • Commits missing --signoff? — Flag any commits without Signed-off-by: lines.

Resolve any issues before proceeding.

Check 1: License Headers

Every source file (.ts, .vue, .js, .scss) must have the copyright header. Check for files missing it:

bash
# From repo root
find frontend/app frontend/server -type f \( -name "*.ts" -o -name "*.vue" -o -name "*.js" -o -name "*.scss" \) | \
  xargs grep -rL "Copyright" 2>/dev/null | grep -v node_modules | grep -v ".nuxt" | head -20

The correct headers are:

  • TypeScript / JS / SCSS: // Copyright (c) 2025 The Linux Foundation and each contributor. + // SPDX-License-Identifier: MIT
  • Vue files: <!--\nCopyright (c) 2025 The Linux Foundation and each contributor.\nSPDX-License-Identifier: MIT\n-->

If any files are missing headers, add them using the scripts/add-license.js script or manually.

Check 2: Formatting

bash
# From repo root
pnpm format

This applies oxfmt formatting. Run format before lint to eliminate whitespace noise from the lint step.

If files were modified, stage them:

bash
git add -p

Check 3: Linting

bash
# From repo root
pnpm lint

If there are lint errors, fix them. Common issues:

  • Unused imports or variables
  • Missing type annotations
  • Vue template rule violations
Re-validation

If any fixes were applied in Checks 1–3, re-run lint to confirm fixes are clean:

bash
cd frontend && pnpm lint

Check 4: TypeScript Check

bash
cd frontend && pnpm tsc-check

Fix any type errors before proceeding. Common issues:

  • Missing types on function parameters
  • Incorrect return types
  • Import path issues

Check 5: Build Verification

bash
cd frontend && pnpm build

The build must succeed. If it fails:

  • Check for TypeScript errors not caught by tsc-check
  • Verify all imports resolve correctly
  • Check for circular dependencies
Show full SKILL.md (238 more words)Show less

Check 6: Protected Files Check

The authoritative list of protected files is maintained in .claude/hooks/guard-protected-files.sh. Cross-reference the diff against that hook — do not rely on any hardcoded list here, which may be stale.

bash
# Get changed files
git diff --name-only origin/main...HEAD

# Extract the protected path patterns from the hook
grep -E "^\s+(frontend/|\.husky/|\.oxlintrc|\.oxfmtrc|CLAUDE|\.claude/|scripts/|COPYRIGHT|package\.json|pnpm-lock)" .claude/hooks/guard-protected-files.sh

For each changed file, check whether it matches any case pattern or glob ([[ ... == glob ]]) in the hook. If it does, flag it — those files should NOT be modified without code owner approval.

If protected files appear in the diff, warn the contributor and ask them to revert or get code owner approval.

Check 7: Commit Verification

bash
git status
git log --format="%h %s%n%b" origin/main...HEAD
  • All changes committed? — If not, remind them to commit.
  • Commit messages follow conventions? — type: description format per commit-workflow.md. Scope is optional. Valid types include feat, fix, docs, chore, refactor, build, etc.
  • --signoff on all commits? — Every commit must have Signed-off-by:.
  • JIRA ticket referenced? — Commit messages should include IN- references inline in the description.

Check 8: Change Summary

Generate a summary of all changes for the PR description:

bash
git diff --stat origin/main...HEAD

List:

  1. New files created — with their purpose
  2. Modified files — with what changed
  3. Server API changes — any new or modified routes in server/api/
  4. Component changes — any new or modified components
  5. Data/query changes — any TanStack Query or Pinia store changes

Results Report

Present a clear report:

text
PREFLIGHT RESULTS
─────────────────────────────────
✓ Working tree        — Clean, N commits ahead of main
✓ License headers     — All files have headers
✓ Formatting          — Applied
✓ Linting             — No errors
✓ TypeScript          — No errors
✓ Build               — Succeeded
✓ Protected files     — None modified
✓ Commits             — Conventions followed, signed off
─────────────────────────────────
READY FOR PR

Or if there are issues:

text
PREFLIGHT RESULTS
─────────────────────────────────
✓ Working tree        — Clean, N commits ahead of main
✗ License headers     — 2 files missing headers (see above)
✓ Formatting          — Applied
✗ Linting             — 3 errors (see above)
✓ TypeScript          — No errors
✗ Build               — Failed (see above)
✓ Protected files     — None modified
✓ Commits             — Conventions followed, signed off
─────────────────────────────────
ISSUES FOUND — Fix before submitting
If All Checks Pass

Suggest creating the PR:

"All preflight checks passed! Ready to create a PR. Would you like me to create it with gh pr create?"

© linuxfoundation, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/preflight of linuxfoundation/insights.

Open the folder on GitHubat commit 3df53b5

Compare with similar skills

Preflight next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Preflight compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Preflight this skilllinuxfoundation/insights280—~1.5kAutomated safety check: NotesMIT
OpenObserve ESLint and TypeScript Fixesopenobserve/openobserve22k—~5.1kAutomated safety check: PassAGPL-3.0
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k1 repos~2.2kAutomated safety check: PassMIT
Generate Release Notesteambit/bit18k—~2.2kAutomated safety check: PassCustom licence
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT
Pnpm Engineteambit/bit18k—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • A playbook for fixing ESLint and TypeScript errors in the OpenObserve web frontend, with rule-by-rule guidance and typing conventions.

    22k GitHub stars~5.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Generate comprehensive release notes for Bit from git commits and pull requests.

    18k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Pnpm Engine

    teambit/bit

    Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.

    18k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when biome migrate eslint must preserve configurable ESLint rule options through source-option models, Biome conversions, typed rule variants, and migration fixtures.

    26k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed

More from linuxfoundation/insights

All 9 skills in this repo
  • Event Tracking

    linuxfoundation/insights

    Add event tracking calls to Vue/Nuxt components in the Insights app using the useTrackEvent composable.

    280 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check passed
  • Review PR

    linuxfoundation/insights

    Review a pull request against Insights architecture standards — fetches PR diff, verifies previous comments are addressed, validates PR metadata (title, branch, JIRA, size), runs a code-standards…

    280 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check: notes
  • Adr

    linuxfoundation/insights

    Record an architecture decision as an ADR in api/docs/arch/adr/.

    280 GitHub stars~1k tokensUpdated 6 days ago
    Auto-check passed
  • Dco

    linuxfoundation/insights

    Recover from missing DCO sign-off on commits. An agent skill from linuxfoundation/insights.

    280 GitHub stars~696 tokensUpdated 6 days ago
    Auto-check: notes
  • Fix Vulns

    linuxfoundation/insights

    Automated triage and fixing of Dependabot security vulnerabilities (IN-1189).

    280 GitHub stars~3.8k tokensUpdated 6 days ago
    Auto-check: notes
  • Setup

    linuxfoundation/insights

    Full development environment setup from scratch — prerequisites, dependencies, .env file, optional local PostgreSQL database (for auth/collections/chat work), and dev server.

    280 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check: notes

Categories

Questions about Preflight

What does Preflight do?

Pre-PR validation — license headers, format, lint, TypeScript check, build, and protected file check. Preflight is an agent skill from linuxfoundation/insights. Pre-PR validation — license headers, format, lint, TypeScript check, build, and protected file check.

When should I use Preflight?

Preflight fits situations like: tasks that involve Linting and formatting.

How do I install Preflight in Claude Code?

Run `npx skills add linuxfoundation/insights --skill preflight -a claude-code`. Or copy the skill folder (.claude/skills/preflight in linuxfoundation/insights) into .claude/skills/preflight in your project. Claude Code loads it when a task matches its description.

How do I install Preflight in Codex?

Run `npx skills add linuxfoundation/insights --skill preflight -a codex`. Or copy the skill folder (.claude/skills/preflight in linuxfoundation/insights) into .agents/skills/preflight in your project. Codex loads it when a task matches its description.

Can I use Preflight in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add linuxfoundation/insights --skill preflight -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/preflight, .gemini/skills/preflight, .github/skills/preflight and .opencode/skills/preflight in your project.

What does Preflight need to run?

Going by SKILL.md and its folder, Preflight needs the command-line tools its instructions call (git, pnpm, claude and gh). Its frontmatter pre-approves these tools: Bash, Read, Glob, Grep, AskUserQuestion.

Does Preflight access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Preflight safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Preflight use?

Preflight is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Preflight use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Preflight?

Skills that share tags, products or a category with Preflight: OpenObserve ESLint and TypeScript Fixes (openobserve/openobserve, 22k stars), Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars), Generate Release Notes (teambit/bit, 18k stars) and Wagmi Feature Development (wevm/wagmi, 6.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Preflight?

linuxfoundation (a GitHub organization) maintains it in linuxfoundation/insights, which has 280 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 1, 2026.

Source: linuxfoundation/insights on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.