Plugin Developmentのロゴ

Plugin Development

組織
TheBushidoCollective
plugin-development

Use when creating or modifying Han plugins. Covers plugin structure, configuration, hooks, skills, and best practices.

概要

公開者TheBushidoCollective
リポジトリhan
スキル名plugin-development
スター
195
フォーク
20
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    TheBushidoCollectiveがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルPlugin DevelopmentをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/TheBushidoCollective/han/tree/main/examples/example-jutsu-plugin/skills/plugin-development
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TheBushidoCollective/han.git /tmp/han
mkdir -p .claude/skills
cp -r /tmp/han/examples/example-jutsu-plugin/skills/plugin-development .claude/skills/plugin-development
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでPlugin Developmentを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にPlugin Developmentを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Plugin Developmentは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Han Plugin Development

This skill provides comprehensive guidance for developing Han plugins.

Plugin Types

Han supports several plugin categories:

  1. Language/Validation - Skills and validation hooks for languages/tools
  2. Discipline - Specialized agents for specific domains
  3. Service/Tool - MCP servers for external integrations

Directory Structure

Every plugin must follow this structure:

my-plugin/
├── .claude-plugin/
│   └── plugin.json      # Plugin metadata (required)
├── han-plugin.yml       # Hook configuration (optional)
├── skills/              # Skills directory (optional)
│   └── my-skill/
│       └── SKILL.md     # Skill definition
├── commands/            # Commands directory (optional)
│   └── my-command.md    # Slash command
├── hooks/               # Hook scripts (optional)
│   └── my-hook.sh       # Hook implementation
└── README.md            # Documentation

plugin.json (Required)

The plugin.json file defines metadata:

json
{
  "name": "my-plugin-name",
  "version": "1.0.0",
  "description": "What the plugin does",
  "author": {
    "name": "Author Name",
    "url": "https://author-website.com"
  },
  "license": "MIT",
  "keywords": ["keyword1", "keyword2"]
}

Required fields:

  • name - Must match directory name
  • version - Semantic versioning

han-plugin.yml (Hooks)

Define validation hooks that run at lifecycle events:

yaml
hooks:
  my-validation:
    event: Stop                    # When to run
    command: bash "hooks/my-hook.sh"
    description: What this hook does

    # Optional filters:
    if_changed:                    # Only run if these files changed
      - "**/*.ts"
    dirs_with:                     # Only run in dirs containing
      - "package.json"

Hook Events

  • Setup - Plugin installation
  • SessionStart - Session begins
  • UserPromptSubmit - User sends message
  • PreToolUse - Before tool execution
  • PostToolUse - After tool execution
  • Stop - Work completion (validation)
  • SubagentStop - Subagent completion

Hook Environment Variables

Scripts receive:

  • CLAUDE_PLUGIN_ROOT - Plugin directory path
  • HAN_SESSION_ID - Current session ID
  • HAN_PROJECT_DIR - Project directory
  • HAN_FILES - Changed files (space-separated)

Skills (SKILL.md)

Skills provide domain expertise:

markdown
---
name: skill-name
description: When to use this skill
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep]
---

# Skill Title

Skill content with guidance, examples, and best practices.

Required frontmatter:

  • name - Skill identifier
  • description - When Claude should use this skill

Commands (Slash Commands)

Commands provide slash command functionality:

markdown
---
description: What the command does
---

Command implementation content...

Invoke with: /plugin-name:command-name

Validation

Before publishing, validate your plugin:

bash
cd my-plugin
han plugin validate

This checks:

  • Required files exist
  • JSON/YAML syntax is valid
  • Frontmatter is correct
  • No misplaced files

Best Practices

Hook Scripts

  1. Use set -e - Exit on first error
  2. Quote variables - "${HAN_FILES}" not $HAN_FILES
  3. Clear error messages - Write to stderr on failure
  4. Exit codes - 0 for success, non-zero for failure

Skills

  1. Specific descriptions - Help Claude know when to use
  2. Practical examples - Show real usage patterns
  3. Progressive detail - Start simple, add complexity
  4. Troubleshooting - Include common issues

General

  1. Follow naming conventions - short names matching directory
  2. Include README - Installation and usage docs
  3. Version properly - Use semantic versioning
  4. Test locally - Install via path before publishing

Local Installation

Test your plugin locally:

bash
# Install from local path
han plugin install /path/to/my-plugin --scope project

# Or add to .claude/settings.json manually

Publishing

Share your plugin:

  1. Push to a git repository
  2. Add to the Han marketplace (optional)
  3. Users install via: han plugin install github:user/repo

Troubleshooting

Hook Not Running

  • Check event matches lifecycle point
  • Verify command path is correct
  • Check if_changed/dirs_with filters

Validation Fails

  • Run han plugin validate for specific errors
  • Check plugin.json syntax
  • Verify skill frontmatter

Skill Not Found

  • Check SKILL.md path and naming
  • Verify frontmatter has required fields
  • Skill name should match directory name

よくある質問

AIスキル「Plugin Development」では何ができますか?

Use when creating or modifying Han plugins. Covers plugin structure, configuration, hooks, skills, and best practices.

TypingMindでPlugin Developmentを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Plugin Developmentはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにPlugin Developmentをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/TheBushidoCollective/han/tree/main/examples/example-jutsu-plugin/skills/plugin-developmentを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Plugin Developmentを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Plugin Developmentは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもPlugin Developmentを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Plugin Development」は無料ですか?

TheBushidoCollectiveがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