Create Agentのロゴ

Create Agent

コミュニティ
franky47
create-agent

Guide for creating custom OpenCode agents using markdown files with YAML frontmatter

概要

公開者franky47
リポジトリdotfiles
スキル名create-agent
スター
28
フォーク
1
同梱ファイル
1
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/franky47/dotfiles.git /tmp/dotfiles
mkdir -p .claude/skills
cp -r /tmp/dotfiles/dot-config/opencode/skills/create-agent .claude/skills/create-agent
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Create Agent

Create custom OpenCode agents using markdown files with YAML frontmatter - the preferred method for readability and version control.

Markdown Format (Recommended)

Create ~/.config/opencode/agents/my-agent.md:

markdown
---
description: What this agent does
mode: subagent | primary
temperature: 0.3
permission:
  edit: deny
---

System prompt here...

File locations:

  • Global: ~/.config/opencode/agents/*.md
  • Project: .opencode/agents/*.md

Key Configuration

OptionDescriptionExample
descriptionWhen to use this agent (required)"Code reviewer"
modeprimary (Tab-switchable) or subagent (@mention)subagent
permissionTool access control: allow, ask, or denyedit: deny
temperature0.0-1.0 (lower=focused)0.3

Common Patterns

Read-Only Research Agent

markdown
---
description: Research assistant with web access
mode: subagent
permission:
  read: allow
  webfetch: allow
  websearch: allow
  edit: deny
  bash: deny
---

Restricted Primary Agent

markdown
---
description: Planning mode without file changes
mode: primary
permission:
  read: allow
  edit: deny
  bash: deny
---

Code Review Subagent

markdown
---
description: Reviews code for quality and best practices
mode: subagent
permission:
  read: allow
  grep: allow
  glob: allow
  edit: deny
  bash:
    '*': ask
    'git *': allow
---

Prompt Design

Effective prompts include:

  1. Clear role: "You are a..."
  2. Responsibilities: "Your tasks are..."
  3. Constraints: "You MUST NOT..."
  4. Output format: "Structure responses as..."
  5. Examples: 1-2 sample interactions
  6. Tone guidelines: "Be concise and professional."

Tool Reference

Common permissions to configure:

  • read / grep / glob - Code exploration
  • edit / bash - File operations (deny for safety)
  • webfetch / websearch - Internet access
  • task - Invoking other subagents
  • question - Interactive user prompts

Use allow, ask, or deny values. Use object syntax for granular control:

yaml
permission:
  bash:
    '*': ask
    'git status': allow
    'rm *': deny

Permissions

Control approvals in YAML:

yaml
permission:
  edit: ask # Prompt before edit
  bash:
    '*': ask # Ask all commands
    'git status': allow # Except git status

Permission Key for File Writes

Important: The edit key controls ALL file modification tools: edit, write, patch, and multiedit. There is no separate write: key — it is silently ignored if present. Always use edit: to restrict file writes.

Wildcard Path Patterns

Gotcha: ** is NOT a true globstar — it requires a literal / separator to work. Use *.md for files directly inside a directory; use **/*.md only when files are guaranteed to be in subdirectories.

yaml
permission:
  edit:
    "*": deny
    "~/.config/opencode/memory/*.md": allow    # correct — files directly in memory/
    # "~/.config/opencode/memory/**/*.md": allow  # WRONG — never matches flat files

Rule Evaluation Order

Last matching rule wins. Always put the "*" catch-all first, specific overrides after:

yaml
permission:
  edit:
    "*": deny            # catch-all first
    "~/safe/subdir/*.md": allow   # specific override last — this wins for matching paths
  bash:
    "*": ask             # catch-all first
    "git status": allow  # specific override last

external_directory and edit: Are Independent

Gotcha: external_directory only gates access to out-of-project paths. The edit: permission rules still run independently on top. You must configure both for agents that write to paths outside the project.

yaml
permission:
  external_directory:
    "~/.config/opencode": allow      # gates out-of-project access
  edit:
    "*": deny
    "~/.config/opencode/memory/*.md": allow  # still required — edit rules apply independently

Best Practices

  • Start restrictive: Read-only by default
  • Use edit: deny to block all file writes (not write: deny — that key doesn't exist)
  • Use *.md not **/*.md for files directly inside a directory
  • Configure both external_directory and edit: when writing outside the project root
  • Specific descriptions: Help model know when to invoke
  • Test incrementally: Verify tool access works
  • Iterate: Refine prompts based on usage

Full Example

markdown
---
description: Security auditor that identifies vulnerabilities
mode: subagent
temperature: 0.2
permission:
  read: allow
  grep: allow
  glob: allow
  edit: deny
  bash: deny
---

You are a security auditor. Focus on:

- Input validation vulnerabilities
- Authentication flaws
- Data exposure risks
- Dependency vulnerabilities

Provide specific recommendations with code examples.
Never modify files - only report findings.

References

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Create Agent」では何ができますか?

Guide for creating custom OpenCode agents using markdown files with YAML frontmatter

TypingMindでCreate Agentを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/franky47/dotfiles/tree/main/dot-config/opencode/skills/create-agentを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Create Agentを使えるAIモデルはどれですか?

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

Create Agentは何個のAIモデルで使えますか?

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

AIスキル「Create Agent」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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