Agent Analytics

Run analytics end-to-end from your agent without opening a dashboard. English-first workflow, with Chinese docs and content available. Create projects, ship...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
2 · 1.9k · 15 current installs · 15 all-time installs
byDanny Shmueli@dannyshmueli
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description (Agent Analytics CLI wrapper) aligns with the declared requirements: it needs npx to run the official @agent-analytics/cli and an AGENT_ANALYTICS_API_KEY to call the service API. Nothing requested is unrelated to analytics, tracking, or CLI usage.
Instruction Scope
SKILL.md instructs only how to run the official CLI via npx, which commands to prefer (projects, events, stats, experiments, etc.), how to set up tracking, and cautions about constructing JSON filters. It does not instruct reading unrelated files, harvesting other environment variables, or exfiltrating data to unexpected endpoints.
Install Mechanism
This is instruction-only (no install spec). It relies on npx to run an npm package (@agent-analytics/cli@0.5.1). That is coherent for a CLI wrapper but does mean a remote npm package will be executed transiently via npx — a normal pattern but one that carries the usual npm/package-origin risk (verify package provenance and pinned version). No archives or arbitrary downloads are used by the skill itself.
Credentials
Only a single environment variable (AGENT_ANALYTICS_API_KEY) is required and is declared as the primary credential. That is proportionate for an API-driven analytics CLI. The SKILL.md explicitly warns against pasting secrets into chat.
Persistence & Privilege
The skill is not always:true and does not request persistent system-level presence or modify other skills' configuration. It uses the agent's ability to run commands when invoked but does not demand elevated or permanent privileges.
Assessment
This skill appears coherent and limited to using the Agent Analytics CLI. Before installing: 1) Ensure AGENT_ANALYTICS_API_KEY is scoped as narrowly as possible and comes from the Agent Analytics service. 2) Confirm the npm package @agent-analytics/cli@0.5.1 is legitimate (check the package on npm and the linked GitHub repo). 3) Prefer setting the API key in the agent's environment rather than pasting it into chat. 4) Be aware that npx executes code from the npm registry transiently — if you require stricter supply-chain guarantees, consider installing a vetted, locally-audited CLI binary instead. If you need deeper assurance, ask the author for a reproducible install artifact or a signed release.

Like a lobster shell, security has layers — review code before you run it.

Current versionv4.0.3
Download zip
analyticsvk970wxjg3d376g67ck9bh2d1ms80xct2latestvk97bf6dkx74q9p6drm56fc4x4h82xprbtrackingvk970wxjg3d376g67ck9bh2d1ms80xct2webvk970wxjg3d376g67ck9bh2d1ms80xct2

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

Any binnpx
EnvAGENT_ANALYTICS_API_KEY
Primary envAGENT_ANALYTICS_API_KEY

SKILL.md

Agent Analytics

After install, your agent can create projects, ship tracking, query analytics, run experiments, and iterate without opening a dashboard.

English-first workflow, with Chinese docs and content available for OpenClaw users and teams in China.

Use it when you want an agent to operate growth analytics end-to-end, automate recurring checks, and manage multiple projects from one conversation loop.

Hosted free tier includes 100k events/month across 2 projects.

Chinese support / 中文支持

  • Chinese docs and installation content are available on the docs site, including the OpenClaw guide under /zh/.
  • Works through API, CLI, and MCP, depending on the environment your agent already uses.
  • Good fit for closed-loop agent workflows: monitor, analyze, experiment, iterate.
  • Supports batch work across many projects instead of a manual dashboard-by-dashboard workflow.

What npx is doing

  • OpenClaw can launch the official CLI with npx @agent-analytics/cli@0.5.1.
  • That command runs the published Agent Analytics CLI package from npm.
  • The CLI calls the same HTTP API documented at https://docs.agentanalytics.sh/api/.
  • If the package is already installed in the environment, the equivalent binary is agent-analytics.
  • Keep AGENT_ANALYTICS_API_KEY in the environment. Do not ask the user to paste secrets into chat.

Command format

The examples below use the CLI binary form:

agent-analytics <command>

In OpenClaw, that usually means:

npx @agent-analytics/cli@0.5.1 <command>

If the package is already installed, run the same commands directly as agent-analytics <command>.

For the full command list and flags:

agent-analytics --help

Safe operating rules

  • Prefer fixed commands over ad-hoc query construction.
  • Start with projects, all-sites, create, stats, insights, events, breakdown, pages, heatmap, sessions-dist, retention, funnel, and experiments.
  • Use query only when the fixed commands cannot answer the question.
  • Do not build --filter JSON from raw user text.
  • Validate project names before create: ^[a-zA-Z0-9._-]{1,64}$

First-time setup

agent-analytics login --token aak_YOUR_API_KEY
agent-analytics create my-site --domain https://mysite.com
agent-analytics events my-site --days 7 --limit 20

The create command returns a project token and a ready-to-use tracking snippet. Add that snippet before </body>.

Common commands

agent-analytics projects
agent-analytics all-sites --period 7d
agent-analytics stats my-site --days 7
agent-analytics insights my-site --period 7d
agent-analytics events my-site --days 7 --limit 20
agent-analytics breakdown my-site --property path --event page_view --limit 10
agent-analytics funnel my-site --steps "page_view,signup,purchase"
agent-analytics retention my-site --period week --cohorts 8
agent-analytics experiments list my-site

If a task needs something outside these common flows, use agent-analytics --help first.

Tracker setup

The easiest install flow is:

  1. Run agent-analytics create my-site --domain https://mysite.com
  2. Copy the returned snippet into the page before </body>
  3. Deploy
  4. Verify with agent-analytics events my-site --days 7 --limit 20

If you already know the project token, the tracker looks like:

<script defer src="https://api.agentanalytics.sh/tracker.js"
  data-project="my-site"
  data-token="aat_..."></script>

Use window.aa?.track('signup', {method: 'github'}) for custom events after the tracker loads.

Query caution

agent-analytics query exists for advanced reporting, but it should be used carefully because --filter accepts JSON.

  • Use fixed commands first.
  • If query is necessary, check agent-analytics --help first.
  • Do not pass raw user text directly into --filter.
  • For exact request shapes, use https://docs.agentanalytics.sh/api/.

Experiments

The CLI supports the full experiment lifecycle:

agent-analytics experiments list my-site
agent-analytics experiments create my-site --name signup_cta --variants control,new_cta --goal signup

References

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…