aiskills: Building a Reusable AI Engineering Skills Library
2026-08-21 · 3 min read
The Problem: Reinventing the Same Boilerplate
Every AI engineering project I start begins the same way: write the RAG chunking logic, set up the embedding pipeline, build an evaluation harness, scaffold the agent workflow. The code is slightly different each time, but the patterns are identical.
There's no tool-agnostic, composable library of these patterns — so I built one.
What aiskills Is
aiskills is a structured collection of skills — self-contained, documented AI engineering patterns that can be composed across different agent environments. Each skill is:
- Self-contained: one file or folder, documented with usage instructions
- Tool-agnostic: works in Cursor, Claude, Windsurf, VS Code, or any environment
- Composable: skills can be combined and sequenced
Skill Categories
RAG Pipeline Templates
The most commonly reused patterns. Each template covers a specific chunking strategy:
# skill: rag/fixed-size-chunker
def chunk_fixed_size(text: str, chunk_size: int = 512, overlap: int = 64) -> list[str]:
"""Split text into fixed-size chunks with overlap for context preservation."""
chunks = []
start = 0
while start < len(text):
end = min(start + chunk_size, len(text))
chunks.append(text[start:end])
start += chunk_size - overlap
return chunks
# skill: rag/semantic-chunker
def chunk_by_section(text: str) -> list[str]:
"""Split on markdown headers, paragraph breaks, or sentence boundaries."""
import re
sections = re.split(r'\n#{1,3} ', text)
return [s.strip() for s in sections if len(s.strip()) > 50]
LLM Evaluation Harnesses
The hardest part of AI engineering isn't building — it's measuring. These evaluation playbooks cover:
Groundedness evaluation: Does the response faithfully cite the retrieved context?
# skill: eval/groundedness-scorer
def score_groundedness(response: str, retrieved_chunks: list[str]) -> float:
"""Score 0-1 how well the response is grounded in retrieved chunks."""
prompt = f"""
Context chunks:
{chr(10).join(retrieved_chunks)}
Response: {response}
Score how well the response is grounded in the context (0.0-1.0).
Return only a float.
"""
score = float(llm.generate(prompt).strip())
return score
Faithfulness evaluation: Does the response contradict the source? Coverage evaluation: Does the response address all relevant parts of the question?
Agent Workflow Blueprints
Orchestrator + specialist-agent patterns for common agentic tasks:
# skill: agents/orchestrator-pattern
class Orchestrator:
def __init__(self, specialists: dict[str, Agent]):
self.specialists = specialists
def run(self, task: str) -> dict:
# 1. Decompose task into subtasks
subtasks = self.decompose(task)
# 2. Route each subtask to the right specialist
results = {}
for subtask in subtasks:
agent = self.route(subtask)
results[subtask.id] = agent.run(subtask)
# 3. Synthesize results
return self.synthesize(results)
Prompt Engineering Playbooks
Battle-tested prompt patterns:
- Structured output: forcing JSON, XML, or typed responses
- Tool-calling personas: keeping agents on-persona across tool invocations
- Chain-of-thought: reasoning before answering for complex multi-step problems
- Few-shot: calibrating model behavior with examples
Tool-Agnostic Design
The key design decision was making every skill importable from any environment. In Cursor or Windsurf, you reference a skill file in your agent rules. In Claude, you paste it into a project file. In a Python script, you import it directly.
This means no framework lock-in — the skill library works wherever you work.
Hardening for Production
Each skill ships with:
- Usage documentation — what problem it solves and when to use it
- Example output — so you know what correct behavior looks like
- Known limitations — where the pattern breaks down and why
GitHub: github.com/karthikrshet/aiskills