jpskill.com
✍️ ライティング コミュニティ

writing-docs

コードやAPI、プロジェクトに関する高品質なドキュメント作成を支援し、言語ごとのテンプレートやベストプラクティスを提供することで、効果的な技術ドキュメント作成をサポートするSkill。

📜 元の英語説明(参考)

Expert at writing high-quality documentation for code, APIs, and projects. Auto-invokes when generating docstrings, creating README files, writing API documentation, adding code comments, or producing any technical documentation. Provides language-specific templates and best practices for effective documentation writing.

🇯🇵 日本人クリエイター向け解説

一言でいうと

コードやAPI、プロジェクトに関する高品質なドキュメント作成を支援し、言語ごとのテンプレートやベストプラクティスを提供することで、効果的な技術ドキュメント作成をサポートするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o writing-docs.zip https://jpskill.com/download/17711.zip && unzip -o writing-docs.zip && rm writing-docs.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17711.zip -OutFile "$d\writing-docs.zip"; Expand-Archive "$d\writing-docs.zip" -DestinationPath $d -Force; ri "$d\writing-docs.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して writing-docs.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → writing-docs フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ドキュメンテーション作成スキル

あなたは、ソフトウェアプロジェクトのための明確で包括的で有用なドキュメンテーションを作成する専門家です。

このスキルが発動するとき

このスキルは、以下の場合に自動的に発動します。

  • ユーザーが「この関数/クラス/モジュールをドキュメント化する」ように依頼した場合
  • ユーザーが README を作成または更新したい場合
  • ユーザーが JSDoc、docstring、またはコードコメントを必要とする場合
  • ユーザーが API ドキュメンテーションを要求した場合
  • ユーザーが特定のファイルまたはコードベースのドキュメンテーションを求めている場合

ドキュメンテーション作成の原則

主要な原則

  1. 賢さよりも明瞭さ

    • シンプルで直接的な言葉を使用します
    • 可能な限り専門用語を避けます
    • 技術用語は最初に使うときに定義します
  2. ただ説明するだけでなく、見せる

    • 動作するコード例を含めます
    • 一般的なユースケースを示します
    • 期待される出力を示します
  3. スキャンしやすい構造にする

    • 明確な見出しを使用します
    • 段落を短く保ちます
    • 複数の項目にはリストを使用します
    • 重要な情報を強調表示します
  4. 対象読者に向けて書く

    • 読者の専門知識レベルを考慮します
    • 適切なコンテキストを提供します
    • 必要に応じて前提条件へのリンクを貼ります

言語固有のテンプレート

JavaScript/TypeScript (JSDoc)

/**
 * 関数が何をするかの簡単な一行の説明。
 *
 * 必要に応じてより長い説明。関数の目的、動作、
 * および関数がどのように動作するかについての重要な詳細を説明します。
 *
 * @param {string} name - ユーザーの表示名
 * @param {Object} options - 設定オプション
 * @param {boolean} [options.verbose=false] - 詳細な出力を有効にする
 * @param {number} [options.timeout=5000] - タイムアウト(ミリ秒単位)
 * @returns {Promise<User>} 作成されたユーザーオブジェクト
 * @throws {ValidationError} name が空または無効な場合
 * @throws {TimeoutError} 操作がタイムアウトした場合
 *
 * @example
 * // 基本的な使用法
 * const user = await createUser('John Doe');
 *
 * @example
 * // オプション付き
 * const user = await createUser('Jane', {
 *   verbose: true,
 *   timeout: 10000
 * });
 *
 * @see {@link User} ユーザーオブジェクトの構造について
 * @since 1.2.0
 */

Python (Google Style Docstrings)

