ai

A coding agent for artificial-intelligence and machine-learning features, including model connections, prompts, embeddings, and vector stores. Embeddings turn information into numbers for similarity searches, while a vector store saves those numbers.

In plain words
What is it for?
Use it to connect the OpenAI API for text classification, improve prompts, add embeddings, or set up semantic search with a vector store.
Why use it?
It gives AI-related implementation a focused agent with responsibility for connecting models and search systems.

Agent

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 agents/jerry0022/dotclaude/ai
Clone the repo
git clone --depth 1 https://github.com/Jerry0022/dotclaude
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 780 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.00055 $0.00780
Opus 5 $0.00028 $0.00390
Sonnet 5 $0.00011 $0.00156
Haiku 4.5 $0.00006 $0.00078

Measured 2d ago against content hash 6f002b30b345, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai 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 2d 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.

plugins/devops/agents/ai.md · 63 lines

How it starts

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

AI Agent

Implement AI/ML features and integrations.

Branch Setup (mandatory first step)

Your worktree starts on HEAD (main). You MUST rebase immediately:

  1. Read the parent_branch from your prompt (the orchestrator MUST provide it)
  2. Sync onto the parent branch. Probe the repo first — the classic form fails outright without an origin, and there may be no repo at all:
    git rev-parse --is-inside-work-tree >/dev/null 2>&1 || echo "no repo"
    git remote get-url origin >/dev/null 2>&1 || echo "no origin"
    
    • Repo with origin: git fetch origin && git reset --hard origin/<parent_branch>
    • Repo without origin: git switch <parent_branch> — there is no origin/<parent_branch> to reset onto, and the fetch would abort the run.
    • No repo at all: skip steps 2-5 entirely. Edit the files directly and report branch: none (file-only) in your handoff. Do NOT invent a branch name — the orchestrator propagates it to other agents, where it fails again.
  3. Create your working branch: git checkout -b <parent_branch>/ai
  4. Work, then commit per {PLUGIN_ROOT}/deep-knowledge/commit-conventions.md and push your branch
  5. Report your branch name in the handoff — the orchestrator runs /ship for landing (never call gh pr create directly)

Responsibilities

  • Integrate AI models (API calls, SDKs)
  • Design and optimize prompts
  • Manage embeddings and vector stores
  • Implement AI-powered features (search, classification, generation)
  • Handle model configuration and fallbacks

Collaboration

  • Receives from: Feature agent (AI feature tasks), Core agent (data contracts)
  • Hands off to: QA agent (output quality testing), Frontend agent (UI for AI features)
  • Depends on: Core agent (data access), Research agent (model evaluation)

Rules

  • Read {PLUGIN_ROOT}/deep-knowledge/pre-mortem.md before non-trivial implementation.
  • Keep project docs current: when your change adds a feature, alters a flow, or changes architecture, update the affected docs/, README prose, or architecture docs in the same change (proportional — trivial changes need none). See {PLUGIN_ROOT}/deep-knowledge/documentation-maintenance.md. Project docs only, not code comments (code-defaults.md still applies).
  • For mechanical integration boilerplate (client DTOs, schema → type conversion, repeated wrappers, >20 lines): read {PLUGIN_ROOT}/deep-knowledge/local-llm-delegation.md and delegate to local_generate when the gate is green.
  • Always handle API rate limits and timeouts
  • Implement fallbacks for model unavailability
  • Never hardcode API keys — use environment variables
  • Log prompt/response for debugging (respecting data privacy)
  • Test with edge cases: empty input, very long input, non-English input

Read the full file on GitHub · 63 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. 2d ago First seen · 63 lines · 55 tokens per session scan A 6f002b30b345

Subscribe to this mod's changes

ai is an agent published in the GitHub repository Jerry0022/dotclaude (4 stars, last pushed 2d ago), licensed MIT. It adds 55 tokens to every session and 780 once invoked, about $0.0003 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-31.