askill
outfitter-check

outfitter-checkSafety 95Repository

Verify Outfitter Stack compliance in a codebase. Scans for anti-patterns (throws, console, hardcoded paths) and produces a severity-ranked compliance report. Use for pre-commit checks, code review, or migration validation.

2 stars
1.2k downloads
Updated 3/5/2026

Package Files

Loading files...
SKILL.md

Outfitter Check

Verify Outfitter Stack compliance and produce a structured report.

Goal

Scan a codebase and produce a Compliance Report at .agents/notes/YYYY-MM-DD-outfitter-check.md documenting:

  1. What violations were found (by severity)
  2. Where they are (file:line)
  3. How to fix them (with pattern references)

Constraints

DO:

  • Load outfitter-atlas first for pattern knowledge
  • Scan systematically using the diagnostic commands
  • Rank findings by severity (Critical > High > Medium > Low)
  • Reference fieldguide patterns for fixes
  • Produce a Compliance Report at the end

DON'T:

  • Skip categories during scanning
  • Report issues without actionable guidance
  • Mix severity levels (keep them separate)
  • Forget to check the target scope (file, directory, or full codebase)

Steps

  1. Load outfitter-atlas for pattern expertise
  2. Determine scope — what are we checking?
  3. Run diagnostics — systematic anti-pattern scan
  4. Categorize findings — rank by severity
  5. Produce report — using TEMPLATE.md
  6. Migration guidance — detect version gaps and compose upgrade instructions

Step 1: Determine Scope

Ask or infer the target:

ScopeWhenCommand Modifier
Single file"Check this file"rg PATTERN path/to/file.ts
Directory"Check src/handlers"rg PATTERN path/to/dir/
Full codebase"Check compliance"rg PATTERN --type ts

Exclude test files unless specifically requested:

rg PATTERN --type ts -g "!*.test.ts" -g "!__tests__/*"

Step 2: Run Diagnostics

Run each scan and collect results.

Critical: Exception Control Flow

# Thrown exceptions (must convert to Result)
rg "throw new" --type ts -g "!*.test.ts" -n

# try/catch control flow (must convert to Result checking)
rg "try \{" --type ts -g "!*.test.ts" -n

Why critical: Breaks type safety, loses error context, makes control flow unpredictable.

High: Logging and Paths

# Console usage (must use ctx.logger)
rg "console\.(log|error|warn|info|debug)" --type ts -g "!*.test.ts" -n

# Hardcoded home paths (must use XDG via @outfitter/config)
rg "(homedir\(\)|~\/\.)" --type ts -g "!*.test.ts" -n

Why high: Console breaks structured logging; hardcoded paths break portability.

Medium: Type Safety

# Custom error classes (should use taxonomy)
rg "class \w+Error extends Error" --type ts -n

# Handlers without context parameter
rg "Handler<.*> = async \(input\)" --type ts -n

# Missing Result type returns
rg "async.*Handler.*\{" --type ts -A 10 | rg "return [^R]" -B 5

Why medium: Reduces type safety and pattern consistency.

Low: Style and Documentation

# process.exit without exitWithError
rg "process\.exit\(" --type ts -g "!*.test.ts" -n

# Missing .describe() on Zod schemas used with MCP
rg "z\.(string|number|boolean|object)\(\)(?!.*\.describe)" --type ts -n

Why low: Affects agent experience and exit code consistency.

Step 3: Categorize Findings

Count results and assign severity:

SeverityFindingsAction
Criticalthrow/try-catch in handlersMust fix before merge
Highconsole.log, hardcoded pathsShould fix before merge
MediumCustom errors, missing contextFix when touching file
LowStyle issues, missing describeNice to have

Severity Definitions

LevelImpactExamples
CriticalBreaks core patterns, causes runtime issuesThrown exceptions, unvalidated paths
HighBreaks observability or portabilityConsole logging, hardcoded paths
MediumReduces type safety or consistencyCustom errors, missing context param
LowAffects polish, not correctnessStyle, documentation gaps

Step 4: Produce Report

Write the Compliance Report to .agents/notes/YYYY-MM-DD-outfitter-check.md using TEMPLATE.md.

# Create directory if needed
mkdir -p .agents/notes

# Report path (replace YYYY-MM-DD with today's date)
# .agents/notes/2024-01-15-outfitter-check.md

Pass Criteria

StatusCriteria
PASS0 critical, 0 high
WARNINGS0 critical, 1+ high or medium
FAIL1+ critical

Quick Summary

## Compliance: [scope]

**Status**: PASS | WARNINGS | FAIL
**Issues**: X critical, Y high, Z medium, W low

{ details follow }

Fix References

Point to fieldguide patterns for each issue type:

IssueFix Pattern
throw newpatterns/conversion.md
try/catchpatterns/results.md
console.logpatterns/logging.md
Hardcoded pathspatterns/file-ops.md
Custom errorspatterns/errors.md
Missing contextpatterns/handler.md

Quick Check

For a fast pass/fail without full report:

# Critical count (should be 0)
rg "throw new|try \{" --type ts -g "!*.test.ts" -c | wc -l

# High count (should be 0)
rg "console\.(log|error|warn)|homedir\(\)" --type ts -g "!*.test.ts" -c | wc -l

Step 5: Migration Guidance

After the compliance scan, detect installed @outfitter/* versions and check for available migrations using the outfitter update command.

# Check for available updates (human-readable)
bunx outfitter update --guide --cwd .

For JSON output (version data only, does not include migration docs):

bunx outfitter update --json --cwd .

If updates are found, append a Migration Guidance section to the compliance report. If all packages are up to date, note that in the report.

The command:

  1. Reads package.json for @outfitter/* dependencies
  2. Queries npm for latest versions
  3. When --guide is used, composes migration docs from the kit plugin's shared migrations

Related Skills

  • outfitter-atlas — Patterns and fix guidance (load first)
  • outfitter-start — Full adoption workflow with staged plan
  • debug-outfitter — Deep investigation of specific issues

Install

Download ZIP
Requires askill CLI v1.0+▶

AI Quality Score

82/100Analyzed 2/19/2026

Highly structured and actionable technical skill for Outfitter Stack compliance verification. Well-organized with detailed diagnostic commands, severity rankings, and clear pass/fail criteria. Strong completeness and safety, though reusability is limited to Outfitter Stack users. Contains structured steps, tags, and reference templates earning multiple bonus rule hits.

95
90
55
85
92

Metadata

Licenseunknown
Version0.1.1
Updated3/5/2026
Publisheroutfitter-dev

Tags

github-actionsobservabilitytesting