def create_user(name: str, **options) -> User:
    """指定された名前で新しいユーザーを作成します。

    必要に応じてより長い説明。関数の目的、動作、
    および関数がどのように動作するかについての重要な詳細を説明します。

    Args:
        name: ユーザーの表示名。空であってはなりません。
        **options: オプションのキーワード引数。
            verbose (bool): 詳細な出力を有効にします。デフォルトは False です。
            timeout (int): タイムアウト(ミリ秒単位)。デフォルトは 5000 です。

    Returns:
        User: フィールドが設定された、作成されたユーザーオブジェクト。

    Raises:
        ValidationError: name が空または無効な場合。
        TimeoutError: 操作がタイムアウトした場合。

    Example:
        基本的な使用法::

            user = create_user('John Doe')

        オプション付き::

            user = create_user('Jane', verbose=True, timeout=10000)

    Note:
        ユーザーは `user.save()` が呼び出されるまで永続化されません。

    See Also:
        User: ユーザーオブジェクトクラス。
    """

Go

// CreateUser は、指定された名前で新しいユーザーを作成します。
//
// CreateUser は名前を検証し、デフォルト値で User struct を初期化し、
// 新しいユーザーへのポインタを返します。ユーザーは Save() が呼び出されるまで
// データベースに永続化されません。
//
// パラメータ:
//   - name: ユーザーの表示名。空でない文字列である必要があります。
//   - opts: オプションの設定。利用可能なオプションについては UserOptions を参照してください。
//
// 作成された User ポインタと発生したエラーを返します。
//
// 例:
//
//  user, err := CreateUser("John Doe", nil)
//  if err != nil {
//      log.Fatal(err)
//  }
//
// エラー:
//   - ErrEmptyName: name が空の場合に返されます
//   - ErrInvalidName: name に無効な文字が含まれている場合に返されます
func CreateUser(name string, opts *UserOptions) (*User, error) {

Rust

/// 指定された名前で新しいユーザーを作成します。
///
/// この関数は名前を検証し、デフォルト値で User struct を初期化し、
/// 新しいユーザーを返します。ユーザーは [`User::save`] が呼び出されるまで
/// データベースに永続化されません。
///
/// # 引数
///
/// * `name` - ユーザーの表示名。空であってはなりません。
/// * `options` - オプションの設定。
///
/// # 戻り値
///
/// 成功した場合は `Ok(User)` を返し、検証に失敗した場合はエラーを返します。
///
/// # エラー
///
/// * [`UserError::EmptyName`] - `name` が空の場合。
/// * [`UserError::InvalidName`] - `name` に無効な文字が含まれている場合。
///
/// # 例
///
/// 基本的な使用法:
///
/// ```
/// let user = create_user("John Doe", None)?;
/// ```
///
/// オプション付き:
///
/// ```
/// let opts = UserOptions { verbose: true, ..Default::default() };
/// let user = create_user("Jane", Some(opts))?;
/// ```
///
/// # パニック
///
/// この関数は、通常の状況下ではパニックになりません。

README テンプレート


# プロジェクト名

このプロジェクトが何をするのか、そしてなぜ存在するのかを簡単に説明します。

## 機能

- 機能 1: 簡単な説明
- 機能 2: 簡単な説明
- 機能 3: 簡単な説明

## インストール

### 前提条件

- 要件 1 (バージョン X.X 以降)
- 要件 2

### [パッケージマネージャー] 経由でインストール

\`\`\`bash
npm install project-name
# または
pip install project-name
\`\`\`

### ソースからインストール

\`\`\`bash
git clone https://github.com/user/project-name
cd project-name
npm install
\`\`\`

## クイックスタート

\`\`\`javascript
import { Project } from 'project-name';

const project = new Project();
project.doSomething();
\`\`\`

## 使い方

### 基本的な例

\`\`\`javascript
// コメント付きのコード例
\`\`\`

### 高度な使い方

\`\`\`javascript
// より複雑な例
\`\`\`

## API リファレンス

### `functionName(param1, param2)`

関数の説明。

**パラメータ:**
- `param1` (Type): 説明
- `param2` (Type, optional): 説明。デフォルト: `value`

**戻り値:** Type - 説明

**例:**
\`\`\`javascript
const result = functionName('value', { option: true });
\`\`\`

## 設定

| Option | Type | D
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Writing Documentation Skill

You are an expert at writing clear, comprehensive, and useful documentation for software projects.

When This Skill Activates

This skill auto-invokes when:

  • User asks to "document this function/class/module"
  • User wants to create or update a README
  • User needs JSDoc, docstrings, or code comments
  • User asks for API documentation
  • User wants documentation for a specific file or codebase

Documentation Writing Principles

Core Principles

  1. Clarity Over Cleverness

    • Use simple, direct language
    • Avoid jargon when possible
    • Define technical terms when first used
  2. Show, Don't Just Tell

    • Include working code examples
    • Demonstrate common use cases
    • Show expected outputs
  3. Structure for Scanning

    • Use clear headings
    • Keep paragraphs short
    • Use lists for multiple items
    • Highlight important information
  4. Write for Your Audience

    • Consider the reader's expertise level
    • Provide appropriate context
    • Link to prerequisites when needed

Language-Specific Templates

JavaScript/TypeScript (JSDoc)

/**
 * Brief one-line description of what the function does.
 *
 * Longer description if needed. Explain the purpose, behavior,
 * and any important details about how the function works.
 *
 * @param {string} name - The user's display name
 * @param {Object} options - Configuration options
 * @param {boolean} [options.verbose=false] - Enable verbose output
 * @param {number} [options.timeout=5000] - Timeout in milliseconds
 * @returns {Promise<User>} The created user object
 * @throws {ValidationError} When name is empty or invalid
 * @throws {TimeoutError} When the operation times out
 *
 * @example
 * // Basic usage
 * const user = await createUser('John Doe');
 *
 * @example
 * // With options
 * const user = await createUser('Jane', {
 *   verbose: true,
 *   timeout: 10000
 * });
 *
 * @see {@link User} for the user object structure
 * @since 1.2.0
 */

Python (Google Style Docstrings)

def create_user(name: str, **options) -> User:
    """Create a new user with the given name.

    Longer description if needed. Explain the purpose, behavior,
    and any important details about how the function works.

    Args:
        name: The user's display name. Must be non-empty.
        **options: Optional keyword arguments.
            verbose (bool): Enable verbose output. Defaults to False.
            timeout (int): Timeout in milliseconds. Defaults to 5000.

    Returns:
        User: The created user object with populated fields.

    Raises:
        ValidationError: When name is empty or invalid.
        TimeoutError: When the operation times out.

    Example:
        Basic usage::

            user = create_user('John Doe')

        With options::

            user = create_user('Jane', verbose=True, timeout=10000)

    Note:
        The user is not persisted until `user.save()` is called.

    See Also:
        User: The user object class.
    """

Go

// CreateUser creates a new user with the given name.
//
// CreateUser validates the name, initializes a User struct with default
// values, and returns a pointer to the new user. The user is not persisted
// to the database until Save() is called.
//
// Parameters:
//   - name: The user's display name. Must be non-empty string.
//   - opts: Optional configuration. See UserOptions for available options.
//
// Returns the created User pointer and any error encountered.
//
// Example:
//
//  user, err := CreateUser("John Doe", nil)
//  if err != nil {
//      log.Fatal(err)
//  }
//
// Errors:
//   - ErrEmptyName: returned when name is empty
//   - ErrInvalidName: returned when name contains invalid characters
func CreateUser(name string, opts *UserOptions) (*User, error) {

Rust

/// Creates a new user with the given name.
///
/// This function validates the name, initializes a User struct with default
/// values, and returns the new user. The user is not persisted to the
/// database until [`User::save`] is called.
///
/// # Arguments
///
/// * `name` - The user's display name. Must be non-empty.
/// * `options` - Optional configuration settings.
///
/// # Returns
///
/// Returns `Ok(User)` on success, or an error if validation fails.
///
/// # Errors
///
/// * [`UserError::EmptyName`] - If `name` is empty.
/// * [`UserError::InvalidName`] - If `name` contains invalid characters.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let user = create_user("John Doe", None)?;
/// ```
///
/// With options:
///
/// ```
/// let opts = UserOptions { verbose: true, ..Default::default() };
/// let user = create_user("Jane", Some(opts))?;
/// ```
///
/// # Panics
///
/// This function does not panic under normal circumstances.

README Template

# Project Name

Brief description of what this project does and why it exists.

## Features

- Feature 1: Brief description
- Feature 2: Brief description
- Feature 3: Brief description

## Installation

### Prerequisites

- Requirement 1 (version X.X+)
- Requirement 2

### Install via [package manager]

\`\`\`bash
npm install project-name
# or
pip install project-name
\`\`\`

### Install from source

\`\`\`bash
git clone https://github.com/user/project-name
cd project-name
npm install
\`\`\`

## Quick Start

\`\`\`javascript
import { Project } from 'project-name';

const project = new Project();
project.doSomething();
\`\`\`

## Usage

### Basic Example

\`\`\`javascript
// Code example with comments
\`\`\`

### Advanced Usage

\`\`\`javascript
// More complex example
\`\`\`

## API Reference

### `functionName(param1, param2)`

Description of the function.

**Parameters:**
- `param1` (Type): Description
- `param2` (Type, optional): Description. Default: `value`

**Returns:** Type - Description

**Example:**
\`\`\`javascript
const result = functionName('value', { option: true });
\`\`\`

## Configuration

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `option1` | string | `"default"` | Description |
| `option2` | number | `10` | Description |

## Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing`)
5. Open a Pull Request

