カスタムエージェント
独自のシステムプロンプト、モデル、権限を持つカスタムエージェントを作成します。エージェントはYAMLフロントマターを含むMarkdownファイルです。
📸 SCREENSHOT: custom-agent-config.png
カスタムエージェント設定ファイル
ファイルと配置場所
カスタムエージェントは、任意の .cyberstrike/ フォルダー(プロジェクトまたは ~/.cyberstrike/)内の agent/ または agents/ ディレクトリに置かれた *.md ファイルです。エージェントのIDはファイル名です。
.cyberstrike/└── agents/ ├── api-security.md └── compliance-audit.mdフロントマター
---description: Specialized agent for REST and GraphQL API testingmode: primarymodel: anthropic/claude-sonnet-4-20250514permission: bash: { "*": "ask", "rm -rf *": "deny" } edit: allow---
You are an expert API security tester specializing in REST and GraphQL APIs.Follow the OWASP API Security Top 10 …本文(フロントマターの後)がシステムプロンプトになります。
| フィールド | 型 | 説明 |
|---|---|---|
description | string | エージェントの用途 |
mode | primary | subagent | all | primary エージェントは直接実行可能。subagent エージェントはタスクツール経由で委任される |
model | string | provider/model のオーバーライド |
temperature, top_p | number | サンプリング制御 |
steps | number | エージェントの最大反復回数 |
color | string | 16進数またはテーマカラー |
permission | object | ツールごとの権限(権限を参照) |
hidden, disable | boolean | ピッカーから非表示 / 無効化 |
Caution
permission フィールドでツールを制限してください。旧 tools: マップは非推奨であり、allowedCommands フィールドはありません — コマンド制限は permission.bash のglobルール(例:bash: { "nmap *": "allow" })です。
プライマリ vs サブエージェント
プライマリエージェントのみが --agent や default_agent で選択できます。エージェントを直接実行可能にしたい場合は mode: primary を設定してください。それ以外の場合は、cyberstrike エージェントが委任できるサブエージェントとして動作します。
---description: Read-only auditormode: primarypermission: edit: deny bash: deny read: allow glob: allow grep: allow---
You are a read-only security auditor …カスタムエージェントの使用
プライマリエージェントになったら、選択します:
cyberstrike --agent api-securityまたは cyberstrike.json でデフォルトとして設定します:
{ "default_agent": "api-security"}TUIで /agents を使ってエージェントを閲覧できます。
ベストプラクティス
- 焦点を絞ったスコープ — エージェントごとに1つの明確な目的。
- 最小権限 —
permissionでエージェントに必要なツールのみを許可。 - 明確なプロンプト — 方法論と出力形式を具体的に記述。
- バージョン管理 —
.cyberstrike/agents/をプロジェクトとともにコミット。
関連ドキュメント
- セキュリティエージェント - 組み込みエージェントと委任
- 権限 -
permissionフィールド - 設定 - プロジェクトおよびグローバル設定