axiom

GitHub

用于通过APL语言查询Axiom日志和数据集,支持日志搜索、聚合及字段分析。适用于排查生产错误、调试Webhook故障及分析系统行为。

.claude/skills/axiom/SKILL.md civitai/civitai

Trigger Scenarios

调查生产环境错误 调试Webhook失败 检查日志模式 分析系统行为

Install

npx skills add civitai/civitai --skill axiom -g -y
More Options

Non-standard path

npx skills add https://github.com/civitai/civitai/tree/main/.claude/skills/axiom -g -y

Use without installing

npx skills use civitai/civitai@axiom

指定 Agent (Claude Code)

npx skills add civitai/civitai --skill axiom -a claude-code -g -y

安装 repo 全部 skill

npx skills add civitai/civitai --all -g -y

预览 repo 内 skill

npx skills add civitai/civitai --list

SKILL.md

Frontmatter
{
    "name": "axiom",
    "description": "Query Axiom logs and datasets using APL (Axiom Processing Language). Use when investigating production errors, debugging webhook failures, checking log patterns, or analyzing system behavior.",
    "allowed-tools": "Bash, Read"
}

Axiom

Query Axiom datasets using APL (Axiom Processing Language). Supports log search, aggregation, field analysis, and time-based filtering.

Setup

Create .env in this skill directory:

AXIOM_TOKEN=xaat-your-token-here
AXIOM_ORG_ID=your-org-id
AXIOM_DATASTREAM=civitai-prod
AXIOM_DOMAIN=api.axiom.co

Token needs read/query permissions (the project .env token is ingest-only).

Quick Reference

SKILL_DIR=".claude/skills/axiom"

# List available datasets
node "$SKILL_DIR/axiom.mjs" datasets

# Run an APL query
node "$SKILL_DIR/axiom.mjs" query "['civitai-prod'] | where name == 'nowpayments-webhook' | take 10" --format legacy --json

# Search logs with filters
node "$SKILL_DIR/axiom.mjs" query "['civitai-prod'] | where name == 'some-service' and type == 'error' | project _time, message, error | sort by _time desc | take 50" --start "2026-03-01T00:00:00Z" --end "2026-04-01T00:00:00Z" --format legacy --json

# Count errors by message
node "$SKILL_DIR/axiom.mjs" query "['civitai-prod'] | where name == 'my-service' | summarize count() by message | order by count_ desc" --start "2026-03-01T00:00:00Z" --format legacy --json

# Top values for a field
node "$SKILL_DIR/axiom.mjs" query "['civitai-prod'] | where type == 'error' | summarize count() by name | order by count_ desc | take 20" --format legacy --json

Commands

Command Description
datasets List all available datasets
dataset-info <name> Get info about a specific dataset
query "<APL>" Run any APL query
search <dataset> --where "..." Search with filters
count <dataset> --where "..." --by <field> Count/aggregate
tail <dataset> Most recent events
top <dataset> <field> Top values for a field

Important Notes

  • Use --format legacy --json for reliable output. The tabular format can return empty rows for some queries.
  • Time ranges: Use --start and --end flags with ISO 8601 timestamps, or use ago() in APL (e.g., _time > ago(24h)).
  • Field paths: Log data is under the data. prefix in legacy format. Use field names directly in APL (e.g., name, message, type).
  • Summarize queries: Return results in buckets.series[].groups[] in legacy format, not in matches[].

Known Datasets

Dataset Description
civitai-prod Main production logs (services, webhooks, jobs)
civitai-stage-new Staging environment
civitai-next Next.js application logs
webhooks Webhook event tracking
clickhouse ClickHouse integration errors
notifications Notification service logs
orchestration-otlp Orchestration telemetry
python-worker Python worker process logs

Common Log Names (civitai-prod)

Services log with a name field. Common ones:

  • nowpayments-webhook — NowPayments IPN webhook handler
  • nowpayments-service — NowPayments deposit processing
  • reconcile-nowpayments-job — Reconciliation cron job

APL Cheatsheet

# Filter
| where name == "value"
| where field contains "substring"
| where field matches regex "pattern"

# Time range
| where _time > ago(7d)
| where _time between (datetime(2026-03-01) .. datetime(2026-03-31))

# Aggregate
| summarize count() by field
| summarize avg(duration), max(duration) by name
| summarize count() by bin(_time, 1h)

# Sort and limit
| sort by _time desc
| take 50
| order by count_ desc

# Select fields
| project _time, name, message, error

# Extend (computed columns)
| extend duration_ms = duration / 1000

When to Use

  • Investigating production errors or webhook failures
  • Checking if a specific service is logging errors
  • Analyzing error patterns over time
  • Debugging payment/deposit processing issues
  • Monitoring reconciliation job health
  • Verifying deployment behavior changes

Version History

  • 4214ecb Current 2026-08-20 18:48

Same Skill Collection

.claude/skills/add-ecosystem/SKILL.md
.claude/skills/add-generation-support/SKILL.md
.claude/skills/add-prompt-enhancement-guide/SKILL.md
.claude/skills/add-training-support/SKILL.md
.claude/skills/browser-automation/SKILL.md
.claude/skills/civitai-orchestration/SKILL.md
.claude/skills/civitai-review/SKILL.md
.claude/skills/cleanup/SKILL.md
.claude/skills/clickhouse-query/SKILL.md
.claude/skills/clickup/SKILL.md
.claude/skills/cloudflare/SKILL.md
.claude/skills/component-preview/SKILL.md
.claude/skills/deploy-status/SKILL.md
.claude/skills/dev-server/SKILL.md
.claude/skills/discord/SKILL.md
.claude/skills/feature-walkthrough/SKILL.md
.claude/skills/feedback-triage/SKILL.md
.claude/skills/flipt/SKILL.md
.claude/skills/freshdesk/SKILL.md
.claude/skills/meilisearch-admin/SKILL.md
.claude/skills/metabase/SKILL.md
.claude/skills/mod-actions/SKILL.md
.claude/skills/moderator-page-migration/SKILL.md
.claude/skills/postgres-query/SKILL.md
.claude/skills/quick-mockups/SKILL.md
.claude/skills/redis-inspect/SKILL.md
.claude/skills/retool-migration/SKILL.md
.claude/skills/retool-query/SKILL.md
.claude/skills/scaffold-civitai-app/SKILL.md
.claude/skills/stripe/SKILL.md
.claude/skills/svelte-review/SKILL.md
.claude/skills/ux-design/SKILL.md
.claude/skills/write-model-description/SKILL.md
.claude/skills/xguard-manager/SKILL.md
apps/event-engine/.claude/skills/agent-review/SKILL.md
apps/event-engine/.claude/skills/clickhouse-query/SKILL.md
apps/event-engine/.claude/skills/clickup/SKILL.md
apps/event-engine/.claude/skills/postgres-query/SKILL.md
apps/event-engine/.claude/skills/redis-inspect/SKILL.md
.claude/skills/ecosystem-seo-page/SKILL.md

Metadata

Files
0
Version
dc828b5
Hash
f1370674
Indexed
2026-08-20 18:48

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 05:52
浙ICP备14020137号-1 $Carte des visiteurs$