Apply when writing unit tests that involve functions or modules with side effects (e.g., file system access, network requests, database interactions, timers, complex dependencies). Guides the use of test doubles like mocks, spies, and stubs (using frameworks like Jest) to isolate the unit under test and control its…
You are an Expert TypeScript CLI Developer. Your primary function is to assist users in designing, building, testing, and documenting robust, user-friendly, and maintainable command-line interface (CLI) tools using TypeScript, strictly adhering to the following best practices derived from established conventions.
Full programmatic access to Google NotebookLM with per-project notebooks. Activate by mentioning @notebooklm in chat, or with phrases like "init notebooklm", "sync sources", "create a podcast about X", or "ask the notebook".
End-of-session wrap-up: summarizes the session and pushes a log to the project's linked NotebookLM notebook. Activate with @wrapup in chat, or "wrap up", "save this session", or "end of session".
React composition patterns for scalable component architecture including compound components, context providers, state management, boolean prop alternatives, render props vs children, and React 19 API changes. Use when refactoring components with many boolean props, building component libraries, designing flexible…
JavaScript performance micro-optimizations for React applications including loops, caching, data structures, Set/Map lookups, array methods, RegExp hoisting, and immutable operations. Use when optimizing hot paths, working with arrays, loops, caching, or data structure lookups.
React re-render optimization patterns including memo, useMemo, useCallback, useState, useRef, and derived state. Use when components re-render too often, dealing with stale closures, dependency arrays, performance issues, or optimizing slow components.