Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

accelint-ts-documentationAccelint ts 文档

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

3,182

周安装

130

GitHub Stars

10

下载量

1,019
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/gohypergiant/agent-skills --skill accelint-ts-documentation

简介

accelint-ts-documentation 专注于提升 JavaScript/TypeScript 项目的文档质量,涵盖 JSDoc 注释、标记规范和整体注释可读性改进。

  • 适用于需要为函数、类型、接口添加完整文档说明,或清理冗余注释、保留关键标记(如 TODO、FIXME)的场景。
  • 使用时先阅读 AGENTS.md 获取规则概览,再按需加载具体规则,避免过度修改已有事实性内容。
  • 安装命令为 npx skills add https://github.com/gohypergiant/agent-skills --skill accelint-ts-documentation,来源仓库路径为 skills/accelint-ts-documentation。
  • 建议在使用前核对项目现有文档风格,确保输出与团队约定一致,避免引入未经验证的结论。

SKILL.md

Code Documentation Skill

Comprehensive skill for improving JavaScript/TypeScript documentation, including JSDoc comments, comment markers, and general comment quality.

When to Activate This Skill

Use this skill when the task involves:

JSDoc Documentation

  • Adding JSDoc comments to exported functions, types, interfaces, or classes
  • Validating JSDoc completeness (missing @param, @returns, @template tags)
  • Ensuring JSDoc @example tags use proper code fences
  • Documenting object parameters with destructuring using dot notation

Comment Quality

  • Identifying and categorizing comments using proper markers (TODO, FIXME, HACK, NOTE, PERF, REVIEW, DEBUG, REMARK)
  • Removing unnecessary comments (commented-out code, edit history, obvious statements)
  • Preserving important comments (markers, linter directives, business logic)
  • Improving comment placement (moving end-of-line comments above code)

Documentation Audits

  • Reviewing code for documentation completeness
  • Ensuring exported code has comprehensive documentation
  • Validating internal code has minimum required documentation

When NOT to Use This Skill

Do not activate for:

  • General code quality issues (use accelint-ts-best-practices instead)
  • Performance optimization (use accelint-ts-performance instead)
  • Type safety improvements (use accelint-ts-best-practices instead)
  • Framework-specific documentation (React PropTypes, Vue props, etc.)

How to Use

1. Load References Based on Task Type

For JSDoc additions/validation:

MANDATORY: Read jsdoc.md in full before implementing. Critical content: @example code fence syntax (failures common here), object parameter dot notation, @template requirements, edge cases.

Do NOT load comments.md unless the task explicitly mentions comment markers (TODO, FIXME, etc.) or comment quality issues.

For comment quality audits:

MANDATORY: Read comments.md in full before implementing. Critical content: Comment marker standards, what to remove vs preserve, placement rules.

Do NOT load jsdoc.md unless the task explicitly mentions JSDoc tags (@param, @returns, etc.) or function/type documentation.

Do NOT load any references when only answering questions (not implementing changes) or task is general code quality.

2. Expert Judgment Framework

Apply this thinking framework before auditing:

Question 1: Who is the reader?

  • API consumers: Lack implementation context → Document comprehensively
  • Team members: Have codebase context → Document non-self-evident behaviors only
  • Future you (6 months): Will forget subtle decisions → Document rationale

Question 2: Opacity vs Complexity?

  • Opacity = Intent is hidden → Must document (e.g., cache.invalidate() - why? performance? correctness?)
  • Complexity = Implementation is intricate → Implementation comments, not JSDoc

