ax-cpp-llm

A C++ quick reference for starting programs with axllm, a package for building AI calls and workflows.

In plain words
What is it for?
Use it to create signatures, generators, agents, flows, providers, or optimization programs in C++, including scripted tests and provider-backed calls.
Why use it?
It maps common tasks to the package’s native entry points and examples, so developers do not have to translate instructions from another programming language.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/ax-llm/ax/ax-cpp-llm
Any agent
npx skills add ax-llm/ax --skill ax-cpp-llm
Clone the repo
git clone --depth 1 https://github.com/ax-llm/ax

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.00866
Opus 5 $0.00019 $0.00433
Sonnet 5 $0.00008 $0.00173
Haiku 4.5 $0.00004 $0.00087

Measured today against content hash d7eadad75e0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ax-cpp-llm 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 today.

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.

packages/cpp/skills/ax-cpp-llm/SKILL.md · 51 lines

How it starts

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

Ax LLM Quick Reference For C++

This skill helps an agent write C++ code with the generated Ax package axllm. Use the generated package API, examples, and manifests; do not import TypeScript-only APIs unless you are editing the TypeScript package.

When To Use

  • Start a generated-language Ax program from package docs or examples.
  • Translate the Ax mental model into the target package without TypeScript-only imports.
  • Choose the native package entrypoints for signatures, providers, generators, agents, flows, and optimizers.
  • Find ordered or adaptive provider-balancing guidance in the language-specific AI skill.

Package Facts

  • Language: C++.
  • Package: axllm.
  • Package API docs: API.md and axir-api.json.
  • Capability manifest: axir-capabilities.json.
  • Runnable examples: examples/.
  • Real network support: yes.
  • Scripted no-key transport support: yes.
  • Runtime profiles: javascript-quickjs, python-pyodide.

Core Pattern

#include "axllm/axllm.hpp"

auto llm = axllm::ai("openai", { {"apiKey", std::getenv("OPENAI_API_KEY")} });

Relevant API Surface

  • Signatures: axllm::s, axllm::FieldType, axllm::AxSignature
  • AxGen: axllm::ax, axllm::AxGen
  • AxAI: axllm::ai, axllm::get_supported_ai_models, axllm::AxCredentialRequest, axllm::AxCredentialProvider, axllm::AxStreamHandler, axllm::OpenAICompatibleClient, axllm::OpenAIResponsesClient, axllm::GoogleGeminiClient, axllm::AnthropicClient, axllm::AxUsageContext, axllm::AxUsageEvent, axllm::AxUsageObserver, axllm::set_usage_observer, axllm::AxRuntimeHooks, axllm::AxRateLimitInfo, axllm::AxRateLimiter, axllm::AxTracer, axllm::AxMeter, axllm::AxGlobals, axllm::set_rate_limiter, axllm::set_tracer, axllm::set_meter, axllm::AxBalancer, axllm::AxBalancerAdaptiveStrategy, axllm::AxBalancerStatsStore, axllm::AxInMemoryBalancerStatsStore, axllm::create_balancer_route_stats, axllm::update_balancer_route_stats, axllm::sample_balancer_route_health, axllm::MultiServiceRouter, axllm::ProviderRouter
  • Agents And RLM: axllm::agent, axllm::AxAgent
  • Flow: axllm::flow, axllm::AxFlow
  • Optimizers: axllm::optimize, axllm::playbook, axllm::AxPlaybook, axllm::AxBootstrapFewShot, axllm::AxGEPA, axllm::OptimizerEngine, axllm::OptimizerEvaluator

Read the full file on GitHub · 51 lines

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. today Changed d7eadad75e0d
  2. 3d ago First seen · 51 lines · 38 tokens per session scan A 11e968c26bf2

Subscribe to this mod's changes

ax-cpp-llm is a skill published in the GitHub repository ax-llm/ax (2,890 stars, last pushed 2d ago), licensed Apache-2.0. It adds 38 tokens to every session and 866 once invoked, about $0.0002 per session on Opus 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-30.

Related

Other skills, from other repositories

implementing-jsc-classes-cpp

Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.

oven-sh/bun · 38 tokens

mcpp-style-ref

为 mcpp 项目应用 Modern/Module C++ (C++23) 编码风格。适用于编写或审查带模块的 C++ 代码、命名标识符、组织 .cppm/.cpp 文件,或用户提及 mcpp、module C++、现代 C++ 风格时。.

Sunrisepeak/mbun · 73 tokens

compiler-port

Port a compiler pass from TypeScript to Rust. Gathers context, plans the port, implements in a subagent with test-fix loop, then reviews.

react/react · 35 tokens

spanify-buffers

Find and fix unsafe buffer operations in a C++ file by removing UNSAFETODO markers and replacing unsafe raw pointers/C-style functions with base::span and standard safe containers. Use when the user asks to fix unsafe buffer warnings or -Wunsafe-buffer-usage errors. Don't use for other types of memory safety bugs like…

chromium/chromium · 86 tokens

jni-type-conversion

How to use @JniType annotations for ergonomic JNI. Relevant for Java files that use @NativeMethods or @CalledByNative.

chromium/chromium · 32 tokens

convert-internal-package-to-typescript

Convert a legacy internal Ghost workspace package from JavaScript or CommonJS to the repository's TypeScript and ESM golden path while preserving file history and runtime compatibility. Use when modernizing an existing or newly migrated private package, including staged lib-to-src moves, JS-to-TS renames, consumer…

TryGhost/Ghost · 75 tokens