1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Agent Skills を Dify Plugin に変換するツールを作った

1
Posted at

Dify の次期アップデートの 1.14.0 では Agent Skills が使えるようになります。

が、現行バージョンでも Agent Skills を使いたいので、 Dify Plugin に変換するツールを作りました。

Convert Agent Skill to Dify tool plugin (requires dify CLI https://docs.dify.ai/en/develop-plugin/getting-started/cli)

こんな感じで plugin に変換してくれます。

$ ./agent-skill-to-dify-plugin.js skills/tomoasleep-pr-style/
2026/03/31 22:46:02 INFO plugin packaged successfully output_path=tomoasleep-pr-style.difypkg
Generated plugin: ./plugins/tomoasleep-pr-style
Generated package: ./tomoasleep-pr-style.difypkg

あとはこれを生成した plugin ファイルを Dify にアップロードすればインストールできます。

image.png

image.png

どんな感じで変換してるか

そもそも Coding Agent が Agent Skills をどう扱えるようにしているかというと、Skill を指定して読み込む Tool として実装されていることが多いです。

たとえば OpenCode の場合は skill tool という形で実装されています。

  • skill tool の説明文内に skill の一覧 (name と description) を含める
  • skill tool で読みたい skill の名前を入れると SKILL.md の中身と、 skill ディレクトリ内のファイルリストを返す

という感じになってます。 references などは read tool など、 Agent 組み込みのファイル読み込みツールで読む感じです。

これを Dify 上で再現するために Plugin として、2つの Tool を提供するようにしました。

  • Load Skill で SKILL.md 相当の内容とファイルリストを返す
  • Read Skill Resource で skill ディレクトリ内のファイルを個別に読み込み
  • (※ scripts の実行とかは対応してません。 Dify の現バージョン的に再現が難しいので…)

image.png

仕組みがわかってしまえば簡単ですね。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?