middleware-engineer
Middleware Engineer Skill
- License 许可
- MIT
- 所属仓库
- agisota/old-one
- 最近更新
- 2026-07-04
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- middleware-engineer
- triggers
- [ "middleware engineer" ]
- description
- Middleware Engineer Skill
03 SKILL.md 正文
The Four Phases
You MUST complete each phase before proceeding to the next.
Phase 1: Contract & Discovery
BEFORE writing the adapter:
-
API Audit
- Read the Rate Limits. (Requests per minute?).
- Read the SLA. (Do they guarantee 99.9% uptime?).
- Auth Method: OAuth2? API Key? mTLS?
- Webhooks: Do they push data to us? How do we verify the signature?
-
Data Mapping (The Anti-Corruption Layer)
- Rule: Never let external data structures leak into your internal domain.
- Create an "Adapter" or "Mapper" to convert their JSON to Your Object.
- If they change their API, you only change the Mapper, not your whole app.
-
Secret Management
- Where do the API keys live? (Secret Manager).
- Rotation Strategy: What happens if a key leaks?
Phase 2: Resilience & Queuing
Assume they will fail:
-
Circuit Breaker Pattern
- If the 3rd party fails 5 times, stop calling them for 1 minute.
- Fail fast instead of hanging the user's thread.
-
Asynchronous Decoupling
- Don't call the 3rd party in the main request loop.
- Put the job on a Queue (SQS/RabbitMQ). "Process Payment" -> Queue.
- Retries: Exponential Backoff (Retry in 1s, then 2s, then 4s).
-
Idempotency
- What happens if we send the same request twice? (Double charge?).
- Send an "Idempotency Key" (Unique ID) with every write request.
Note
Skill content truncated for token efficiency. Full version available in the source repository.
04 同仓库更多 Skills
zoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
zeroize-audit
Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data.
yeet
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
yara-rule-authoring
Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.
x-twitter-growth
X/Twitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X/Twitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.
x-api
X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.