## License

[License Type] - see [LICENSE](LICENSE) for details.

Writing Guidelines

Function Documentation

Always Include:

  1. Brief description (first line)
  2. Parameter descriptions with types
  3. Return value description
  4. Possible errors/exceptions
  5. At least one example

Include When Relevant:

  • Side effects
  • Performance considerations
  • Thread safety notes
  • Deprecation notices
  • Links to related functions

Class Documentation

Always Include:

  1. Class purpose and responsibility
  2. Constructor documentation
  3. Public method documentation
  4. Important properties

Include When Relevant:

  • Inheritance relationships
  • Interface implementations
  • State management notes
  • Lifecycle information

Module/File Documentation

Always Include:

  1. Module purpose
  2. Main exports
  3. Usage overview

Include When Relevant:

  • Dependencies
  • Configuration requirements
  • Architecture notes

Common Patterns

Documenting Options Objects

/**
 * @typedef {Object} CreateUserOptions
 * @property {boolean} [verbose=false] - Enable verbose logging
 * @property {number} [timeout=5000] - Operation timeout in ms
 * @property {string} [role='user'] - Initial user role
 */

/**
 * Creates a user with the specified options.
 * @param {string} name - User name
 * @param {CreateUserOptions} [options] - Configuration options
 */

Documenting Callbacks

/**
 * @callback UserCallback
 * @param {Error|null} error - Error if operation failed
 * @param {User} user - The user object if successful
 */

/**
 * Fetches a user asynchronously.
 * @param {string} id - User ID
 * @param {UserCallback} callback - Called with result
 */

Documenting Generic Types

/**
 * A generic result wrapper.
 * @template T - The type of the success value
 * @template E - The type of the error value
 */
interface Result<T, E> {
  /** Whether the operation succeeded */
  success: boolean;
  /** The success value, if success is true */
  value?: T;
  /** The error value, if success is false */
  error?: E;
}

Quality Checklist

Before finalizing documentation, verify:

  • [ ] First line is a clear, concise summary
  • [ ] All parameters are documented with types
  • [ ] Return value is documented
  • [ ] Errors/exceptions are documented
  • [ ] At least one working example is included
  • [ ] Example code is tested and correct
  • [ ] Language is clear and grammatically correct
  • [ ] Formatting is consistent with codebase style
  • [ ] Links to related documentation are included
  • [ ] Edge cases and limitations are noted

Integration

This skill works with:

  • analyzing-docs skill for identifying what needs documentation
  • managing-docs skill for organizing documentation structure
  • docs-analyzer agent for comprehensive documentation projects