attune-ai: Skill for Claude Code

.agents/skills/rag-code-gen/SKILL.md

rag-code-gen is a skill for Claude Code, Codex from Smart-AI-Memory/attune-ai. It costs 50 tokens per session (715 once invoked), scanned A, original, Apache-2.0.

A code-generation tool that first searches a collection of Attune documentation and uses the matching material to guide its answers. Its output includes links to the sources it used.

In plain words
What is it for?
Use it when generating code, configuration, or explanations that must follow Attune documentation. You can specify a particular Attune feature and choose how deeply to search.
Why use it?
It reduces the chance of invented APIs, workflow names, or usage patterns by tying generated code to reference documents. The citations let you check the basis for the answer.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is Smart-AI-Memory/attune-ai's own configuration. It tells Claude Code and Codex how to work on attune-ai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything attune-ai configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Smart-AI-Memory/attune-ai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Smart-AI-Memory/attune-ai/main/.agents/skills/rag-code-gen/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Smart-AI-Memory/attune-ai

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 rag-code-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/smart-ai-memory/attune-ai/rag-code-gen/github.svg)](https://agentmods.dev/skills/smart-ai-memory/attune-ai/rag-code-gen)
Your own site
<a href="https://agentmods.dev/skills/smart-ai-memory/attune-ai/rag-code-gen"><img src="https://agentmods.dev/badge/skills/smart-ai-memory/attune-ai/rag-code-gen/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 rag-code-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/smart-ai-memory/attune-ai/rag-code-gen"><img src="https://agentmods.dev/badge/skills/smart-ai-memory/attune-ai/rag-code-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 715 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00050 $0.00715
Opus 5.5 $0.00020 $0.00286
Sonnet 5.5 $0.00010 $0.00143
Haiku 4.5 $0.00005 $0.00072

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

Security

Grade A, and why

rag-code-gen 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.

.agents/skills/rag-code-gen/SKILL.md · 84 lines

How it starts

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

RAG-grounded code generation

attune-rag ships with attune-ai core (pip install attune-ai). Grounds code generation in the attune-help template corpus so outputs cite real APIs, workflow names, and patterns instead of hallucinating them. Every output ends with a ## Sources block of clickable citations.

Scoping

Before running, ask:

  1. What are you trying to produce? Code, config, explanation, or a mix?
  2. Any specific attune surface? e.g. "the security-audit workflow", "MCP tool pattern", "BaseWorkflow subclass". Helps retrieval hit the right concept file.
  3. Depth? Default is standard. quick saves time and budget for simple asks; deep is for complex multi-file or architectural questions.

Running

attune workflow run rag-code-gen \
  --input '{"query": "<the request>"}'

Optional inputs:

  • k — max grounding docs to retrieve (default 3)
  • depth — quick / standard / deep
  • feedback — pass good or bad AFTER inspecting the output to record a verdict against every cited template
  • model — override the generator model if you need to

Output shape

WorkflowResult.final_output is a string with two parts:

  1. The generated code / explanation
  2. A ## Sources section listing each cited attune-help template with its category, retrieval score, and a clickable link to the source on GitHub

WorkflowResult.metadata carries the full citation dict (query, retriever_name, retrieved_at, hits[]) plus fallback_used and confidence so callers can make routing decisions.

When RAG doesn't help

If the retriever can't find relevant templates, the workflow still runs — it falls back to an unaugmented prompt that explicitly tells the model there is NO grounding context so it should say "I don't know about attune X" rather than invent. metadata.fallback_used is True in that case.

Alternative: MCP tool only (no LLM call)

If you want just retrieval without generation, use the rag_knowledge_query MCP tool directly. It returns hits + an augmented prompt string without calling an LLM itself — handy for routing decisions, agent planning, or feeding another model.

Read the full file on GitHub · 84 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. 1mo ago First seen · 84 lines · 50 tokens per session scan A 4f24c3292354

Subscribe to this mod's changes

rag-code-gen is a skill published in the GitHub repository Smart-AI-Memory/attune-ai (10 stars, last pushed today), licensed Apache-2.0. It adds 50 tokens to every session and 715 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

oracle

Designing and evaluating AI/ML systems: prompt engineering, RAG design, LLM application patterns, AI safety, evaluation frameworks, MLOps, cost optimization. Use for AI pipelines or eval harnesses.

simota/agent-skills · 45 tokens

seek

Designing search engines and vector DBs for full-text, vector, and hybrid retrieval, including permission-aware retrieval for multi-tenant or per-role corpora. Use for search design, index optimization, the RAG retrieval layer, or deciding where ACL filtering belongs in the query path.

simota/agent-skills · 59 tokens

svg-chart

Render data into a standalone SVG chart file — bar, line, or pie. Use when the user provides numbers (inline, JSON, or CSV) and asks for a chart, graph, plot, trend, comparison, breakdown, or any visual summary of the data. Produces a self-contained .svg viewable in any browser; no external libraries required.

NUGURI-7/CoCoWork · 75 tokens

mlx-serve

Hook an app, game or script up to the local mlx-serve server for LLM chat, embeddings, image, speech, music, sound effect, video and 3D generation, and Laya/Kev/Clef typed decisions, or make a whole film or music video on this Mac. Use when code should call mlx-serve or the user wants a video, song, pictures or game…

ddalcu/mlx-serve · 88 tokens

rag-vs-finetune-decision

The model-capability decision tree — prompt-engineering first, then RAG for missing knowledge, then fine-tuning for missing behavior/format or cost/latency, climbing only as far as needed. Covers the cost/latency/maintenance tradeoffs of each rung and when each is the wrong choice (especially the premature-fine-tune…

VandanaAjayDubey111/great-pm · 109 tokens

openrouter

OpenRouter unified AI API - Access 200+ LLMs through single interface with intelligent routing, streaming, cost optimization, and model fallbacks.

bobmatnyc/claude-mpm-skills · 32 tokens