Communitygithub.com

production-audit

ローカルの証拠に基づくプロダクション対応監査。出荷前アプリ、リリース前レビュー、マージ後チェック、およびローンチ準備に使用します。

production-audit とは?

このスキルは、アプリケーションのプロダクション readiness(本番稼働準備)を評価するための包括的な監査フレームワークを提供します。ユーザーが「このアプリは出荷準備ができているか」「本番で何が壊れる可能性があるか」「何を見逃したか」といった質問をした際に、コードベース、CIパイプライン、デプロイ構成、セキュリティ対策を体系的にチェックします。第三者による外部実行やデータ共有を排除し、ローカルとユーザーが承認した証拠のみを使用することで、セキュリティとプライバシーを重視しています。スコアリングシステム(0-100点)により、ブロッカー、リスク、改善点を明確にし、具体的な修正手順を提示します。Claude Code、Cursor、CodexなどのAIエージェントプラットフォームで使用でき、Webhook冪等性、認証漏れ、ロールバック計画の欠如などの典型的な問題を早期に発見します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/production-audit

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

プロダクション監査

このスキルは、ユーザーがアプリケーションの出荷準備ができているか、本番で何が壊れる可能性があるか、ローンチ前に修正すべき点は何かと尋ねたときに使用します。これは、古くなったコミュニティ版の production-audit アイデアをメンテナーセーフに書き直したものです。プロダクション readiness という有用なレンズを維持しつつ、固定されていない外部実行や第三者データ共有を排除しています。

使用すべき場合

  • ユーザーが「これはプロダクション対応ですか」「本番で何が壊れるか」「何を見逃したか」「このリポジトリを監査して」「出荷準備はできていますか?」と尋ねた場合。
  • 機能がマージされ、デプロイ前またはマージ後のリスクパスが必要な場合。
  • 公開ローンチ、デモ、顧客ロールアウト、または投資家向けウォークスルーが近づいている場合。
  • CIはグリーンだが、テストステータスだけでなくプロダクションリスクも確認したい場合。
  • 証拠収集のために、デプロイされたURL、リリースブランチ、PR、または現在のチェックアウトが利用可能な場合。

使用すべきでない場合

  • アクティブな実装中で、適切なレンズが行レベルのセキュアコーディングである場合。まず security-review を使用してください。
  • 純粋なライブラリ、テンプレート、ドキュメントのみのリポジトリ、またはスキャフォールドの場合。ただし、ユーザーがアプリケーション readiness ではなくパッケージング/リリース readiness を求めている場合は除きます。
  • ユーザーが正式なコンプライアンス監査を求めている場合。このスキルはエンジニアリングトリアージであり、法的、財務、医療、規制の認証ではありません。
  • 利用可能な唯一の証拠が製品アイデアであり、リポジトリ、デプロイ、CI、またはランタイムの表面がない場合。

仕組み

監査はローカルおよびユーザーが承認した証拠から構築します。固定されていないリモートコードを実行したり、リポジトリの内容を第三者サービスにアップロードしたり、外部スキャナーを呼び出したりしないでください。ただし、ユーザーがその特定のツールとデータフローを明示的に承認した場合は除きます。

次の順序で行います:

  1. リリース表面を確立する。
  2. 最近の変更と現在のブランチ状態を読み取る。
  3. リポジトリに実際に存在するランタイム、認証、データ、支払い、バックグラウンドジョブ、AI、およびデプロイの境界を検査する。
  4. CI、テスト、マイグレーション、環境ドキュメント、およびロールバックパスを確認する。
  5. 特定の修正を含む、出荷/ブロックの短い推奨事項を作成する。

証拠チェックリスト

安価なローカルシグナルから始めます:

git status --short --branch
git log --oneline --decorate -20
git diff --stat origin/main...HEAD

次に、プロジェクト固有の表面を検査します:

  • パッケージスクリプト、CIワークフロー、リリーススクリプト、Dockerファイル、およびデプロイマニフェスト。
  • APIルート、Webhook、認証ミドルウェア、バックグラウンドワーカー、cronジョブ、およびデータベースマイグレーション。
  • 環境変数のドキュメントと起動時チェック。
  • 可観測性フック、エラーレポート、ログ、ヘルスチェック、およびダッシュボード。
  • ロールバック、シード、マイグレーション、バックフィルの手順。
  • 最も重要なユーザーパスのE2Eカバレッジ。

デプロイされたURLがスコープ内にある場合は、そのURLに対するブラウザまたはHTTPチェックのみを使用し、ユーザーが安全なテストアカウントを提供しない限り、認証付きアクションは避けてください。

リスクレンズ

セキュリティと認証

  • 公開ルート、APIルート、管理ルートは明確に分離されていますか?
  • 認証と認可はサーバーサイドで強制されていますか?
  • シークレットはクライアントバンドル、ログ、出力例、およびチェックインされたファイルから除外されていますか?
  • レート制限、CSRF保護、CORSポリシー、アップロード検証は、アプリが必要とする場所に存在していますか?
  • AIまたはエージェントの表面は、プロンプトインジェクション、ツールの悪用、および信頼できないコンテンツが特権アクションにクロスするのを防御していますか?

