ai-integration

ai-integration is a skill for Claude Code from superduke/ganvil. It costs 51 tokens per session (1,464 once invoked), scanned A, original, MIT.

A set of guidelines for adding artificial-intelligence features and in-app agents to software products.

In plain words
What is it for?
It covers AI-generated content and suggestions, multi-step actions from natural language, data analysis, prompt design, Anthropic API use, and agents that operate the app through its own tools.
Why use it?
It helps teams decide when AI solves a real problem and avoid adding a chat feature without a useful connection to the application.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the ganvil plugin — 6 skills, 6 agents, 1 MCP server shipped together

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/superduke/ganvil/ai-integration
Any agent
npx skills add superduke/ganvil --skill ai-integration
Clone the repo
git clone --depth 1 https://github.com/superduke/ganvil

Made for: Claude Code.

Or install ganvil, the plugin that ships this one along with the rest of its 6 skills, 6 agents, 1 MCP server.

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-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/superduke/ganvil/ai-integration.svg)](https://agentmods.dev/skills/superduke/ganvil/ai-integration)
Your own site
<a href="https://agentmods.dev/skills/superduke/ganvil/ai-integration"><img src="https://agentmods.dev/badge/skills/superduke/ganvil/ai-integration.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,464 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.1 $0.00051 $0.01464
Opus 5 $0.00026 $0.00732
Sonnet 5 $0.00010 $0.00293
Haiku 4.5 $0.00005 $0.00146

Measured 6d ago against content hash 4cf113da7f2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ai-integration 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 6d 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.

ganvil/skills/ai-integration/SKILL.md · 189 lines

How it starts

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

AI Integration Guidelines

This skill provides patterns and best practices for weaving AI-powered features into applications built by the ganvil. It is referenced by the planner (when designing specs) and generators (when implementing AI features).

When to Add AI Features

Add AI features when they genuinely improve the product:

  • Accelerating repetitive creative workflows (e.g., generating assets, code, or content)
  • Providing intelligent defaults or suggestions based on context
  • Automating multi-step processes through natural language
  • Analyzing, summarizing, or transforming complex data

Do NOT add AI features just because you can. Each AI feature should solve a real user problem that would be tedious or impossible without AI.

Building App-Internal Agents

When the spec calls for AI-powered functionality, build a proper agent that can drive the app's own functionality through tools — not just a chat widget pasted on top.

The Tool-Use Pattern

The recommended architecture for app-internal AI features:

User Input (natural language)
    ↓
Agent Loop:
    1. Understand intent
    2. Plan which tools to call
    3. Execute tools (your app's own functions)
    4. Observe results
    5. Repeat or respond
    ↓
Result (action taken in the app + explanation to user)

Implementation Steps

  1. Define clear, focused tools that map to your app's core operations:

    • Each tool does one thing well
    • Parameters are typed and validated
    • Return values are structured (not free text)
  2. Build tools as standalone functions in your app:

    • They should work independently of the AI integration
    • They should be testable without an API key
  3. Implement the agent loop:

    • Receive user input → construct messages → call API → parse tool_use → execute → loop
    • Handle the end_turn stop reason to know when the agent is done
    • Accumulate tool results and feed them back as tool_result messages
  4. Handle errors gracefully:

    • The agent should explain failures in natural language, not crash
    • Implement retry logic for transient API errors
    • Provide graceful degradation when the AI service is unavailable

Read the full file on GitHub · 189 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. 6d ago First seen · 189 lines · 51 tokens per session scan A 4cf113da7f2f

Subscribe to this mod's changes

ai-integration is a skill published in the GitHub repository superduke/ganvil (3 stars, last pushed 1mo ago), licensed MIT. It adds 51 tokens to every session and 1,464 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.

Related

Other skills, from other repositories

ccc-prompt-fix

Fix and sharpen a prompt. Diagnoses it against the 6 prompt-quality patterns, returns a tightened rewrite with the reasoning, and suggests the right library prompt for your task.

KevinZai/commander · 41 tokens

agy-prompting

Internal helper — how to tighten a user request into a sharp prompt for the Antigravity CLI (agy / Gemini 3.x with native web search and agentic tools).

MarcosNahuel/antigravity-plugin-cc · 40 tokens

meta-prompt-optimizer

Audit and rewrite prompts against Claude Opus 4.7 instruction-following best practices. Produces a scored audit plus a rewritten prompt. Use when the user asks to audit, review, critique, rewrite, improve, optimize, tighten, score, fix, migrate, or draft a prompt — including system prompts, CLAUDE.md files, Claude…

theagenticguy/erpaval · 230 tokens

prompt-optimizer

Optimize prompts for Claude's latest models (Claude 5 family — Opus 5, Sonnet 5, Fable 5 — plus the still-active Opus 4.8, Sonnet 4.6, and Haiku 4.5) using Anthropic's official prompt-engineering guidance. Use when users want to improve, refine, debug, or create prompts or system prompts for Claude. Triggers include…

Aznatkoiny/zAI-Skills · 205 tokens

refine

Crossover layer between the user's intent and LLM execution: takes a raw prompt (terse, frustrated, ambiguous, or shorthand), resolves every vague reference to a concrete artifact, recalls past decisions and lessons, and compiles a verifiable execution contract BEFORE any code is touched. Invoke explicitly as $refine…

cdeust/session-optimizer · 118 tokens

gemini-prompting

Internal guidance for composing Gemini prompts for coding, review, diagnosis, and research tasks inside the Gemini Claude Code plugin.

LovelaceLoom/gemini-plugin-cc · 28 tokens