一键导入
ais-production
Production AI — caching, rate limit, fallback model, monitoring, graceful degradation. Không crash khi API down.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Production AI — caching, rate limit, fallback model, monitoring, graceful degradation. Không crash khi API down.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences. Use when: 3D website, three.js, WebGL, react three fiber, 3D experience.
Game art principles — art style, color theory, animation principles, asset pipeline
Game design principles — core loop, GDD, player psychology, difficulty balancing, progression
Orchestrator game — route to implementation skill (pxhopencode) + principle-based sub-skill (agent-skills-hub)
Mobile game principles — touch input, battery, thermal, app stores, monetization
Multiplayer game principles — networking architecture, synchronization, security, matchmaking
| name | ais-production |
| description | Production AI — caching, rate limit, fallback model, monitoring, graceful degradation. Không crash khi API down. |
The system must never crash when an external API is down. Graceful degradation is not optional.
KHÔNG BAO GIỜ deploy AI feature KHÔNG có fallback chain + rate limiter
Cache ALL responses — repeat queries are waste
| File | Mục đích |
|---|---|
templates/response-cache.py | AIResponseCache — TTL-based, LRU eviction, MD5 keyed by messages+model |
templates/rate-limiter.py | RateLimiter — sliding window per minute + daily cap, acquire() |
templates/fallback.py | chat_with_fallback() — chain gpt-4o → gpt-4o-mini → claude-3-haiku |
templates/monitoring.py | Prometheus metrics — calls, latency, tokens, cost, active requests |
from templates.fallback import chat_with_fallback
from templates.rate_limiter import rate_limiter
await rate_limiter.acquire()
result = await chat_with_fallback(messages)
Architecture:
/metrics for Prometheus| Excuse | Reality |
|---|---|
| "Cache không cần, LLM response đa dạng" | Câu hỏi giống nhau → cache giảm 50% cost |
| "Fallback model khi main model down = app chết" | Graceful degradation > 500 error |
| "Monitoring thêm sau" | Không biết latency tăng, cost vượt |