Command Palette

Search for a command to run...

Назад к скиллам
скилл № 19738

axiom

Axiom is a cloud log management and analytics platform for ingesting logs, traces and events and querying them with APL (Axiom Processing Language). Use when…

БесплатноБез исполняемых скриптов
TerminalSkillsот TerminalSkills★ 221 звезда на GitHub17 установок в других каталогах

Установить axiom в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Axiom — Serverless Log Analytics

Overview

Axiom is a cloud log management and analytics platform. You send events to named datasets over HTTP (SDKs, the CLI, Pino, Next.js integrations or OpenTelemetry), query them with APL, a Kusto-style query language, and build dashboards and monitors on top.

Instructions

Ingestion

Create an API token in the Axiom Console with ingest permission for the dataset, and export it as AXIOM_TOKEN. @axiomhq/js 2.x needs Node.js 20 or newer and exports a named Axiom class. To target a region, pass edge (for example eu-central-1.aws.edge.axiom.co, no scheme) instead of putting a regional host in url; edge routing needs an API token (xaat-), not a personal one.

import { Axiom } from "@axiomhq/js";

const axiom = new Axiom({ token: process.env.AXIOM_TOKEN! });

// ingest() queues events and sends them in batches in the background
axiom.ingest("api-logs", [
  {
    level: "info",
    message: "Order processed",
    orderId: "ord_abc123",
    userId: "usr_456",
    amount: 99.99,
    duration_ms: 245,
    region: "us-east-1",
    _time: new Date().toISOString(), // optional: Axiom sets it when missing
  },
  {
    level: "error",
    message: "Payment failed",
    orderId: "ord_def789",
    error: "Card declined",
    duration_ms: 1200,
  },
]);

// Flush before the process exits
await axiom.flush();

// The same client can run APL queries
const res = await axiom.query(`['api-logs'] | where level == 'error' | limit 10`);
// Pino transport (npm install pino @axiomhq/pino)
import pino from "pino";

const logger = pino(
  { level: "info" },
  pino.transport({
    target: "@axiomhq/pino",
    options: {
      dataset: process.env.AXIOM_DATASET,
      token: process.env.AXIOM_TOKEN,
    },
  }),
);

logger.info({ orderId: "ord_123", userId: "usr_456", amount: 99.99 }, "Order created");
logger.error({ orderId: "ord_123", error: "timeout" }, "Payment processing timeout");

APL Queries (Axiom Processing Language)

// APL is based on Kusto Query Language (KQL) — same as Azure Data Explorer

// Error rate over time (5-minute buckets)
['api-logs']
| where level == "error"
| summarize errors = count() by bin(_time, 5m)
| order by _time asc

// P95 latency per endpoint
['api-logs']
| where isnotnull(duration_ms)
| summarize p95 = percentile(duration_ms, 95), avg_ms = avg(duration_ms), count = count()
    by endpoint
| order by p95 desc

// Top errors in the last hour
['api-logs']
| where _time > ago(1h) and level == "error"
| summarize count = count() by message, error
| order by count desc
| take 10

// Revenue by region (last 24h)
['api-logs']
| where _time > ago(24h) and message == "Order processed"
| summarize total_revenue = sum(amount), orders = count() by region
| order by total_revenue desc

// Slow requests (> 1s) with user context
['api-logs']
| where duration_ms > 1000
| project _time, endpoint, duration_ms, userId, orderId
| order by duration_ms desc
| take 20

// Unique active users per hour
['api-logs']
| where isnotnull(userId)
| summarize active_users = dcount(userId) by bin(_time, 1h)

Next.js

next-axiom is deprecated (bug fixes only). New projects use @axiomhq/nextjs, which also captures Web Vitals, HTTP logs and traces without Vercel Drains.

npm install --save @axiomhq/js @axiomhq/logging @axiomhq/nextjs @axiomhq/react
// lib/axiom/axiom.ts
import { Axiom } from "@axiomhq/js";
export default new Axiom({ token: process.env.NEXT_PUBLIC_AXIOM_TOKEN! });
// lib/axiom/server.ts
import axiomClient from "@/lib/axiom/axiom";
import { Logger, AxiomJSTransport } from "@axiomhq/logging";
import { createAxiomRouteHandler, nextJsFormatters } from "@axiomhq/nextjs";

export const logger = new Logger({
  transports: [
    new AxiomJSTransport({ axiom: axiomClient, dataset: process.env.NEXT_PUBLIC_AXIOM_DATASET! }),
  ],
  formatters: nextJsFormatters,
});

export const withAxiom = createAxiomRouteHandler(logger);
// app/api/webhooks/route.ts
import { withAxiom, logger } from "@/lib/axiom/server";

export const POST = withAxiom(async (req: Request) => {
  const body = await req.json();
  logger.info("Webhook received", { eventType: body.type });
  return Response.json({ ok: true });
});

For uncaught errors on Next.js 15+, add export const onRequestError = createOnRequestError(logger); (from @axiomhq/nextjs) in instrumentation.ts. For request logs, add proxy.ts (Next.js 16) or middleware.ts (15 and older) that calls logger.info(...transformMiddlewareRequest(request)) and event.waitUntil(logger.flush()). A token used in client components is public: give it ingest-only permission on one dataset, or use the proxy transport.

CLI

Install with brew install --cask axiomhq/tap/axiom or go install github.com/axiomhq/cli/cmd/axiom@latest. Log in with a personal access token (xapt-); the browser login flow currentl

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _scores.json

FAQ

Что делает скилл axiom?

Axiom is a cloud log management and analytics platform for ingesting logs, traces and events and querying them with APL (Axiom Processing Language). Use when sending app logs to Axiom from Node.js, Pino or Next.js, writing APL queries, tailing datasets with the axiom CLI, or setting up monitors and alerts.

Как установить скилл axiom?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom с