agentsclimarketplace

Engineering advanced

Skill ceoimperiumprojects/imperium-brain/skills/engineering-advanced

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.From its SKILL.md

Install
npx -y skills add ceoimperiumprojects/imperium-brain --skill engineering-advanced

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.7 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

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:

PatternUse CaseComplexity
Single agent + toolsSimple tasks, clear workflowLow
Agent with sub-agentsComplex tasks, domain separationMedium
Agent team (orchestrator)Multi-domain, parallel workHigh
Agent swarmAutonomous exploration, researchVery 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:

StrategyBest ForChunk Size
Fixed-sizeSimple docs, consistent structure256-512 tokens
SemanticComplex docs, mixed contentVariable
RecursiveHierarchical contentParent + child
Document-levelShort docs, complete context neededFull 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:

DatabaseSelf-hostedCloudBest For
pgvectorYesSupabase, NeonAlready using PostgreSQL
PineconeNoYesManaged, serverless
WeaviateYesYesMulti-modal, hybrid search
QdrantYesYesPerformance, filtering
ChromaDBYesNoPrototyping, 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:

{
  "data": { ... },
  "meta": { "page": 1, "total": 100 },
  "errors": null
}

Error response format:

{
  "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:

StrategyRiskComplexityBest For
Direct deployHighLowInternal tools, early stage
Blue/GreenLowMediumZero-downtime deploys
CanaryLowHighHigh-traffic production
Feature flagsVery LowMediumGradual 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

What ships with it: 5 files

13.6 KB alongside SKILL.md

Gives 0 of the 12 instructions most containers cloud skills give in ~1.5k tokens

Counted across 607 of the 705 authors here whose files we hold, read 2026-09-06

  • Run as non-root userin 34 of 607, across 27 files
  • Use multi-stage buildsin 29 of 607
  • Set resource requests and limitsin 24 of 607, across 20 files
  • Configure liveness and readiness probesin 18 of 607, across 14 files
  • Use named volumes for persistent datain 14 of 607, across 9 files
  • Pin base image versionsin 14 of 607
  • Set up environment variablesin 14 of 607, across 10 files
  • Pin provider versionsin 14 of 607
  • Apply least privilege RBAC permissionsin 10 of 607, across 7 files
  • Create a dockerignore filein 10 of 607
  • Use remote state with lockingin 9 of 607
  • Pin base images by digestin 9 of 607, across 8 files

Said here and by no other author read

  • Give agents clear specific instructions
  • Define tool boundaries for agents
  • Implement guardrails for agents
  • Design for failure
  • Observe everything
  • Use nouns for API resources

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.