Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates comprehensive TypeScript documentation using JSDoc, TypeDoc, and multi-layered documentation patterns for different audiences. Use when creating API documentation, architectural decision records (ADRs), code examples, and framework-specific patterns for NestJS, Express, React, Angular, and Vue.
.claude/skills/giuseppe-trisciuoglio-typescript-docs/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 87% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 121% | 0% |
| case-19 | ✓→✗ | ▼ Worse | 71% | 0% |
Generate production-ready TypeScript documentation with layered architecture for multiple audiences. Supports API docs with TypeDoc, ADRs, and framework-specific patterns.
Use JSDoc annotations for inline documentation, TypeDoc for API reference generation, and ADRs for tracking design choices.
Key capabilities:
Use this skill when creating API documentation, architectural decision records, code examples, or framework-specific patterns for NestJS, Express, React, Angular, or Vue.
| Tool | Purpose | Command | |------|---------|---------| | TypeDoc | API documentation generation | npx typedoc | | Compodoc | Angular documentation | npx compodoc -p tsconfig.json | | ESLint JSDoc | Documentation validation | eslint --ext .ts src/ |
| Tag | Use Case | |-----|----------| | @param | Document parameters | | @returns | Document return values | | @throws | Document error conditions | | @example | Provide code examples | | @remarks | Add implementation notes | | @see | Cross-reference related items | | @deprecated | Mark deprecated APIs |
bashnpm install --save-dev typedoc typedoc-plugin-markdown
json{ "entryPoints": ["src/index.ts"], "out": "docs/api", "theme": "markdown", "excludePrivate": true, "readme": "README.md" }
typescript/** * Service for managing user authentication * * @remarks * Handles JWT-based authentication with bcrypt password hashing. * * @example * ```typescript * const authService = new AuthService(config); * const token = await authService.login(email, password); * ``` * * @security * - Passwords hashed with bcrypt (cost factor 12) * - JWT tokens signed with RS256 */ @Injectable() export class AuthService { /** * Authenticates a user and returns access tokens * @param credentials - User login credentials * @returns Authentication result with tokens * @throws {InvalidCredentialsError} If credentials are invalid */ async login(credentials: LoginCredentials): Promise<AuthResult> { // Implementation } }
markdown# ADR-001: TypeScript Strict Mode Configuration ## Status Accepted ## Context What is the issue motivating this decision? ## Decision What change are we proposing? ## Consequences What becomes easier or more difficult?
yamlname: Documentation on: push: branches: [main] paths: ['src/**', 'docs/**'] jobs: generate-docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - run: npm ci - run: npm run docs:generate - run: npm run docs:validate
json{ "rules": { "jsdoc/require-description": "error", "jsdoc/require-param-description": "error", "jsdoc/require-returns-description": "error", "jsdoc/require-example": "warn" } }
If validation fails: review ESLint errors, fix JSDoc comments (add missing descriptions, add @param/@returns/@throws where absent), re-run eslint --ext .ts src/ until all errors pass before committing.
typescript/** * Custom hook for fetching paginated data * * @remarks * This hook manages loading states, error handling, and automatic * refetching when the page or filter changes. * * @example * ```tsx * function UserList() { * const { data, isLoading, error } = usePaginatedData('/api/users', { * page: currentPage, * limit: 10 * }); * * if (isLoading) return <Spinner />; * if (error) return <ErrorMessage error={error} />; * return <UserTable users={data.items} />; * } * ``` * * @param endpoint - API endpoint to fetch from * @param options - Pagination and filter options * @returns Paginated response with items and metadata */ export function usePaginatedData<T>( endpoint: string, options: PaginationOptions ): UsePaginatedDataResult<T> { // Implementation }
typescript/** * Validates email addresses using RFC 5322 specification * * @param email - Email address to validate * @returns True if email format is valid * * @example * ```typescript * isValidEmail('user@example.com'); // true * isValidEmail('invalid-email'); // false * ``` * * @performance * O(n) where n is the email string length * * @see {@link https://tools.ietf.org/html/rfc5322} RFC 5322 Specification */ export function isValidEmail(email: string): boolean { const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; return emailRegex.test(email); }
typescript/** * REST API endpoints for user management * * @remarks * All endpoints require authentication via Bearer token. * Rate limiting: 100 requests per minute per user. * * @example * ```bash * curl -H "Authorization: Bearer <token>" https://api.example.com/users/123 * ``` * * @security * - All endpoints use HTTPS * - JWT tokens expire after 1 hour * - Sensitive data is redacted from logs */ @Controller('users') export class UsersController { /** * Retrieves a user by ID * @param id - User UUID * @returns User profile (password excluded) */ @Get(':id') async getUser(@Param('id') id: string): Promise<UserProfile> { // Implementation } }
@example: Provide runnable examples for complex functions@throws: Document all possible errors@see: Cross-reference related functions/types@remarks: Add implementation details and notes@private or exclude from TypeDoc output@deprecated with migration guidance@see references point to valid locations| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | pass→pass | 12,727 | 8,132 | -36% | 1 | 1 | 0% | 2,282 | 3,349 | +47% | 0 | 0 | — |
case-01 | fail→pass | 21,132 | 17,669 | -16% | 1 | 1 | 0% | 4,310 | 5,592 | +30% | 0 | 0 | — |
case-02 | fail→fail | 11,604 | 9,562 | -18% | 1 | 1 | 0% | 2,139 | 3,859 | +80% | 0 | 0 | — |
case-03 | fail→pass | 18,198 | 13,100 | -28% | 1 | 1 | 0% | 2,618 | 4,061 | +55% | 0 | 0 | — |
case-04 | pass→pass | 10,926 | 6,099 | -44% | 1 | 1 | 0% | 2,134 | 3,249 | +52% | 0 | 0 | — |
case-05 | fail→pass | 12,081 | 11,734 | -3% | 1 | 1 | 0% | 2,285 | 4,269 | +87% | 0 | 0 | — |
case-06 | fail→pass | 8,289 | 4,916 | -41% | 1 | 1 | 0% | 1,389 | 3,067 | +121% | 0 | 0 | — |
case-07 | pass→pass | 5,750 | 2,637 | -54% | 1 | 1 | 0% | 994 | 2,427 | +144% | 0 | 0 | — |
case-08 | pass→pass | 7,762 | 6,461 | -17% | 1 | 1 | 0% | 1,226 | 3,012 | +146% | 0 | 0 | — |
case-09 | pass→pass | 11,012 | 29,889 | +171% | 1 | 1 | 0% | 2,059 | 5,578 | +171% | 0 | 0 | — |
case-10 | pass→pass | 8,140 | 6,508 | -20% | 1 | 1 | 0% | 1,312 | 3,031 | +131% | 0 | 0 | — |
case-11 | pass→pass | 6,754 | 6,519 | -3% | 1 | 1 | 0% | 1,183 | 3,046 | +157% | 0 | 0 | — |
case-12 | pass→pass | 5,676 | 4,599 | -19% | 1 | 1 | 0% | 998 | 2,871 | +188% | 0 | 0 | — |
case-13 | pass→pass | 9,837 | 6,264 | -36% | 1 | 1 | 0% | 1,765 | 3,219 | +82% | 0 | 0 | — |
case-14 | pass→pass | 10,265 | 6,388 | -38% | 1 | 1 | 0% | 1,733 | 3,060 | +77% | 0 | 0 | — |
case-15 | pass→pass | 14,372 | 10,666 | -26% | 1 | 1 | 0% | 2,108 | 3,740 | +77% | 0 | 0 | — |
case-16 | pass→pass | 8,424 | 5,578 | -34% | 1 | 1 | 0% | 1,341 | 2,863 | +113% | 0 | 0 | — |
case-17 | pass→pass | 11,126 | 7,247 | -35% | 1 | 1 | 0% | 1,839 | 3,192 | +74% | 0 | 0 | — |
case-18 | pass→pass | 10,173 | 9,069 | -11% | 1 | 1 | 0% | 1,908 | 3,588 | +88% | 0 | 0 | — |
case-19 | pass→fail | 28,915 | 14,445 | -50% | 1 | 1 | 0% | 2,787 | 4,767 | +71% | 0 | 0 | — |
case-20 | pass→pass | 10,043 | 9,193 | -8% | 1 | 1 | 0% | 1,525 | 3,727 | +144% | 0 | 0 | — |
case-21 | pass→pass | 7,779 | 3,617 | -54% | 1 | 1 | 0% | 1,213 | 2,610 | +115% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.