Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问clear审计通过

typescript-docsTypeScript 文档

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

588

周安装

25

GitHub Stars

217

下载量

206
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:typescript-docs(TypeScript 文档)
来源仓库:https://github.com/giuseppe-trisciuoglio/developer-kit-claude-code
仓库路径:skills/typescript-docs
安装命令:
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit-claude-code --skill typescript-docs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit-claude-code --skill typescript-docs

简介

用于辅助 TypeScript 项目的类型定义与文档生成。

  • 适合维护接口契约、泛型约束与 JSDoc 注释规范。
  • 使用时需结合编译配置与 IDE 支持确保类型安全。
  • 避免过度复杂化类型声明影响可读性与维护成本。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • typescript-docs 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

TypeScript Documentation

Generate production-ready TypeScript documentation with layered architecture for multiple audiences. Supports API docs with TypeDoc, ADRs, and framework-specific patterns.

Overview

Use JSDoc annotations for inline documentation, TypeDoc for API reference generation, and ADRs for tracking design choices.

Key capabilities:

  • TypeDoc configuration and API documentation generation
  • JSDoc patterns for all TypeScript constructs
  • ADR creation and maintenance
  • Framework-specific patterns (NestJS, React, Express, Angular, Vue)
  • ESLint validation rules for documentation quality
  • GitHub Actions pipeline setup

When to Use

Use this skill when creating API documentation, architectural decision records, code examples, or framework-specific patterns for NestJS, Express, React, Angular, or Vue.

Quick Reference

ToolPurposeCommand
TypeDocAPI documentation generationnpx typedoc
CompodocAngular documentationnpx compodoc -p tsconfig.json
ESLint JSDocDocumentation validationeslint --ext.ts src/

JSDoc Tags

TagUse Case
@paramDocument parameters
@returnsDocument return values
@throwsDocument error conditions
@exampleProvide code examples
@remarksAdd implementation notes
@seeCross-reference related items
@deprecatedMark deprecated APIs

Instructions

1. Configure TypeDoc

npm install --save-dev typedoc typedoc-plugin-markdown
{
  "entryPoints": ["src/index.ts"],
  "out": "docs/api",
  "theme": "markdown",
  "excludePrivate": true,
  "readme": "README.md"
}

2. Add JSDoc Comments

/**
 * 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
  }
}

3. Create an ADR

# 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?

4. Set Up CI/CD Pipeline

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

5. Validate Documentation

{
  "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.

Examples

Documenting a React Hook

/**
 * 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
}

Documenting a Utility Function

/**
 * 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);
}

NestJS Controller Documentation

/**
 * 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
  }
}

Best Practices

  1. Document Public APIs: All public methods, classes, and interfaces
  2. Use @example: Provide runnable examples for complex functions
  3. Include @throws: Document all possible errors
  4. Add @see: Cross-reference related functions/types
  5. Use @remarks: Add implementation details and notes
  6. Document Generics: Explain generic constraints and usage
  7. Include Performance Notes: Document time/space complexity
  8. Add Security Warnings: Highlight security considerations
  9. Keep Updated: Update docs when code changes
  10. Don't document obvious code: Focus on why, not what

Constraints and Warnings

  • Private Members: Use @private or exclude from TypeDoc output
  • Complex Types: Document generic constraints and type parameters
  • Breaking Changes: Use @deprecated with migration guidance
  • Security Info: Never include secrets or credentials in documentation
  • Link Validity: Ensure @see references point to valid locations
  • Example Code: All examples should be runnable and tested
  • Versioning: Keep documentation in sync with code versions

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.1%
按下载量换算62

windsurf

23.84%
按下载量换算49

trae

18.31%
按下载量换算38

OpenCode

13.72%
按下载量换算28

Cursor

8.05%
按下载量换算17

weavefox

3.78%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills