Skip to content
Back to skills

Engineering Advanced

ASecurity

Advanced engineering patterns for AI-native products. Use when the user mentions agent design, RAG architecture, AI pipelines, MCP servers, API design best practices, CI/CD pipeline architecture, system design interviews, observability, infrastructure as code, or advanced engineering topics. Also triggers on: agent, RAG, retrieval augmented generation, MCP, API design, REST, GraphQL, CI/CD, GitHub Actions, Docker, Kubernetes, microservices architecture, event-driven, message queues, caching s...

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
ai-agentsgosqlnoderailsdockerkubernetestestinggitapidatabase

Works with

  • claude code
  • claude desktop
  • cursor
  • api
  • mcp

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add ceoimperiumprojects/imperium-brain --skill engineering-advanced --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Engineering Advanced?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Engineering Advanced
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ceoimperiumprojects-engineering-advanced/badge)](https://www.skillsdirectory.com/skills/ceoimperiumprojects-engineering-advanced)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: engineering-advanced
description: 'Advanced engineering patterns for AI-native products. Use when the user mentions agent design, RAG architecture, AI pipelines, MCP servers, API design best practices, CI/CD pipeline architecture, system design interviews, observability, infrastructure as code, or advanced engineering topics. Also triggers on: agent, RAG, retrieval augmented generation, MCP, API design, REST, GraphQL, CI/CD, GitHub Actions, Docker, Kubernetes, microservices architecture, event-driven, message queues, caching strategies, database design, system design.'
user-invocable: false
---

# Engineering Advanced

Advanced engineering patterns for AI-native startups building agents, RAG systems, APIs, and scalable infrastructure.

## Keywords

Agent design, RAG, retrieval augmented generation, MCP, API design, REST, GraphQL, CI/CD, GitHub Actions, Docker, Kubernetes, microservices, event-driven, message queues, caching, database design, system design, observability, infrastructure as code, AI pipeline

## Core Domains

### 1. Agent Design

**Agent architecture patterns:**

| Pattern | Use Case | Complexity |
|---------|----------|------------|
| Single agent + tools | Simple tasks, clear workflow | Low |
| Agent with sub-agents | Complex tasks, domain separation | Medium |
| Agent team (orchestrator) | Multi-domain, parallel work | High |
| Agent swarm | Autonomous exploration, research | Very High |

**Agent design principles:**
- Give agents clear, specific instructions (not vague goals)
- Define tool boundaries (what the agent CAN and CANNOT do)
- Implement guardrails (content filters, action limits, human-in-the-loop)
- Design for failure (retry logic, fallback paths, error handling)
- Observe everything (log prompts, responses, tool calls, latency)

**Agent evaluation:**
- Task completion rate
- Average tokens per task
- Tool call efficiency (fewer calls = better)
- Error rate and recovery success
- User satisfaction / output quality

### 2. RAG Architecture

**RAG pipeline components:**

```
Documents → Chunking → Embedding → Vector Store → Retrieval → Generation
```

**Chunking strategies:**

| Strategy | Best For | Chunk Size |
|----------|----------|------------|
| Fixed-size | Simple docs, consistent structure | 256-512 tokens |
| Semantic | Complex docs, mixed content | Variable |
| Recursive | Hierarchical content | Parent + child |
| Document-level | Short docs, complete context needed | Full document |

**Retrieval optimization:**
- Hybrid search: Vector similarity + keyword (BM25)
- Re-ranking: Cross-encoder after initial retrieval
- Metadata filtering: Pre-filter by date, source, category
- Query expansion: Generate multiple query variations
- Contextual compression: Summarize retrieved chunks

**Vector databases:**

| Database | Self-hosted | Cloud | Best For |
|----------|------------|-------|----------|
| pgvector | Yes | Supabase, Neon | Already using PostgreSQL |
| Pinecone | No | Yes | Managed, serverless |
| Weaviate | Yes | Yes | Multi-modal, hybrid search |
| Qdrant | Yes | Yes | Performance, filtering |
| ChromaDB | Yes | No | Prototyping, local dev |

**RAG quality metrics:**
- Retrieval precision: % of retrieved chunks that are relevant
- Retrieval recall: % of relevant chunks that are retrieved
- Faithfulness: Does the answer match the retrieved context?
- Answer relevancy: Does the answer address the question?

### 3. API Design

**REST API design rules:**
- Use nouns for resources (`/users`, not `/getUsers`)
- HTTP methods: GET (read), POST (create), PUT (replace), PATCH (update), DELETE
- Consistent naming: `snake_case` for JSON, plural nouns for collections
- Pagination: Cursor-based for real-time data, offset for static
- Versioning: URL path (`/v1/`) preferred over headers
- Error responses: Consistent format with error code, message, details

**API response format:**
```json
{
  "data": { ... },
  "meta": { "page": 1, "total": 100 },
  "errors": null
}
```

**Error response format:**
```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Email is required",
    "details": [{ "field": "email", "issue": "missing" }]
  }
}
```

**Rate limiting:**
- Return `429 Too Many Requests` with `Retry-After` header
- Implement per-user and per-IP limits
- Use sliding window algorithm
- Document limits clearly in API docs

### 4. CI/CD Pipeline Architecture

**Pipeline stages:**
```
Push → Lint → Test → Build → Security Scan → Deploy (Staging) → Deploy (Production)
```

**GitHub Actions best practices:**
- Cache dependencies (node_modules, pip cache)
- Run tests in parallel where possible
- Use matrix builds for multiple environments
- Pin action versions (don't use `@latest`)
- Store secrets in GitHub Secrets, not in code
- Keep workflows DRY with reusable workflows

**Deployment strategies:**

| Strategy | Risk | Complexity | Best For |
|----------|------|------------|----------|
| Direct deploy | High | Low | Internal tools, early stage |
| Blue/Green | Low | Medium | Zero-downtime deploys |
| Canary | Low | High | High-traffic production |
| Feature flags | Very Low | Medium | Gradual rollout |

### 5. MCP Server Building

**MCP (Model Context Protocol) server structure:**
- Define tools with clear names and descriptions
- Input schemas using JSON Schema
- Handle errors gracefully with informative messages
- Implement authentication if accessing external services
- Test with Claude Code or Claude Desktop

**MCP tool design principles:**
- One tool, one job (Single Responsibility)
- Clear parameter names and descriptions
- Return structured data (JSON), not prose
- Include examples in tool descriptions
- Handle edge cases (empty results, timeout, rate limits)

### 6. Observability

**Three pillars:**
1. **Logs:** Structured (JSON), with correlation IDs, appropriate levels
2. **Metrics:** Business metrics (conversions, revenue), technical metrics (latency, error rate)
3. **Traces:** Distributed tracing across services (OpenTelemetry)

**Essential alerts:**
- Error rate > X% for Y minutes
- P99 latency > Xms
- CPU/Memory > 80% sustained
- Queue depth growing
- 5xx responses from dependencies

**Tool recommendations:**
- Logging: Structured logging → Datadog, Grafana Loki, CloudWatch
- Metrics: Prometheus + Grafana, Datadog
- Tracing: OpenTelemetry → Jaeger, Datadog
- Error tracking: Sentry
- Uptime: Betteruptime, Checkly

## Reference Files

- `references/agent-design.md` — Agent architecture, evaluation, prompt engineering
- `references/rag-architecture.md` — RAG pipeline design, chunking, retrieval optimization
- `references/api-design.md` — REST/GraphQL patterns, versioning, error handling
- `references/cicd.md` — Pipeline architecture, deployment strategies, GitHub Actions
- `references/mcp-builder.md` — MCP server development, tool design, testing

Files in this skill

  • SKILL.md6.7 KB
  • references/agent-design.md2.3 KB
  • references/api-design.md2.6 KB
  • references/cicd.md2.5 KB
  • references/mcp-builder.md3.4 KB
  • references/rag-architecture.md2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.