ai-infrastructure-hugg…
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
Readable functional patterns — orchestrators, pure functions, named abstractions
$ npx -y skills add agents-inc/skills --skill meta-design-expressive-typescript --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/meta-design-expressive-typescriptContext preview
The summary Claude sees to decide when to auto-load this skill.
Readable functional patterns — orchestrators, pure functions, named abstractions
name: meta-design-expressive-typescript description: Readable functional patterns — orchestrators, pure functions, named abstractions
> **Quick Guide:** Write code that communicates its intent without requiring the reader to mentally simulate any of its parts. Apply the two-tier pattern: orchestrators at the top that read like pseudocode, pure functions at the bottom that each do one thing. Extract until the code reads like prose. Use utility libraries only when they genuinely improve readability over plain JS.
---
<critical_requirements>
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST structure every non-trivial function as a two-tier orchestrator: guard clauses at the top, named function calls in the middle, assembly at the bottom -- NO inline data transformations in orchestrators)**
**(You MUST extract any expression that requires mental simulation to understand into a named function or named constant)**
**(You MUST name functions for WHAT they do, not HOW they do it -- `isContentAddition(line)` not `checkLineStartsWithPlusButNotTriplePlus(line)`)**
**(You MUST read the existing code before refactoring -- understand the current structure, then improve it)**
**(You MUST prefer plain JS methods (`.map()`, `.filter()`, `.reduce()`) over utility libraries when they already read clearly)**
</critical_requirements>
---
**Auto-detection:** orchestrator pattern, two-tier function, extract function, named predicate, named constant, readability refactor, expressive code, function decomposition, pure function extraction, readable TypeScript, guard clause, early return, flatten conditionals, discriminated union, exhaustive switch, as const satisfies, async orchestrator
**When to use:**
**When NOT to use:**
**Key patterns covered:**
---
---
<philosophy>
Expressive TypeScript is **practical, 80/20 functional programming focused on readability**. The core test for any block of code:
> **"Can someone understand the code's flow without simulating any of its parts?"**
If the answer is no, extract the part that requires simulation into a named function or constant. If the answer is yes, leave it alone -- even if it could theoretically be "cleaner."
This is NOT:
**The two core ideas:**
1. **Orchestrators read like pseudocode.** Guard clauses, named function calls, assembly. No inline logic that requires simulation. 2. **Pure functions do one thing.** Each has a name that communicates its purpose. Each is independently testable.
**When to apply this skill:**
**When NOT to apply:**
</philosophy>
---
<patterns>
Every non-trivial function follows the same structure: an **orchestrator** at the top that reads like pseudocode, calling **pure functions** at the bottom that each do one thing.
// Orchestrator: reads like a step-by-step plan
function processUserImport(rawData: RawImportData): ImportResult {
// 1. Guard clauses
if (!rawData.users.length) {
return { imported: 0, skipped: 0, errors: [] };
}
// 2. Named function calls for each step
const validated = rawData.users.filter(isValidUser);
conThe official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Repo: agents-inc/skills
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production…
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client patterns
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and…
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation,…