axiom-audit
Audit Axiom logs to identify and prioritize errors and warnings, research probable causes, and flag log smells. Use when user asks to check Axiom logs, analyze production errors, investigate log issues, or audit logging patterns.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o axiom-audit.zip https://jpskill.com/download/18220.zip && unzip -o axiom-audit.zip && rm axiom-audit.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18220.zip -OutFile "$d\axiom-audit.zip"; Expand-Archive "$d\axiom-audit.zip" -DestinationPath $d -Force; ri "$d\axiom-audit.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
axiom-audit.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
axiom-auditフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Axiomログ監査 Skill
Axiomログを体系的に監査し、エラーと警告を特定、優先順位付け、調査します。
セットアップ
axiom-mcp のインストール:
go install github.com/axiomhq/axiom-mcp@latest
mcptools のインストール:
# macOS
brew tap f/mcptools
brew install mcp
# Windows/Linux
go install github.com/f/mcptools/cmd/mcptools@latest
認証情報の設定:
export AXIOM_TOKEN="xaat-your-token"
export AXIOM_ORG_ID="your-org-id" # オプション
リポジトリで認証情報を検索:
grep -r "AXIOM" . --include="*.env*" --include="*.config.*"
使い方
データセットのリスト表示:
mcp call listDatasets --params '{"arguments":{}}' ~/go/bin/axiom-mcp
APL のクエリ:
# エラーのクエリ
mcp call queryApl --params '{"arguments":{"dataset":"logs","apl":"['\''now-24h'\'':now] | where level == \"error\" | summarize count() by message"}}' ~/go/bin/axiom-mcp
# 警告のクエリ
mcp call queryApl --params '{"arguments":{"dataset":"logs","apl":"['\''now-24h'\'':now] | where level == \"warn\" | summarize count() by message"}}' ~/go/bin/axiom-mcp
インタラクティブシェル (複数のクエリに推奨):
mcp shell ~/go/bin/axiom-mcp
監査プロセス
1. データセットの特定
mcp call listDatasets --params '{"arguments":{}}' ~/go/bin/axiom-mcp
または、コードベースでデータセット名を検索:
grep -r "axiom.*dataset" . --include="*.ts" --include="*.js"
2. エラーと警告のクエリ
エラー:
['now-24h':now]
| where level in ("error", "ERROR", "fatal", "FATAL")
| summarize count() by error_message=coalesce(_error, message, msg), error_type
| order by count_desc
警告:
['now-24h':now]
| where level in ("warn", "WARNING", "WARN")
| summarize count() by message
| order by count_desc
エラートレンド:
['now-7d':now]
| where level in ("error", "ERROR", "fatal", "FATAL")
| summarize count() by bin_auto(_time), error_type
3. エラーの優先順位付け
優先度スコアリング:
- P0: CRITICAL + 高頻度 (>100/時間)
- P1: CRITICAL + 低頻度 OR HIGH + 高頻度
- P2: HIGH + 低頻度 OR MEDIUM + 高頻度
- P3: MEDIUM + 低頻度
- P4: LOW
重大度レベル:
- CRITICAL: データ損失、セキュリティ問題、サービス停止
- HIGH: 機能の破損、ユーザーに影響するエラー
- MEDIUM: 機能低下、断続的な問題
- LOW: 軽微な警告、重要でない問題
4. 各エラーの調査
一意のエラーごとに:
- Grep を使用してコードベースでソースを見つける
- 周囲のコードを読んでコンテキストを理解する
- 考えられる原因を特定する (コードのバグ、インフラストラクチャ、データ、統合、構成)
- コードパターンと関連エラーから証拠を収集する
- ログの臭いをフラグ付けする (下記参照)
5. ログの臭いのフラグ付け
- 過剰なロギング: 同じメッセージがログを氾濫させる
- コンテキストの欠落: リクエスト ID、ユーザー ID、トレース情報がない
- 不適切なエラーメッセージ: 曖昧または役に立たない
- ログに記録されたが処理されない: エラーがログに記録された後、無視される
- 一貫性のないロギング: 同様の課題に対して異なるレベル
- 機密データの露出: PII、シークレット、トークンがログに含まれる
- スタックトレースがない: スタックトレースのないエラー
- 汎用的なキャッチオールハンドラー: 実際の問題を隠蔽する
6. レポートの生成
.audits/axiom-audit-[timestamp].md を以下で作成:
# Axiom ログ監査レポート
**日付**: [timestamp]
**時間範囲**: [start] から [end]
**合計エラー数**: X | **合計警告数**: Y
## エグゼクティブサマリー
- **P0 の問題**: X (即時対応が必要)
- **P1 の問題**: Y (緊急)
- **P2 の問題**: Z
- **P3+ の問題**: W
## 優先順位付けされたエラーリスト
### P0: [エラータイプ]
**発生回数**: X 回 | **トレンド**: [↑/→/↓]
**初回確認**: [timestamp] | **最終確認**: [timestamp]
**エラーメッセージ**:
[実際のエラーメッセージ]
**ソース**: `path/to/file.ts:line`
**考えられる原因**: [分析]
**証拠**:
- [コードパターン、関連エラー]
---
### P1: [次のエラー]
[同じ構造]
---
## 検出されたログの臭い
### 過剰なロギング
- `[error pattern]` - Y 分で X,000 回
- **場所**: `file.ts:line`
### 機密データの露出
- ユーザーのメールアドレスが `auth.ts:42` に記録されている
- **影響**: プライバシー/コンプライアンスのリスク
---
## エラーカテゴリ
**インフラストラクチャ**: X% | **コードのバグ**: Y% | **データの問題**: Z% | **外部**: W%
---
## トレンド分析
**新しいエラー**: [最近発生したエラー]
**増加傾向**: [頻度が増加しているエラー]
**解決済み**: [停止したエラー]
7. サマリーの提供
ユーザーに強調表示するための簡単なサマリー:
- P0/P1 の数と上位の問題
- 重要なログの臭い
- カテゴリの内訳
- 完全なレポートへのリンク
重要なルール
- 絶対にファイルを編集しない - 監査のみ、修正はしない
- 絶対に仮定しない - コードベースで各エラーを調査する
- 優先順位を必ず付ける - 一貫した優先度スコアリングを使用する
- 必ずパターンを特定する - 類似のエラーをグループ化する
- 必ずログの臭いをフラグ付けする - ロギングのアンチパターンを文書化する
- 必ず証拠を提供する - コード/データで分析をサポートする
成功基準
✅ すべてのエラー/警告が Axiom から抽出された ✅ 重大度 + 頻度スコアリングで優先順位付けされた ✅ 各エラータイプの根本原因調査 ✅ ログの臭いが特定された ✅ 分類とトレンド分析が完了した ✅ 構造化されたレポートが生成された
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Axiom Logs Audit Skill
Systematically audit Axiom logs to identify, prioritize, and research errors and warnings.
Setup
Install axiom-mcp:
go install github.com/axiomhq/axiom-mcp@latest
Install mcptools:
# macOS
brew tap f/mcptools
brew install mcp
# Windows/Linux
go install github.com/f/mcptools/cmd/mcptools@latest
Set credentials:
export AXIOM_TOKEN="xaat-your-token"
export AXIOM_ORG_ID="your-org-id" # Optional
Find credentials in repo:
grep -r "AXIOM" . --include="*.env*" --include="*.config.*"
Usage
List datasets:
mcp call listDatasets --params '{"arguments":{}}' ~/go/bin/axiom-mcp
Query APL:
# Query errors
mcp call queryApl --params '{"arguments":{"dataset":"logs","apl":"['\''now-24h'\'':now] | where level == \"error\" | summarize count() by message"}}' ~/go/bin/axiom-mcp
# Query warnings
mcp call queryApl --params '{"arguments":{"dataset":"logs","apl":"['\''now-24h'\'':now] | where level == \"warn\" | summarize count() by message"}}' ~/go/bin/axiom-mcp
Interactive shell (recommended for multiple queries):
mcp shell ~/go/bin/axiom-mcp
Audit Process
1. Identify Dataset
mcp call listDatasets --params '{"arguments":{}}' ~/go/bin/axiom-mcp
Or search codebase for dataset names:
grep -r "axiom.*dataset" . --include="*.ts" --include="*.js"
2. Query Errors & Warnings
Errors:
['now-24h':now]
| where level in ("error", "ERROR", "fatal", "FATAL")
| summarize count() by error_message=coalesce(_error, message, msg), error_type
| order by count_desc
Warnings:
['now-24h':now]
| where level in ("warn", "WARNING", "WARN")
| summarize count() by message
| order by count_desc
Error trends:
['now-7d':now]
| where level in ("error", "ERROR", "fatal", "FATAL")
| summarize count() by bin_auto(_time), error_type
3. Prioritize Errors
Priority scoring:
- P0: CRITICAL + High Frequency (>100/hour)
- P1: CRITICAL + Low Frequency OR HIGH + High Frequency
- P2: HIGH + Low Frequency OR MEDIUM + High Frequency
- P3: MEDIUM + Low Frequency
- P4: LOW
Severity levels:
- CRITICAL: Data loss, security issues, service down
- HIGH: Feature broken, user-facing errors
- MEDIUM: Degraded functionality, intermittent issues
- LOW: Minor warnings, non-critical issues
4. Research Each Error
For each unique error:
- Find source in codebase using Grep
- Read surrounding code to understand context
- Identify probable cause (code bug, infrastructure, data, integration, config)
- Collect evidence from code patterns and related errors
- Flag log smells (see below)
5. Flag Log Smells
- Excessive logging: Same message flooding logs
- Missing context: No request ID, user ID, trace info
- Poor error messages: Vague or unhelpful
- Logged but not handled: Errors logged then ignored
- Inconsistent logging: Different levels for similar issues
- Sensitive data exposure: PII, secrets, tokens in logs
- No stack traces: Errors without stack traces
- Generic catch-all handlers: Hiding real issues
6. Generate Report
Create .audits/axiom-audit-[timestamp].md with:
# Axiom Logs Audit Report
**Date**: [timestamp]
**Time Range**: [start] to [end]
**Total Errors**: X | **Total Warnings**: Y
## Executive Summary
- **P0 Issues**: X (immediate action required)
- **P1 Issues**: Y (urgent)
- **P2 Issues**: Z
- **P3+ Issues**: W
## Prioritized Error List
### P0: [Error Type]
**Occurrences**: X times | **Trend**: [↑/→/↓]
**First Seen**: [timestamp] | **Last Seen**: [timestamp]
**Error Message**:
[Actual error message]
**Source**: `path/to/file.ts:line`
**Probable Cause**: [Analysis]
**Evidence**:
- [Code patterns, related errors]
---
### P1: [Next Error]
[Same structure]
---
## Log Smells Detected
### Excessive Logging
- `[error pattern]` - X,000 times in Y minutes
- **Location**: `file.ts:line`
### Sensitive Data Exposure
- User emails logged in `auth.ts:42`
- **Impact**: Privacy/compliance risk
---
## Error Categories
**Infrastructure**: X% | **Code Bugs**: Y% | **Data Issues**: Z% | **External**: W%
---
## Trend Analysis
**New Errors**: [Errors that appeared recently]
**Increasing**: [Errors with rising frequency]
**Resolved**: [Errors that stopped]
7. Provide Summary
Brief summary for user highlighting:
- P0/P1 count and top issues
- Critical log smells
- Category breakdown
- Link to full report
Critical Rules
- NEVER EDIT FILES - Audit only, no fixes
- NEVER ASSUME - Research each error in codebase
- DO PRIORITIZE - Use consistent priority scoring
- DO IDENTIFY PATTERNS - Group similar errors
- DO FLAG LOG SMELLS - Document logging anti-patterns
- DO PROVIDE EVIDENCE - Support analysis with code/data
Success Criteria
✅ All errors/warnings extracted from Axiom ✅ Prioritized with severity + frequency scoring ✅ Root cause research for each error type ✅ Log smells identified ✅ Categorization and trend analysis complete ✅ Structured report generated