Question 3: Maintenance cost trade-off?

  • High churn code: Minimal docs (won't stay accurate)
  • Stable API: Comprehensive docs (will stay accurate)
  • Internal utilities: Brief docs (low reader count × low frequency = minimal ROI)

Two-Tier Decision Rule

After applying the thinking framework:

Is this exported (public API)? → YES: Comprehensive documentation REQUIRED

  • All @param, @returns, @template, @throws, @example
  • Even if "obvious" - consumers lack your context

Is this internal code? → Apply judgment: Document what's NOT self-evident from:

  1. Function name and type signature
  2. Parameter names and types
  3. Standard patterns in the codebase

Rule of thumb: If a competent team member would ask "why?" or "what's the edge case?" - document it. If they'd say "obvious" - skip it.

3. Evaluating Documentation Sufficiency

Use this decision tree to determine if documentation is complete:

Step 1: Determine visibility tier

Is it exported (public API)?
  YES → Tier 1: Comprehensive documentation required
  NO  → Tier 2: Judgment-based minimal documentation

Step 2: Apply entity-specific requirements

Tier 1 (Exported) - Always Required:

  • Description (purpose, usage context, "when to use" for appropriate entities)
  • All @param with property documentation for objects
  • @returns (unless void)
  • @template with constraint explanations for generics
  • @throws with triggering conditions
  • At least one realistic @example

Tier 2 (Internal) - Judgment-Based:

  • Brief description (one line acceptable)
  • @param for non-obvious parameters only
  • @returns if non-obvious
  • @template for generics
  • @example only if behavior is complex

Entity-Specific Additions:

  • Classes (Tier 1): Constructor docs, public method docs, instantiation example
  • Types/Interfaces (Tier 1): Property descriptions for all public properties
  • Constants/Variables: Units/constraints if applicable (e.g., "milliseconds", "must be positive")

Sufficiency Checklist:

Before marking documentation as "sufficient", verify:

  • All exported items have comprehensive documentation
  • All @param tags describe what the parameter does (not just type info)
  • All @returns tags describe what is returned in different scenarios
  • All @example tags use proper code fences with language identifier
  • No @returns on void functions
  • Generic functions have @template for each type parameter
  • Object parameters use dot notation for property documentation
  • Descriptions focus on WHAT/WHY, not HOW

4. When References Are Insufficient

If you encounter scenarios not covered in references or standard patterns:

Fallback strategy:

  1. Apply the two-tier rule (export vs internal) as your foundation
  2. Prioritize clarity over completeness - better to document what you know than guess syntax
  3. Use standard JSDoc conventions from TypeScript/JSDoc official documentation
  4. Document your uncertainty with a NOTE marker: // NOTE: JSDoc syntax may need review for [specific case]
  5. If truly ambiguous, ask the user for clarification rather than making assumptions

Common uncovered scenarios:

  • Exotic TypeScript features (mapped types, conditional types, template literal types)
  • Framework-specific patterns (React hooks with generics, Vue composables)
  • Complex callback signatures with multiple overloads

For these, default to clear descriptions in natural language rather than incomplete JSDoc tags.

4. Use the Report Template (For Explicit Audit Requests)

When users explicitly request a documentation audit or invoke the skill directly (/accelint-ts-documentation <path>), use the standardized report format:

Template: assets/output-report-template.md

The audit report format provides:

  • Numbered findings with clear before/after examples
  • Categorization (Missing, Incomplete, Incorrect Syntax, Quality, Internal)
  • References to detailed guidance (jsdoc.md, comments.md)
  • Summary table for tracking all issues

When to use the audit template:

  • Skill invoked directly via /accelint-ts-documentation <path>
  • User explicitly requests "documentation audit" or "audit documentation"
  • User asks to "review all documentation" across file(s)

When NOT to use the audit template:

  • User asks to "add JSDoc to this function" (direct implementation)
  • User asks "what's wrong with this comment?" (answer the question)
  • User requests specific fixes (apply fixes directly without formal report)

Documentation Audit Anti-Patterns

When performing documentation audits, avoid these common mistakes:

❌ Incorrect: Over-documenting internal code

// Internal utility with verbose documentation
/**
 * Internal helper function that validates input
 * @internal
 * @param x - The input value
 * @returns True if valid, false otherwise
 * @example
 * ```typescript
 * if (isValid(data)) { ... }
 * ```
 */
function isValid(x: unknown): boolean {
  return x != null;
}

Why this is wrong: Internal docs rot faster than public API docs because they're adjacent to frequently-changed implementation. Team members can read the actual implementation faster than reading outdated documentation that creates confusion. Reserve comprehensive docs for stable exported APIs where consumers cannot access implementation.

✅ Correct: Minimal internal docs, comprehensive public API docs

// Internal utility - minimal documentation
/** Checks if value is not null/undefined */
function isValid(x: unknown): boolean {
  return x != null;
}

// Public API - comprehensive documentation even if "obvious"
/**
 * Validates user input data
 * @param data - User input to validate
 * @returns True if data is defined and not null
 * @example
 * ```typescript
 * if (validateInput(userData)) {
 *   processData(userData);
 * }
 * ```
 */
export function validateInput(data: unknown): boolean {
  return data != null;
}

❌ Incorrect: Documenting HOW instead of WHAT/WHY

// JSDoc describes implementation details
/**
 * Loops through array using reduce to accumulate values into a sum
 */
function sum(numbers: number[]): number {
  return numbers.reduce((a, b) => a + b, 0);
}

Why this is wrong: JSDoc appears in IDE autocomplete for API consumers who don't have access to implementation. Explaining HOW in JSDoc creates confusion ("why am I seeing implementation details in my autocomplete?") and increases refactoring surface area - every implementation change requires doc updates, leading to drift.

✅ Correct: Describe purpose and behavior, not implementation

/**
 * Calculates the sum of all numbers in the array
 * @param numbers - Array of numbers to sum
 * @returns The total sum, or 0 for empty array
 */
function sum(numbers: number[]): number {
  return numbers.reduce((a, b) => a + b, 0);
}

❌ Incorrect: Using vague comment markers

// Not actionable
// TODO: fix this
// TODO: improve performance

Why this is wrong: "TODO: fix this" creates diffusion of responsibility. After months pass, nobody knows if it's still relevant, who should fix it, or what "this" refers to. Vague markers accumulate as noise that reduces trust in ALL markers, making developers ignore even critical ones.

✅ Correct: Specific markers with ownership and context

// TODO(username): Replace with binary search for O(log n) lookup
// FIXME(username): Throws error on empty array, add guard clause

Documentation Quality Example

Excellent Public API Documentation

/**
 * Fetches user profile data from the authentication service
 *
 * Automatically retries up to 3 times on network failures with exponential
 * backoff. Throws if user is not authenticated or profile doesn't exist.
 *
 * @param userId - Unique identifier for the user profile to fetch
 * @param options - Configuration for fetch behavior
 * @param options.includeMetadata - Include account metadata (creation date, last login)
 * @param options.timeout - Request timeout in milliseconds (default: 5000)
 * @returns User profile with email, name, and optional metadata
 * @throws {AuthenticationError} When user session is expired or invalid
 * @throws {NotFoundError} When user profile doesn't exist
 * @throws {NetworkError} When all retry attempts are exhausted
 *
 * @example
 * ```typescript
 * // Basic usage
 * const profile = await fetchUserProfile('user-123');
 * console.log(profile.email);
 *
 * // With metadata and custom timeout
 * const profile = await fetchUserProfile('user-123', {
 *   includeMetadata: true,
 *   timeout: 10000
 * });
 * ```
 */
export async function fetchUserProfile(
  userId: string,
  options?: { includeMetadata?: boolean; timeout?: number }
): Promise<UserProfile> {
  // implementation
}

What makes this excellent:

  • Describes hidden behaviors (retry logic with exponential backoff)
  • Documents object parameters with dot notation (options.*)
  • @throws lists all possible errors with triggering conditions
  • @example shows both basic and advanced usage patterns
  • Mentions defaults and constraints (timeout default: 5000)
  • Focuses on WHAT/WHY (user needs), not HOW (implementation details)

Conflict Resolution Principles

When judgment calls conflict, apply these priorities:

  1. Consistency > Perfection: Follow existing codebase patterns
  2. Consumer > Maintainer: Public API docs serve users without your context - be comprehensive
  3. Intent > Implementation: Document WHAT/WHY, not HOW
  4. Stable > Churning: Comprehensive docs for stable code, minimal for high-churn code
  5. Future clarity test: "Would this help me in 6 months?" If no, remove it

Edge Cases Require Reference Loading

Complex scenarios (deprecated APIs, overloaded functions, generic utility types, callback parameters, builder patterns, event emitters) require detailed syntax guidance. When encountering these:

Load jsdoc.md reference - Contains comprehensive examples for all edge cases with correct syntax patterns.

Key principle: Edge cases still follow the two-tier rule (export vs internal), but syntax details matter more. Don't guess - load the reference.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Claude

32.67%
按下载量换算333

Codex

32.1%
按下载量换算327

Cursor

18.19%
按下载量换算185

Gemini CLI

8.86%
按下载量换算90

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills