Skip to main content

Cyberstrike is now open source! AI-powered penetration testing for security professionals. Star on GitHub

カスタムエージェント

独自のシステムプロンプト、モデル、権限を持つカスタムエージェントを作成します。エージェントはYAMLフロントマターを含むMarkdownファイルです。

📸 SCREENSHOT: custom-agent-config.png

カスタムエージェント設定ファイル

ファイルと配置場所

カスタムエージェントは、任意の .cyberstrike/ フォルダー(プロジェクトまたは ~/.cyberstrike/)内の agent/ または agents/ ディレクトリに置かれた *.md ファイルです。エージェントのIDはファイル名です。

.cyberstrike/
└── agents/
├── api-security.md
└── compliance-audit.md

フロントマター

.cyberstrike/agents/api-security.md
---
description: Specialized agent for REST and GraphQL API testing
mode: primary
model: anthropic/claude-sonnet-4-20250514
permission:
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 …

本文(フロントマターの後)がシステムプロンプトになります。

フィールド型説明
descriptionstringエージェントの用途
modeprimary | subagent | allprimary エージェントは直接実行可能。subagent エージェントはタスクツール経由で委任される
modelstringprovider/model のオーバーライド
temperature, top_pnumberサンプリング制御
stepsnumberエージェントの最大反復回数
colorstring16進数またはテーマカラー
permissionobjectツールごとの権限(権限を参照)
hidden, disablebooleanピッカーから非表示 / 無効化

Caution

permission フィールドでツールを制限してください。旧 tools: マップは非推奨であり、allowedCommands フィールドはありません — コマンド制限は permission.bash のglobルール(例:bash: { "nmap *": "allow" })です。

プライマリ vs サブエージェント

プライマリエージェントのみが --agent や default_agent で選択できます。エージェントを直接実行可能にしたい場合は mode: primary を設定してください。それ以外の場合は、cyberstrike エージェントが委任できるサブエージェントとして動作します。

---
description: Read-only auditor
mode: primary
permission:
edit: deny
bash: deny
read: allow
glob: allow
grep: allow
---
You are a read-only security auditor …

カスタムエージェントの使用

プライマリエージェントになったら、選択します:

Terminal window
cyberstrike --agent api-security

または cyberstrike.json でデフォルトとして設定します:

{
"default_agent": "api-security"
}

TUIで /agents を使ってエージェントを閲覧できます。

ベストプラクティス

  1. 焦点を絞ったスコープ — エージェントごとに1つの明確な目的。
  2. 最小権限 — permission でエージェントに必要なツールのみを許可。
  3. 明確なプロンプト — 方法論と出力形式を具体的に記述。
  4. バージョン管理 — .cyberstrike/agents/ をプロジェクトとともにコミット。

関連ドキュメント