Documentation

Skills Trace Docs

Everything you need to detect AI agent skills at the gateway layer, emit structured telemetry, and monitor capability usage in production.

Core Concepts

Skills & Fingerprints

Every AI agent skill has a unique identity expressed as a URI: skill://namespace/name@version. For example, skill://acme.github/pr-review@1.2.0. Fingerprints are cryptographic signatures derived from a skill's content, enabling detection without access to the original source.

Detection Pipeline

Skills Trace uses a 6-strategy detection pipeline ordered by confidence. The pipeline short-circuits on the first match for maximum performance.

StrategyConfidenceDescription
Watermark1.0Embedded invisible markers in skill output
Frontmatter Hash0.9SHA-256 of YAML frontmatter block
Content Hash0.7SHA-256 of full skill content body
Prefix Hash0.5SHA-256 of first N characters
Tool Schema0.6JSON Schema signature of tool definitions
Function Signature0.4Function name and parameter pattern matching

Registries

Fingerprint registries are JSON files generated by skills-check fingerprint. They contain the hashes and metadata the detection pipeline uses to identify skills. Registries should be signed in production environments to ensure integrity.

Emitters

Emitters control where detected skill telemetry is sent. Telemetry is emitted asynchronously and fire-and-forget to avoid impacting request latency. Supported emitters:

  • JSONL — Append-only log file (simplest, great for development)
  • SQLite — Local database with WAL mode for the built-in dashboard
  • HTTP — Batch POST to a remote endpoint
  • PostgreSQL — Production-grade relational storage
  • OTLP — OpenTelemetry-compatible export

Configuration

Environment Variables

VariableDescriptionExample
SKILLS_TRACE_REGISTRYPath to the fingerprint registry JSON file../fingerprints.json
SKILLS_TRACE_EMITTEREmitter configuration string. Supports jsonl, sqlite, http, postgres, and otlp.jsonl:./telemetry.jsonl
SKILLS_TRACE_DETECTIONDetection mode: watermark, frontmatter, or full pipeline.full
SKILLS_TRACE_SAMPLING_RATEFraction of requests to sample (0.0 to 1.0).1.0
SKILLS_TRACE_SAMPLING_MODESampling strategy: random or deterministic.random
SKILLS_TRACE_API_KEYBearer token for authenticating telemetry API requests.sk_trace_...
SKILLS_TRACE_ORG_*Organization metadata fields attached to every emitted event.SKILLS_TRACE_ORG_TEAM=platform
DATABASE_URLPostgreSQL connection string for production telemetry storage.postgresql://user:pass@host/db

Programmatic Configuration

You can also configure Skills Trace programmatically in TypeScript:

import { SkillDetector } from '@skills-trace/core';

const detector = new SkillDetector({
  registry: './fingerprints.json',
  detection: 'full',
  emitters: [
    { type: 'jsonl', path: './telemetry.jsonl' },
    { type: 'http', url: 'https://collect.example.com/v1/events', batchSize: 100 },
  ],
  sampling: {
    rate: 0.5,
    mode: 'deterministic',
  },
});

Deployment

Production Checklist

  • Switch from SQLite to PostgreSQL for telemetry storage
  • Enable API key authentication on the telemetry ingestion endpoint
  • Configure Clerk SSO for dashboard access control
  • Sign fingerprint registries to prevent tampering
  • Use TLS + auth for all HTTP emitter transports
  • Set appropriate sampling rates for high-throughput environments

Docker Example

A minimal Docker Compose setup for running Skills Trace with PostgreSQL:

version: "3.9"
services:
  skills-trace:
    image: skillstrace/dashboard:latest
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgresql://trace:trace@db:5432/skills_trace
      SKILLS_TRACE_REGISTRY: /data/fingerprints.json
      SKILLS_TRACE_API_KEY: sk_trace_your_key_here
    volumes:
      - ./fingerprints.json:/data/fingerprints.json:ro

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: trace
      POSTGRES_PASSWORD: trace
      POSTGRES_DB: skills_trace
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata: