raheesahmed/sajicode/ai-engineer

Claude Code and agent skill by raheesahmed/sajicode

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Build production-ready LLM applications, RAG systems, and intelligent agents. Covers model selection, vector search, prompt engineering, agent orchestration with LangGraph, cost optimization, and AI safety. Use for any LLM feature, chatbot, AI agent, or AI-powered application.

Install

npx vskill@latest install raheesahmed/sajicode/ai-engineer

SKILL.md

AI Engineer

Model Selection Matrix

ModelBest ForCostSpeedContext
GPT-4oGeneral tasks, function calling$$$Fast128K
Claude 3.5 SonnetCode generation, analysis$$$Fast200K
GPT-4o-miniCost-sensitive tasks$Very fast128K
Claude 3.5 HaikuHigh-volume, simple tasks$Very fast200K
Llama 3.1 70BSelf-hosted, privacyFree*Medium128K
Mixtral 8x22BOpen-source, balancedFree*Medium64K
Gemini 2.0 FlashMultimodal, long context$$Fast1M

Decision: Start with cheapest model that meets quality bar. Upgrade only when quality fails.

RAG Pipeline Architecture

Ingestion Pipeline
Documents → Chunking → Embedding → Vector Store
↓
Metadata extraction
(title, source, date)
Retrieval Pipeline
Query → Query Understanding → Retrieval → Reranking → Generation
↓ ↓ ↓
Expansion/ Hybrid search Cross-encoder
Decomposition (vector + BM25) scoring
Chunking Strategies
ts
// Recursive text splitter — best default
const splitter = new RecursiveCharacterTextSplitter({
chunkSize: 1000,
chunkOverlap: 200,
separators: ["\n\n", "\n", ". ", " ", ""],
});
// Semantic chunking — for high-quality retrieval
const semanticSplitter = new SemanticChunker(embeddings, {
breakpointThresholdType: "percentile",
breakpointThresholdAmount: 95,
});
Vector Database Selection
DatabaseHostingBest For
PineconeManagedProduction, scale
QdrantSelf-hosted/CloudHybrid search
ChromaEmbeddedPrototyping, local
pgvectorPostgreSQL extExisting Postgres
WeaviateSelf-hosted/CloudMultimodal

LangGraph Agent Patterns

ReAct Agent (tool-calling loop)
ts
import { StateGraph, MessagesAnnotation } from "@langchain/langgraph";
import { ToolNode } from "@langchain/langgraph/prebuilt";
const agentNode = async (state: typeof MessagesAnnotation.State) => {
const response = await model.invoke(state.messages);
return { messages: [response] };
};
const shouldContinue = (state: typeof MessagesAnnotation.State) => {
const lastMessage = state.messages[state.messages.length - 1];
return lastMessage.tool_calls?.length ? "tools" : "__end__";
};
const graph = new StateGraph(MessagesAnnotation)
.addNode("agent", agentNode)
.addNode("tools", new ToolNode(tools))
.addEdge("__start__", "agent")
.addConditionalEdges("agent", shouldContinue)
.addEdge("tools", "agent")
.compile();
Multi-Agent Supervisor Pattern
ts
const supervisorNode = async (state: AgentState) => {
const response = await supervisorModel.invoke([
{ role: "system", content: "Route to the right specialist agent." },
...state.messages,
]);
return { next: response.content }; // "researcher" | "coder" | "reviewer"
};

Prompt Engineering

Structured Output
ts
const schema = z.object({
sentiment: z.enum(["positive", "negative", "neutral"]),
confidence: z.number().min(0).max(1),
reasoning: z.string(),
});
const structuredLlm = model.withStructuredOutput(schema);
const result = await structuredLlm.invoke("Analyze: Great product!");
Chain-of-Thought
You are an expert analyst. Think through this step by step:
1. First, identify the key entities in the text
2. Then, determine the relationships between them
3. Finally, synthesize your findings into a structured answer
Text: {input}
Few-Shot Pattern
ts
const fewShotPrompt = ChatPromptTemplate.fromMessages([
["system", "Extract structured data from text."],
["human", "John works at Google since 2020"],
["ai", '{"name": "John", "company": "Google", "year": 2020}'],
["human", "Sarah joined Meta in 2023"],
["ai", '{"name": "Sarah", "company": "Meta", "year": 2023}'],
["human", "{input}"],
]);

Cost Optimization

Token Reduction Strategies
  1. Shorter prompts: Remove fluff, use terse instructions
  2. Caching: Semantic cache with vector similarity threshold
  3. Model routing: Use cheap model for simple tasks, expensive for complex
  4. Streaming: Stream responses to reduce perceived latency
  5. Batching: Group similar requests for batch API pricing
Semantic Caching
ts
const cache = new SemanticCache({
embeddings,
vectorStore,
similarityThreshold: 0.95,
});
async function cachedInvoke(prompt: string) {
const cached = await cache.lookup(prompt);
if (cached) return cached;
const result = await model.invoke(prompt);
await cache.store(prompt, result);
return result;
}

AI Safety Checklist

  • [ ] Validate all user inputs before sending to LLM
  • [ ] Strip PII from prompts when possible
  • [ ] Set max token limits on all LLM calls
  • [ ] Implement rate limiting per user/API key
  • [ ] Add content moderation on LLM outputs
  • [ ] Log all LLM interactions for debugging (redact PII)
  • [ ] Use temperature=0 for deterministic tasks
  • [ ] Implement timeout and retry with exponential backoff
  • [ ] Never expose raw LLM errors to end users

Security

  • Security scanPassed, 93 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
62
Repository forks
14
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/raheesahmed/sajicode/ai-engineer/badge)](https://verified-skill.com/skills/raheesahmed/sajicode/ai-engineer)

Something wrong with this skill or its page? Tell us.