plugins/developer-kit-typescript/skills/typescript-docs/SKILL.md
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.
npx skillsauth add giuseppe-trisciuoglio/developer-kit typescript-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 |
npm install --save-dev typedoc typedoc-plugin-markdown
{
"entryPoints": ["src/index.ts"],
"out": "docs/api",
"theme": "markdown",
"excludePrivate": true,
"readme": "README.md"
}
/**
* 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
}
}
# 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?
name: 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
{
"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.
/**
* 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
}
/**
* Validates email addresses using RFC 5322 specification
*
* @param email - Email address to validate
* @returns True if email format is valid
*
* @example
* ```typescript
* isValidEmail('[email protected]'); // 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);
}
/**
* 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 locationsdevelopment
Provides security review capability for TypeScript/Node.js applications, validates code against XSS, injection, CSRF, JWT/OAuth2 flaws, dependency CVEs, and secrets exposure. Use when performing security audits, before deployment, reviewing authentication/authorization implementations, or ensuring OWASP compliance for Express, NestJS, and Next.js. Triggers on "security review", "check for security issues", "TypeScript security audit".
development
Provides final code cleanup after task review approval. Removes debug logs, temporary comments, dead code, optimizes imports, and improves readability. Use when asked to clean up code, polish, finalize, tidy up, remove technical debt, or prepare code for completion after review. Not for refactoring logic or fixing bugs—focused solely on cosmetic and hygiene cleanup.
tools
Ralph Wiggum-inspired automation loop for specification-driven development. Orchestrates task implementation, review, cleanup, and synchronization using a Python script. Use when: user runs /loop command, user asks to automate task implementation, user wants to iterate through spec tasks step-by-step, or user wants to run development workflow automation with context window management. One step per invocation. State machine: init → choose_task → implementation → review → fix → cleanup → sync → update_done. Supports --from-task and --to-task for task range filtering. State persisted in fix_plan.json.
testing
Creates, updates, validates, and displays the architectural DNA of a project through two shared documents: docs/specs/architecture.md (technology stack, architectural rules, security constraints, AI guardrails) and docs/specs/ontology.md (domain glossary / Ubiquitous Language). Use BEFORE brainstorm as a project setup step, or at any point in the SDD lifecycle to validate specs/tasks against architecture principles. Triggers on 'create constitution', 'update constitution', 'constitution check', 'validate against constitution', 'project principles', 'architectural guardrails', 'setup project architecture', 'define ontology'.