Skip to main content
skill CX Codex

ai-engineer · curiositech — Claude Code skill for LLM apps, RAG, and agents

ai-engineer — a skill that steers the agent while you build LLM applications: RAG pipelines, chatbots, multi-agent systems. It acts as an instruction layer with architecture patterns.

MIT 206 installs ★ 274 updated 2026-10-30

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add curiositech/some_claude_skills --skill ai-engineer -a claude-code
Open on GitHub

What ai-engineer does

The skill covers production LLM apps, from a single chatbot to multi-agent systems. It includes RAG pipeline templates, an agentic loop with tool calling, and a router that picks between models based on query complexity.

Retrieval gets the most detail: chunking, embeddings, vector storage, hybrid search, reranking. Each stage lists concrete options — Pinecone, Weaviate, Chroma, Qdrant, pgvector. Production checklists cover error handling, rate limiting, token tracking, PII filtering, and prompt injection guards.

The skill also names anti-patterns: RAG on every query, character-based chunking, skipping reranking, unbounded context, raw user input straight to the model. For each it explains the problem and the fix. The Technology Stack section cuts off at Vercel AI SDK.

What it helps with

  • Design a RAG system from scratch
  • Pick a vector database for the use case
  • Add reranking after retrieval
  • Set up guardrails and fallback chains
  • Build a multi-agent loop with tool use

Example prompts for the agent

  • Build a support chatbot over our docs using the ai-engineer skill patterns
  • Design a RAG pipeline with reranking and hybrid search
  • Check my code against ai-engineer anti-patterns: chunking, context, guardrails

How to install ai-engineer

1Skills CLI (Vercel)

npx skills add curiositech/some_claude_skills --skill ai-engineer -a claude-code

2Manually: put the files in place

~/.claude/skills/ai-engineer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ai-engineer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ai-engineer

How do I install ai-engineer in Claude Code?

Run npx skills add curiositech/some_claude_skills --skill ai-engineer -a claude-code. The skill lands at ~/.claude/skills/ai-engineer/SKILL.md.

What does the ai-engineer skill do?

It gives the agent instructions for building LLM apps: RAG architecture, vector search, agent orchestration, production operations. The agent follows them while designing and writing code.

How is ai-engineer different from prompt-engineer?

ai-engineer handles the overall LLM system architecture — retrieval, orchestration, deployment. prompt-engineer tunes the prompts themselves. The repo lists them as paired skills.

Source text

SKILL.md · MIT
---
name: ai-engineer
description: Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY
  for LLM features, chatbots, AI agents, or AI-powered applications.
allowed-tools: Read,Write,Edit,Glob,Grep,Bash,WebFetch,mcp__SequentialThinking__sequentialthinking
metadata:
  category: AI & Machine Learning
  pairs-with:
  - skill: prompt-engineer
    reason: Optimize prompts for LLM applications
  - skill: chatbot-analytics
    reason: Monitor and analyze AI chatbot performance
  - skill: backend-architect
    reason: Design scalable AI service architecture
  tags:
  - llm
  - rag
  - agents
  - ai
  - production
  - embeddings
---

# AI Engineer

Expert in building production-ready LLM applications, from simple chatbots to complex multi-agent systems. Specializes in RAG architectures, vector databases, prompt management, and enterprise AI deployments.

## Quick Start

```
User: "Build a customer support chatbot with our product documentation"

AI Engineer:
1. Design RAG architecture (chunking, embedding, retrieval)
2. Set up vector database (Pinecone/Weaviate/Chroma)
3. Implement retrieval pipeline with reranking
4. Build conversation management with context
5. Add guardrails and fallback handling
6. Deploy with monitoring and observability
```

**Result**: Production-ready AI chatbot in days, not weeks

## Core Competencies

### 1. RAG System Design
| Component | Implementation | Best Practices |
|-----------|---------------|----------------|
| **Chunking** | Semantic, token-based, hierarchical | 512-1024 tokens, overlap 10-20% |
| **Embedding** | OpenAI, Cohere, local models | Match model to domain |
| **Vector DB** | Pinecone, Weaviate, Chroma, Qdrant | Index by use case |
| **Retrieval** | Dense, sparse, hybrid | Start hybrid, tune |
| **Reranking** | Cross-encoder, Cohere Rerank | Always rerank top-k |

### 2. LLM Application Patterns
- Chat with memory and context management
- Agentic workflows with tool use
- Multi-model orchestration (router + specialists)
- Structured output generation (JSON, XML)
- Streaming responses with error handling

### 3. Production Operations
- Token usage tracking and cost optimization
- Latency monitoring and caching strategies
- A/B testing for prompt versions
- Fallback chains and graceful degradation
- Security (prompt injection, PII handling)