データ整合性

  • マイグレーションは正常に前方実行され、ロールバックまたはリカバリ計画はありますか?
  • 破壊的なマイグレーション、バックフィル、データインポートは安全にステージングされていますか?
  • データベースポリシー、権限、サービスロールの境界は、アプリのテナンシーモデルと一致していますか?
  • 書き込み、ジョブ、Webhookハンドラーのリトライは冪等ですか?

支払いとWebhook

  • Webhookの署名は、信頼できるペイロードフィールドを解析する前に検証されていますか?
  • 各支払い、サブスクリプション、フルフィルメントのWebhookは冪等ですか?
  • 再生、重複配信、順序不同配信は処理されていますか?
  • テストモードとライブモードの認証情報は分離されていますか?

運用

  • アプリは、ドキュメント化されたコマンドを使用してクリーンチェックアウトから起動できますか?
  • 必要な環境変数は名前が付けられ、検証され、fail-fastですか?
  • 依存関係に到達可能であることを証明するヘルスチェックはありますか?
  • デプロイ、ロールバック、インシデントオーナーのパスはドキュメント化されていますか?
  • ログは、シークレットや個人データを漏洩せずに有用ですか?

ユーザーエクスペリエンス

  • ローンチクリティカルなパスは、デスクトップとモバイルでカバーされていますか?
  • フォームは、入力ズーム、レイアウトの重なり、送信状態のブロックなしにモバイルで使用可能ですか?
  • ローディング、空、エラー、および権限拒否の状態は、ユーザーに何が起こったかを伝えていますか?
  • クリティカルな操作が失敗した場合のサポートまたはリカバリパスはありますか?

スコアリング

スコアは優先順位付けを強制するために使用し、数学的な確実性を示すためではありません。

バンドスコア意味
ブロック0-49最優先リスクが修正されるまで出荷しない
リスクあり50-69小規模ロールアウトまたは内部ベータ版でのみ出荷
注意付きでローンチ可能70-84所有者がリストされたリスクを受け入れる場合に出荷
強固85-100利用可能な証拠から明らかなローンチブロッカーなし

次のいずれかが真の場合、スコアを 69 に制限します:

  • 機密データに対する認証または認可が欠落している。
  • 支払いまたはフルフィルメントのWebhookが冪等でない。
  • 必要なマイグレーションを安全に実行できない。
  • シークレットがクライアントバンドル、ログ、またはコミットされたファイルに露出している。
  • 影響の大きいリリースに対するロールバックパスがない。

CIがグリーンでない場合、またはローンチクリティカルパスがエンドツーエンドでテストされていない場合、スコアを 84 に制限します。

出力形式

最初の一文でリードします:

プロダクション監査:76/100、注意付きでローンチ可能。Webhookの冪等性とロールバックドキュメントが、公開ローンチ前に修正すべき2つのリスクです。

次にリストします:

  • ブロッカー:デプロイ前に修正必須の項目。
  • 高価値修正:スコアを向上させたい場合の次の修正。
  • 確認済み証拠:検査したファイル、コマンド、CI、デプロイされたURL、またはPR。
  • 不足している証拠:提供された場合に信頼度を変えるもの。
  • 次のアクション:具体的な修正または検証手順。

強みは簡潔に保ちます。ユーザーは準備状況を尋ねているので、有用な回答は残りのリスクと次のアクションです。

例

ユーザー:

これは出荷準備できていますか?

応答:

プロダクション監査:68/100、リスクあり。StripeのWebhookは検証されているが冪等ではなく、保留中のマイグレーションに対するロールバックメモがないため。

ブロッカー:
- 注文をフルフィルする前に `checkout.session.completed` に冪等性を追加する。
- `20260511_add_billing_state.sql` のロールバックパスを作成してテストする。

高価値修正:
- データベースと支払いプロバイダーの到達可能性を検証するヘルスチェックを追加する。
- アップグレード、Webhookフルフィルメント、請求ページ更新のための1つのE2Eパスを追加する。

確認済み証拠:
- `api/stripe/webhook.ts`
- `db/migrations/20260511_add_billing_state.sql`
- リリースブランチのGitHub Actionsの実行

次のアクション:最初にWebhookの冪等性をパッチしましょうか?

アンチパターン

  • デフォルトの監査パスとして npx <package>@latest またはリモートスキャナーを実行すること。
  • 明示的な承認なしに、ソース、シークレット、顧客データ、またはプライベートトポロジーを外部監査サービスにアップロードすること。
  • 確認した証拠を挙げずにスコアを生成すること。
  • グリーンCIをプロダクション readiness として扱うこと。
  • 「何をしたいか教えてください」という一般的な返答で終わること。

関連項目

  • スキル:security-review
  • スキル:deployment-patterns
  • スキル:e2e-testing
  • スキル:tdd-workflow
  • スキル:verification-loop

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

関連スキル