api-design
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
TypeScript best practices and patterns. Use when writing TypeScript, fixing type errors, or working with generics.
$ npx -y skills add Tibsfox/gsd-skill-creator --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/typescript-patternsContext preview
What this command does when you run it.
TypeScript best practices and patterns. Use when writing TypeScript, fixing type errors, or working with generics.
name: typescript-patterns description: TypeScript best practices and patterns. Use when writing TypeScript, fixing type errors, or working with generics.
| Use Case | Prefer | |----------|--------| | Object shape | interface | | Union types | type | | Extending shapes | interface | | Intersection | type | | Tuple/primitives | type |
**Discriminated Unions** — model state with tagged types:
type Result<T> = { ok: true; value: T } | { ok: false; error: Error };**Type Guards** — narrow at runtime:
function isUser(obj: unknown): obj is User {
return typeof obj === 'object' && obj !== null && 'id' in obj;
}**Generic Constraints:**
function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] { return obj[key]; }| Type | Purpose | |------|---------| | Partial\<T\> | All optional | | Required\<T\> | All required | | Pick\<T,K\> | Select properties | | Omit\<T,K\> | Remove properties | | Record\<K,V\> | Key-value map | | ReturnType\<T\> | Function return type |
An adaptive learning and coprocessor architecture for Claude Code, built as an extension to GSD (open-gsd)
Repo: Tibsfox/gsd-skill-creator
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
Reviews code for bugs, style, and best practices. Use when reviewing PRs or checking code quality.
Creates context handoff documents for session continuity. Use when ending sessions, switching tasks, or handing off work.
Thinking frameworks for decisions and problem analysis. Use when evaluating options, root causes, or prioritizing.
Environment configuration and secrets management. Use when setting up .env files, managing secrets, or configuring environments.
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.