## Architecture Patterns

### Basic RAG Pipeline

```typescript
// Simple RAG implementation
async function ragQuery(query: string): Promise<string> {
  // 1. Embed the query
  const queryEmbedding = await embed(query);

  // 2. Retrieve relevant chunks
  const chunks = await vectorDb.query({
    vector: queryEmbedding,
    topK: 10,
    includeMetadata: true
  });

  // 3. Rerank for relevance
  const reranked = await reranker.rank(query, chunks);
  const topChunks = reranked.slice(0, 5);

  // 4. Generate response with context
  const response = await llm.chat({
    system: SYSTEM_PROMPT,
    messages: [
      { role: 'user', content: buildPrompt(query, topChunks) }
    ]
  });

  return response.content;
}
```

### Agent Architecture

```typescript
// Agentic loop with tool use
interface Agent {
  tools: Tool[];
  maxIterations: number;
}

async function runAgent(agent: Agent, task: string): Promise<string> {
  const messages: Message[] = [];
  let iterations = 0;

  while (iterations < agent.maxIterations) {
    const response = await llm.chat({
      system: agent.systemPrompt,
      messages: [...messages, { role: 'user', content: task }],
      tools: agent.tools
    });

    if (!response.toolCalls) {
      return response.content; // Final answer
    }

    // Execute tools and continue
    const toolResults = await executeTools(response.toolCalls);
    messages.push({ role: 'assistant', content: response });
    messages.push({ role: 'tool', content: toolResults });
    iterations++;
  }

  throw new Error('Max iterations exceeded');
}
```

### Multi-Model Router

```typescript
// Route queries to appropriate models
const MODEL_ROUTER = {
  simple: 'claude-3-haiku',     // Fast, cheap
  moderate: 'claude-3-sonnet',   // Balanced
  complex: 'claude-3-opus',      // Best quality
};

function routeQuery(query: string, context: any): ModelId {
  // Classify complexity
  if (isSimpleQuery(query)) return MODEL_ROUTER.simple;
  if (requiresReasoning(query, context)) return MODEL_ROUTER.complex;
  return MODEL_ROUTER.moderate;
}
```

## Implementation Checklist

### RAG System
- [ ] Document ingestion pipeline
- [ ] Chunking strategy (semantic preferred)
- [ ] Embedding model selection
- [ ] Vector database setup
- [ ] Retrieval with hybrid search
- [ ] Reranking layer
- [ ] Citation/source tracking
- [ ] Evaluation metrics (relevance, faithfulness)

### Production Readiness
- [ ] Error handling and retries
- [ ] Rate limiting
- [ ] Token tracking
- [ ] Cost monitoring
- [ ] Latency metrics
- [ ] Caching layer
- [ ] Fallback responses
- [ ] PII filtering
- [ ] Prompt injection guards

### Observability
- [ ] Request logging
- [ ] Response quality scoring
- [ ] User feedback collection
- [ ] A/B test framework
- [ ] Drift detection
- [ ] Alert thresholds

## Anti-Patterns

### Anti-Pattern: RAG Everything
**What it looks like**: Using RAG for every query
**Why wrong**: Adds latency, cost, and complexity when unnecessary
**Instead**: Classify queries, use RAG only when context needed

### Anti-Pattern: Chunking by Character
**What it looks like**: `text.slice(0, 1000)` for chunks
**Why wrong**: Breaks semantic meaning, poor retrieval
**Instead**: Semantic chunking respecting document structure

### Anti-Pattern: No Reranking
**What it looks like**: Using raw vector similarity as final ranking
**Why wrong**: Embedding similarity != relevance for query
**Instead**: Always add cross-encoder reranking

### Anti-Pattern: Unbounded Context
**What it looks like**: Stuffing all retrieved chunks into prompt
**Why wrong**: Dilutes relevance, wastes tokens, confuses model
**Instead**: Top 3-5 chunks after reranking, dynamic selection

### Anti-Pattern: No Guardrails
**What it looks like**: Direct user input to LLM
**Why wrong**: Prompt injection, toxic outputs, off-topic responses
**Instead**: Input validation, output filtering, topic guardrails

## Technology Stack

### Vector Databases
| Database | Best For | Notes |
|----------|----------|-------|
| **Pinecone** | Production, scale | Managed, fast |
| **Weaviate** | Hybrid search | GraphQL, modules |
| **Chroma** | Development, local | Embedded, simple |
| **Qdrant** | Self-hosted, filters | Rust, performant |
| **pgvector** | Existing Postgres | Easy integration |

