lint、test、buildコマンドを実行し、結果を解析する。エラー時は原因分析と修正提案を行う
Runs lint, test, and build commands, then analyzes output to diagnose errors and suggest specific fixes. It triggers automatically when you need to check code quality, run tests, or build your project.
/plugin marketplace add snhrm/claude-plugin/plugin install fe-eol-checker@claude-pluginThis skill is limited to using the following tools:
役割: lint/test/buildの実行と結果解析に特化。
入力: 実行コマンド、プロジェクト情報(呼び出し元から渡される)
ESLint自動修正 + TypeScript型チェックを実行:
# npm
npm run lint:fix
# yarn
yarn lint:fix
# pnpm
pnpm lint:fix
# bun
bun run lint:fix
lint:fixコマンドがない場合はpackage.jsonに追加:
{
"scripts": {
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix && tsc --noEmit"
}
}
| プロジェクト構成 | 推奨lint:fixコマンド |
|---|---|
| ESLint + TypeScript | eslint src --ext .js,.jsx,.ts,.tsx --fix && tsc --noEmit |
| Next.js | next lint --fix && tsc --noEmit |
| Biome | biome check --write src && tsc --noEmit |
# npm
npm run lint
# yarn
yarn lint
# pnpm
pnpm lint
# bun
bun run lint
# 自動修正(--fix オプション)
npm run lint -- --fix
yarn lint --fix
pnpm lint --fix
bun run lint --fix
# npm
npm test
npm run test
# yarn
yarn test
# pnpm
pnpm test
# bun
bun test
# 特定ファイルのみ
npm test -- {path}
yarn test {path}
pnpm test {path}
bun test {path}
# watchモードを無効化
npm test -- --watchAll=false
CI=true npm test
# npm
npm run build
# yarn
yarn build
# pnpm
pnpm build
# bun
bun run build
# TypeScript
npx tsc --noEmit
# または
npm run type-check
yarn type-check
pnpm type-check
# JSON形式で出力
npm run lint -- --format json
# 出力例
[
{
"filePath": "/path/to/file.ts",
"messages": [
{
"ruleId": "no-unused-vars",
"severity": 2,
"message": "'x' is defined but never used",
"line": 10,
"column": 5
}
],
"errorCount": 1,
"warningCount": 0
}
]
# JSON形式で出力
npm test -- --json --outputFile=test-results.json
# 出力例
{
"numTotalTests": 50,
"numPassedTests": 48,
"numFailedTests": 2,
"testResults": [
{
"name": "/path/to/test.ts",
"status": "failed",
"assertionResults": [
{
"title": "should work",
"status": "failed",
"failureMessages": ["Error: ..."]
}
]
}
]
}
# エラー出力例
src/components/Example.tsx(15,5): error TS2345:
Argument of type 'string' is not assignable to parameter of type 'number'.
# Next.js
# エラー出力例
Error: Build failed because of webpack errors
# Vite
# エラー出力例
error during build:
RollupError: ...
| カテゴリ | 例 | 自動修正 |
|---|---|---|
| フォーマット | indent, semi, quotes | 可能 |
| 未使用変数 | no-unused-vars | 要確認 |
| インポート順 | import/order | 可能 |
| React Hooks | react-hooks/rules-of-hooks | 不可 |
| カテゴリ | 原因 | 対処 |
|---|---|---|
| アサーション失敗 | 期待値不一致 | テストまたはコード修正 |
| タイムアウト | 非同期処理 | タイムアウト延長またはモック |
| モジュール解決 | import失敗 | パス確認、モック追加 |
| スナップショット | 不一致 | スナップショット更新 |
| カテゴリ | 原因 | 対処 |
|---|---|---|
| 型エラー | TypeScript | 型修正 |
| モジュール解決 | パッケージ不足 | インストール |
| 設定エラー | config不正 | 設定修正 |
| メモリ不足 | heap overflow | NODE_OPTIONS調整 |
# ESLint
npm run lint -- --fix
# Prettier
npx prettier --write .
# 両方
npm run lint -- --fix && npx prettier --write .
# Jest
npm test -- -u
npm test -- --updateSnapshot
# Vitest
npx vitest --update
# Jest
npx jest --clearCache
# Next.js
rm -rf .next
# 一般
rm -rf node_modules/.cache
{
"lint": {
"status": "pass|fail",
"command": "{実行コマンド}",
"errors": [
{
"file": "{ファイルパス}",
"line": 10,
"column": 5,
"rule": "{ルール名}",
"message": "{エラーメッセージ}",
"severity": "error|warning",
"fixable": true
}
],
"summary": {
"errorCount": 5,
"warningCount": 10,
"fixableCount": 12
}
},
"test": {
"status": "pass|fail",
"command": "{実行コマンド}",
"summary": {
"total": 50,
"passed": 48,
"failed": 2,
"skipped": 0,
"duration": "15.3s"
},
"failures": [
{
"file": "{テストファイル}",
"test": "{テスト名}",
"message": "{エラーメッセージ}",
"expected": "{期待値}",
"actual": "{実際の値}"
}
]
},
"build": {
"status": "pass|fail|skipped",
"command": "{実行コマンド}",
"errors": [
{
"file": "{ファイルパス}",
"line": 15,
"message": "{エラーメッセージ}",
"type": "typescript|webpack|rollup"
}
],
"duration": "45.2s"
},
"recommendations": [
{
"type": "auto_fix|manual_fix|investigate",
"description": "{推奨アクション}",
"command": "{実行コマンド(あれば)}"
}
]
}
# CI環境フラグ
CI=true npm test
CI=true npm run build
# 並列実行の制限(メモリ節約)
npm test -- --maxWorkers=2
# カバレッジ出力
npm test -- --coverage
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.