cli-policy-audit — Claude Code skill: audit logs and policies
Reads audit logs, access policies and telemetry from the Anthropic CLI. Useful when you need to filter events by type, user or time range.
npx skills add cheaper-inference/OmniRoute --skill cli-policy-audit -a claude-codeWhat cli-policy-audit does
The skill teaches your agent to drive the omniroute CLI. Through it you can read audit logs, search entries by query, export them to a file and pull stats for a period. A separate branch of commands covers access policies: list, create from a file, update, delete, import and export, plus policy evaluate to check a rule against an API key, action and resource.
Telemetry has its own set: a summary for a period with an optional comparison period, and an export to a chosen path. Request history comes from logs, which takes filters for level, status code, duration range, request id and more.
The tool has to be on your machine first — npm install -g omniroute, or run it as npx omniroute. omniroute --version confirms it. Several commands accept --base-url and --api-key, so they fail without a reachable instance.
What it helps with
- read the audit log and filter events by source
- find one user's entries within a time window
- export audit records to a file in a given format
- create or update an access policy from a file
- check whether an action on a resource is allowed
Example prompts for the agent
- Show the latest audit entries with
omniroute audit tail - Search the audit log for yesterday's events and export them to a file
- List the access policies and evaluate one of them
How to install cli-policy-audit
1Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-policy-audit -a claude-code2Manually: put the files in place
~/.claude/skills/cli-policy-audit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cli-policy-audit/
1Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-policy-audit -a codex2Manually: put the files in place
.agents/skills/cli-policy-audit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-policy-audit -a cursor2Manually: put the files in place
.cursor/skills/cli-policy-audit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cheaper-inference/OmniRoute cli-policy-audit2Manually: put the files in place
.github/skills/cli-policy-audit/SKILL.md1Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-policy-audit -a gemini-cli2Platform CLI
gemini skills install https://github.com/cheaper-inference/OmniRoute --path skills/cli-policy-auditManually: put the files in place
.devin/skills/cli-policy-audit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cheaper-inference/OmniRoute --skill cli-policy-audit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cli-policy-audit
How do I install cli-policy-audit in Claude Code?
Run npx skills add cheaper-inference/OmniRoute --skill cli-policy-audit -a claude-code. The skill file lands at ~/.claude/skills/cli-policy-audit/SKILL.md.
What does cli-policy-audit do?
It gives the agent a set of omniroute commands for inspecting audit logs, managing access policies, reading telemetry and reviewing request history. Filters cover event type, user and time range.
What do I need before using the skill?
The omniroute CLI installed — globally with npm install -g omniroute or run via npx omniroute. Some commands also need --base-url and --api-key.
Source text
SKILL.md · MIT
--- name: cli-policy-audit description: Inspect audit logs, manage access policies, view telemetry data, and review request history from the CLI. Filter by event type, user, or time range for compliance workflows. --- <!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten --> ## Overview Inspect audit logs, manage access policies, view telemetry data, and review request history from the CLI. Filter by event type, user, or time range for compliance workflows. ## Quick install ```bash npm install -g omniroute # or: npx omniroute omniroute --version ``` ## Subcommands ### `audit` **Example:** ```bash omniroute audit ``` ### `audit tail` **Flags:** - `--source <s>` - `--follow` - `--limit <n>` **Example:** ```bash omniroute audit tail ``` ### `audit search <query>` **Flags:** - `--source <s>` - `--since <ts>` - `--until <ts>` - `--limit <n>` - `--actor <id>` - `--action <a>` **Example:** ```bash omniroute audit search <query> ``` ### `audit export <file>` **Flags:** - `--source <s>` - `--format <f>` - `--since <ts>` - `--until <ts>` **Example:** ```bash omniroute audit export <file> ``` ### `audit stats` **Flags:** - `--source <s>` - `--period <p>` **Example:** ```bash omniroute audit stats ``` ### `audit get <id>` **Flags:** - `--source <s>` **Example:** ```bash omniroute audit get <id> ``` ### `logs` **Flags:** - `--follow` - `--filter <level>` - `--lines <n>` - `--timeout <ms>` - `--base-url <url>` - `--request-id <id>` - `--api-key <key>` - `--combo <name>` - `--status <code>` - `--duration-min <ms>` - `--duration-max <ms>` - `--export <path>` **Example:** ```bash omniroute logs ``` ### `policy` **Example:** ```bash omniroute policy ``` ### `policy list` **Flags:** - `--kind <k>` - `--scope <s>` **Example:** ```bash omniroute policy list ``` ### `policy get <id>` **Example:** ```bash omniroute policy get <id> ``` ### `policy create` **Flags:** - `--file <path>` **Example:** ```bash omniroute policy create ``` ### `policy update <id>` **Flags:** - `--file <path>` **Example:** ```bash omniroute policy update <id> ``` ### `policy delete <id>` **Flags:** - `--yes` **Example:** ```bash omniroute policy delete <id> ``` ### `policy evaluate` **Flags:** - `--api-key <k>` - `--action <a>` - `--resource <r>` - `--context <json>` **Example:** ```bash omniroute policy evaluate ``` ### `policy export <file>` **Example:** ```bash omniroute policy export <file> ``` ### `policy import <file>` **Flags:** - `--overwrite` **Example:** ```bash omniroute policy import <file> ``` ### `telemetry` **Example:** ```bash omniroute telemetry ``` ### `telemetry summary` **Flags:** - `--period <p>` - `--compare-to <p>` **Example:** ```bash omniroute telemetry summary ``` ### `telemetry export` **Flags:** - `--out <path>` - `--period <p>` **Example:** ```bash omniroute telemetry export ```
© cheaper-inference · MIT · cheaper-inference/OmniRoute