### LLM Frameworks
| Framework | Best For | Notes |
|-----------|----------|-------|
| **LangChain** | Prototyping | Many integrations |
| **LlamaIndex** | RAG focus | Document handling |
| **Vercel AI SDK** | Streaming, React | Edge-ready |
| **Anthropic SDK** | Direct API | Full control |

### Embedding Models
| Model | Dimensions | Notes |
|-------|------------|-------|
| **text-embedding-3-large** | 3072 | Best quality |
| **text-embedding-3-small** | 1536 | Cost-effective |
| **voyage-2** | 1024 | Code, technical |
| **bge-large** | 1024 | Open source |

## When to Use

**Use for:**
- Building chatbots and conversational AI
- Implementing RAG systems
- Creating AI agents with tools
- Designing multi-model architectures
- Production AI deployments

**Do NOT use for:**
- Prompt optimization (use prompt-engineer)
- ML model training (use ml-engineer)
- Data pipelines (use data-pipeline-engineer)
- General backend (use backend-architect)

---

**Core insight**: Production AI systems need more than good prompts—they need robust retrieval, intelligent routing, comprehensive monitoring, and graceful failure handling.

**Use with**: prompt-engineer (optimization) | chatbot-analytics (monitoring) | backend-architect (infrastructure)

© curiositech · MIT · curiositech/some_claude_skills

Similar skills

All skills for AI and ML →

ai-engineer by other authors comes first.

ai-engineer sickn33 ai-engineer — a skill that puts the agent in the role of an LLM engineer, then works from success metrics to RAG pipelines, agent orchestration and the production plumbing around them. CX Codex +1 1,300installs debug-rag TakaGoto debug-rag walks you from a symptom to the actual cause when retrieval or generation misbehaves. Useful once your RAG is built and the answers are still wrong. CX Codex +1 ★ 30repo stars llm-application-dev Seth Hobson llm-application-dev — a plugin for building LLM apps, RAG systems, and LangGraph agents. Use it for vector search, embeddings, prompt work, and model evaluation. CX Codex ★ 42,780repo stars rag-engineer sickn33 The rag-engineer skill guides RAG design for LLM apps, from document chunking and embeddings to retrieval filters and evaluation. Use it when planning a document search pipeline. CX Codex +1 1,000installs rag-architect https://github.com/Jeffallan rag-architect designs production RAG systems: chunks documents, generates embeddings, configures vector stores, builds hybrid search pipelines, and evaluates retrieval quality. CX Codex +1 5,100installs langchain4j-rag-implementation-patterns giuseppe-trisciuoglio langchain4j-rag-implementation-patterns — a coding-agent skill that scaffolds LangChain4j RAG pipelines: document ingestion, embedding stores, vector search and knowledge-base answers. CX Codex +1 3,900installs AgentDB Vector Search ruvnet AgentDB Vector Search — a skill for fast semantic document retrieval using AgentDB's vector database. Use it for RAG systems, search engines, and knowledge bases where you need relevant results from large text collections. CX Codex +1 1,100installs

From the same set180

The whole set →
modern-auth-2026 modern-auth-2026 adds passwordless authentication patterns to your agent: WebAuthn passkeys, Google and Apple OAuth, magic links, and cross-device sync. CX Codex +1 208installs automatic-stateful-prompt-improver automatic-stateful-prompt-improver intercepts complex prompts to refine them via DSPy, APE, and OPRO techniques. Stores optimization outcomes in an MCP server to learn across sessions. CX Codex +1 207installs skill-coach skill-coach helps build and audit Agent Skills by checking activation, expert guidance, anti-patterns, and progressive disclosure. CX Codex +1 207installs maximalist-wall-decorator maximalist-wall-decorator guides bold interior wall decoration, gallery walls, and freehand paint techniques. Built for maximalist spaces embracing the "more is more" philosophy. CX Codex +1 206installs research-analyst research-analyst is a Claude Code skill for market research, competitive analysis, and methodology evaluation. It delivers reasoned recommendations with cited sources. CX Codex +1 206installs form-validation-architect The form-validation-architect skill helps design React forms with react-hook-form and Zod. Use it for multi-step flows, dynamic fields, and asynchronous validation. CX Codex +1 205installs llm-streaming-response-handler llm-streaming-response-handler builds production LLM streaming interfaces with Server-Sent Events and live token rendering. Helps add AbortController cancellation and stream error recovery. CX Codex +1 205installs skill-architect skill-architect is a Claude Code skill for designing, auditing, and debugging agent skills. It helps diagnose misactivation and organize expertise into three layers. CX Codex +1 204installs

Project sponsors

Companies that keep this analytics open