ai-native-cli

ai-native-cli is a skill for Claude Code, Codex from ChaosRealmsAI/agent-cli-spec. It costs 61 tokens per session (5,290 once invoked), scanned A, original, MIT.

A design specification for command-line tools that are used by AI agents. A command-line tool is a program operated through a terminal; this specification requires machine-readable JSON output, validated inputs, clear errors, and safe failure behavior.

In plain words
What is it for?
Use it when building, changing, or checking a command-line interface, especially its input rules, JSON output, error handling, exit codes, and safety behavior.
Why use it?
It helps agents call command-line programs predictably and handle invalid input or failures without unsafe assumptions. It also defines levels for gradually adding features such as self-description and agent integration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Good fit Use it when building, changing, or checking a command-line interface, especially its input rules, JSON output, error handling, exit codes, and safety behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaosrealmsai/agent-cli-spec/ai-native-cli
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ChaosRealmsAI/agent-cli-spec --skill ai-native-cli
Clone the repo
git clone --depth 1 https://github.com/ChaosRealmsAI/agent-cli-spec

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-native-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaosrealmsai/agent-cli-spec/ai-native-cli/github.svg)](https://agentmods.dev/skills/chaosrealmsai/agent-cli-spec/ai-native-cli)
Your own site
<a href="https://agentmods.dev/skills/chaosrealmsai/agent-cli-spec/ai-native-cli"><img src="https://agentmods.dev/badge/skills/chaosrealmsai/agent-cli-spec/ai-native-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-native-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/chaosrealmsai/agent-cli-spec/ai-native-cli"><img src="https://agentmods.dev/badge/skills/chaosrealmsai/agent-cli-spec/ai-native-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,290 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.05290
Opus 5.5 $0.00024 $0.02116
Sonnet 5.5 $0.00012 $0.01058
Haiku 4.5 $0.00006 $0.00529

Measured 1mo ago against content hash 481b1ce495db, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-native-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ai-native-cli/SKILL.md · 516 lines

How it starts

The opening of the file, as written. The whole thing — 516 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent-Friendly CLI Spec v0.1

When building or modifying CLI tools, follow these rules to make them safe and reliable for AI agents to use.

Core Philosophy

  1. Agent-only -- output is always JSON, no human-friendly mode
  2. Agent is untrusted -- validate all input at the same level as a public API
  3. Fail-Closed -- when validation logic itself errors, deny by default
  4. Verifiable -- every rule is written so it can be automatically checked

Layer Model

This spec now uses two orthogonal axes:

  • Layer answers rollout scope: core, recommended, ecosystem
  • Priority answers severity: P0, P1, P2

Use layers for migration and certification:

  • core -- execution contract: JSON, errors, exit codes, stdout/stderr, safety
  • recommended -- better machine UX: self-description, explicit modes, richer schemas
  • ecosystem -- agent-native integration: agent/, skills, feedback, inline context

Certification maps to layers:

  • Agent-Friendly -- all core rules pass
  • Agent-Ready -- all core + recommended rules pass
  • Agent-Native -- all layers pass

Output Mode

Output is always JSON. No human-friendly mode. No flags needed.

$ mycli list              # JSON output, always
  • All output is JSON to stdout. Period.
  • No --human, no --agent, no mode switching.
  • If a human needs to read it, pipe through jq.

agent/ Directory Convention

Every CLI tool MUST have an agent/ directory at its project root. This is the tool's identity and behavior contract for AI agents.

agent/
├── brief.md          # One paragraph: who am I, what can I do
├── rules/            # Behavior constraints (auto-registered)
│   ├── trigger.md    # When should an agent use this tool
│   ├── workflow.md   # Step-by-step usage flow
│   └── writeback.md  # MANDATORY auto-feedback behavior
└── skills/           # Extended capabilities (auto-registered)
    └── getting-started.md

File Format

agent/brief.md — plain text, one paragraph. No frontmatter needed.

Read the full file on GitHub · 516 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 516 lines · 61 tokens per session scan A 481b1ce495db

Subscribe to this mod's changes

ai-native-cli is a skill published in the GitHub repository ChaosRealmsAI/agent-cli-spec (3 stars, last pushed 7mo ago), licensed MIT. It adds 61 tokens to every session and 5,290 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

better-auth

Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.

secondsky/claude-skills · 53 tokens

cloudflare-durable-objects

Cloudflare Durable Objects for stateful coordination and real-time apps. Use for chat, multiplayer games, WebSocket hibernation, or encountering class export, migration, alarm errors.

secondsky/claude-skills · 43 tokens

cloudflare-images

This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants", "generate signed URLs", "add image watermarks", "integrate with Next.js/Remix", "configure webhooks", "debug CORS errors"…

secondsky/claude-skills · 104 tokens

cloudflare-r2

Cloudflare R2 S3-compatible object storage. Use for buckets, uploads, CORS, presigned URLs, or encountering R2ERROR, CORS failures, multipart issues.

secondsky/claude-skills · 41 tokens

cloudflare-email-routing

Cloudflare Email Routing for receiving/sending emails via Workers. Use for email workers, forwarding, allowlists, or encountering Email Trigger errors, worker call failures, SPF issues.

secondsky/claude-skills · 40 tokens

cloudflare-workers-ai

Cloudflare Workers AI for serverless GPU inference. Use for LLMs, text/image generation, embeddings, or encountering AIERROR, rate limits, token exceeded errors.

secondsky/claude-skills · 39 tokens