shadow-ai-eng
Skill1 starsChanged 7 days agoMITView on GitHub
Use when building LLM runtimes, structured outputs, tool calling, MCP servers, agent approvals, and provider fallback. Not for eval (/shadow-eval).
In this repository59 other files it gives its agents.
- shadow-visual-refinementSkill
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- context7Skill
- handoffSkill
- modern-web-guidanceSkill
- shadow-accessibilitySkill
- shadow-analyticsSkill
- shadow-apiSkill
- shadow-architectSkill
- shadow-authSkill
- shadow-bootstrapSkill
- shadow-browserSkill
- shadow-cacheSkill
- shadow-compatSkill
- shadow-concurrencySkill
- shadow-dataSkill
- shadow-dbSkill
- shadow-debugSkill
- shadow-designSkill
- shadow-discoverySkill
- shadow-docSkill
- shadow-domainSkill
- shadow-eaSkill
- shadow-emailSkill
- shadow-evalSkill
- shadow-finopsSkill
- shadow-gitSkill
- shadow-grcSkill
- shadow-handoverSkill
- shadow-illustrationSkill
- shadow-integrateSkill
- shadow-maintainSkill
- shadow-mobileSkill
- shadow-modernizeSkill
- shadow-monarchSkill
- shadow-observeSkill
- shadow-opsSkill
- shadow-perfSkill
- shadow-planSkill
- shadow-pmoSkill
- shadow-presalesSkill
- shadow-privacySkill
- shadow-qualitySkill
- shadow-realtimeSkill
- shadow-refactorSkill
- shadow-releaseSkill
- shadow-resilienceSkill
- shadow-searchSkill
- shadow-secSkill
- shadow-seoSkill
- shadow-supplychainSkill
- shadow-testSkill
- shadow-uatSkill
- shadow-videoSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill whenever the Monarch builds or troubleshoots production LLM features, multi-provider AI gateways, structured outputs, …
- Very specific: line 14
Static Prefix Prompt Caching & Context Compaction: Keep [Static System + Tool Schemas] strictly byte-identical at the prefix (never inject …
- Very specific: line 20
Run offline checks (L0/L1, zero LLM API calls) before claiming VERIFIED-LOCAL:
- Distinctive: line 43
Do not load unrelated references unnecessarily.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shadow AI Engineering (/shadow-ai-eng) — Production LLM, Agents & MCP Systems
Use this skill whenever the Monarch builds or troubleshoots production LLM features, multi-provider AI gateways, structured outputs, tool-calling agents, context compaction, hybrid RAG runtimes, streaming SSE chat UX, or hardened MCP servers.
1. Core Production AI Engineering Non-Negotiables
- Zero-Trust Structured Outputs & Tool Boundaries: Use provider native Structured Outputs + runtime
Zod/Pydanticvalidation (zero regex JSON parsing oras Typecasts). NEVER exposetenantId,userId,rawSql, orshellCommandas LLM tool args — injectsession.tenantIdserver-side, wrap untrusted RAG/tool outputs as passive data, and require HITL confirmation +idempotency_keyon mutating/financial tools. - Bounded Gateways, Loops & Token Caps: Pin immutable model snapshots behind an
AiGatewayPortwith explicit timeouts, bounded Full-Jitter retries, circuit breakers, eval-verified fallbacks,MAX_STEPS <= 8–10loop guards, and hardmax_output_tokens+thinking_budgetceilings. - Static Prefix Prompt Caching & Context Compaction: Keep
[Static System + Tool Schemas]strictly byte-identical at the prefix (never inject timestamps/UUIDs at line 1!), truncate giant tool outputs, compact long histories without dropping position 0, and scope memory strictly by(tenantId, userId). - Cancellable SSE Streaming & Stdio-Clean MCP: Emit
X-Accel-Buffering: no+Cache-Control: no-cache, no-transform+AbortControllerlinked to client disconnect. ForstdioMCP servers: keepstdout100% JSON-RPC only (redacted logs strictly tostderr), enforce canonicalrealpathSyncpath jails, and exit cleanly onstdinEOF (Rule #29). - Cross-Skill Ownership: Delegate retrieval indexing/ranking to
/shadow-search, RAG/agent evals & OWASP LLM red-teaming to/shadow-eval, and FOCUS token-cost governance to/shadow-finops.
2. Deterministic Verification CLI & Scenario Benchmarks
Run offline checks (L0/L1, zero LLM API calls) before claiming VERIFIED-LOCAL:
python "shadow-ai-eng/scripts/ai_runtime_verifier.py" --self-test
python "shadow-ai-eng/scripts/ai_runtime_verifier.py" --check-tool-spec path/to/tools.json
python "shadow-ai-eng/scripts/ai_runtime_verifier.py" --check-prompt-layout path/to/prompt_cfg.json
python "shadow-ai-eng/scripts/ai_runtime_verifier.py" --check-mcp-config path/to/mcp_cfg.json
python -m unittest discover -s "shadow-ai-eng/tests" -vGraded specialist scenarios live in evaluations.md (8 scenarios covering slow RAG TTFT + indirect tool injection, LLM-supplied tenantId/rawSql, broken prefix caching, uncancelled SSE streams, context compaction, and stdio MCP stdout corruption).
Reference Guide
Load only the 1–2 modules matching the active subtask (never load all 6 at once):
| Task / Scenario | Tier | Load Reference |
| Multi-provider AI gateways, pinned models, circuit breakers, eval-verified fallbacks & quotas | CORE | references/01-llm-app-architecture-and-gateways.md |
Structured Outputs, Zod/Pydantic validation, server-injected tenantId, HITL & untrusted tool outputs | CORE | references/02-structured-outputs-and-tool-trust-boundaries.md |
Bounded agent step loops (MAX_STEPS), context compaction, tool truncation & tenant memory privacy | CORE | references/03-agent-state-compaction-and-memory-privacy.md |
Hybrid RAG runtime, static prefix prompt caching, <retrieved_context> delimiters & 5-stage TTFT | ADVANCED | references/04-hybrid-rag-runtime-and-prompt-caching.md |
Cancellable SSE streaming (AbortController), Nginx zero-buffering headers & typed stream frames | ADVANCED | references/05-streaming-sse-ux-and-cancellation.md |
Hardened stdio/HTTP MCP servers (stderr logs, realpathSync jail, EOF exit) & incident triage | SPECIALIST | references/06-mcp-server-engineering-and-troubleshooting.md |
Do not load unrelated references unnecessarily.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

