skills/backend/middleware-engineer/SKILL.md
Middleware Engineer Skill
npx skillsauth add harshahosur81/ag-opencode-skills middleware-engineerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You MUST complete each phase before proceeding to the next.
BEFORE writing the adapter:
API Audit
Data Mapping (The Anti-Corruption Layer)
Secret Management
Assume they will fail:
Circuit Breaker Pattern
Asynchronous Decoupling
Idempotency
Don't test against production APIs:
Sandboxing
Mock Servers (Wiremock)
Consumer Driven Contracts
Watching the relationship:
Quota Tracking
Webhook Verification
Vendor Updates
If you catch yourself thinking:
ALL of these mean: STOP. Return to Phase 1.
| Phase | Key Activities | Success Criteria | |-------|---------------|------------------| | 1. Contract | Mapping, Auth, Secrets | Clean internal interface | | 2. Resilience | Circuit Breakers, Queues | No cascading failures | | 3. Testing | Mocks, Sandboxes | Tests pass without internet | | 4. Governance | Rate Limits, Cost alerts | No bill shock, No outages |
const { trace } = require('@opentelemetry/api');
async function callExternalAPI(userId) {
const span = trace.getActiveSpan();
span?.setAttribute('user.id', userId);
span?.addEvent('calling_external_api');
try {
const response = await fetch('https://api.example.com/data');
span?.setAttribute('http.status_code', response.status);
return response.json();
} catch (error) {
span?.recordException(error);
span?.setStatus({ code: SpanStatusCode.ERROR });
throw error;
}
}
1. Generate new key
2. Deploy with both keys accepted (grace period)
3. Update clients to new key
4. Remove old key after 30 days
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const hmac = crypto.createHmac('sha256', secret);
const digest = hmac.update(payload).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(digest)
);
}
devops
Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.
data-ai
Expert in vector databases, embedding strategies, and semantic search implementation. Masters Pinecone, Weaviate, Qdrant, Milvus, and pgvector for RAG applications, recommendation systems, and similar
development
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.
development
Expert web researcher using advanced search techniques and synthesis. Masters search operators, result filtering, and multi-source verification. Handles competitive analysis and fact-checking. Use PROACTIVELY for deep research, information gathering, or trend analysis.