TypeScript coding standards and design principles. Use when writing new code, reviewing code, refactoring, or when guidance is needed on naming conventions, documentation (JSDoc), immutability, strict typing, testing patterns, or design principles like avoiding over-abstraction.
getUserById instead of get, calculateTotalPrice instead of calcisActive, hasPermission, canEdit, shouldRetrytransaction instead of tx, configuration instead of cfgusers, orderItems, activeConnections@param tags with types and descriptions for all parameters@returns tag with type and description of the return value@throws tag documenting any exceptions the method may throwExample:
/**
* Calculates the total price including tax.
* @param {number} basePrice - The base price before tax
* @param {number} taxRate - The tax rate as a decimal (e.g., 0.21 for 21%)
* @returns {number} The total price including tax
* @throws {Error} If basePrice or taxRate is negative
*/
function calculateTotalPrice(basePrice: number, taxRate: number): number {
if (basePrice < 0 || taxRate < 0) {
throw new Error('Price and tax rate must be non-negative');
}
return basePrice * (1 + taxRate);
}
const over let whenever possiblereadonly for properties that should not be mutated after initialization.map(), .filter(), .reduce()) over mutations (.push(), .splice())any — use unknown when the type is truly unknown, then narrow itstrict: true in tsconfig.jsonshould return null when user is not foundnpm info <package> version or check npmjs.com to confirm the latest versionSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer