Battleprintのロゴ

Battleprint

組織
AI-ModCon
battleprint

Perform red and blue team adversarial analysis on AI systems. Use after ai-fingerprint to identify attack vectors and defense strategies for LLM/RAG/Agentic systems.

概要

公開者AI-ModCon
リポジトリgenesis-skills
スキル名battleprint
スター
37
フォーク
16
同梱ファイル
6
ライセンスBSD-2-Clause
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 6個の同梱ファイル

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

Battleprint - Agentic Execution of Red and Blue Team Security Analysis

You are executing the Battleprint skill. This performs a red and blue team adversarial analysis sequence.

Architecture Overview

This skill is a prompt-first architecture where YOU (Claude Code) handle all reasoning and analysis, while Python utilities provide fast data operations (file scanning, use of ai-fingerprint skill and its results).

Your Task

Execute a 4-stage analysis process that produces:

  1. Red Stage 1: Complete red team analysis of the target code base
  2. Blue Stage 1: Complete blue team analysis of the target code base
  3. Red Stage 2: Utilizes Blue Team's analysis to refine red team's attack plans
  4. Blue Stage 2: Utilizes Red Team's analysis to refine blue team's defense plans

Arguments

The user provides a target directory path.

Expected format: <target_dir>

Examples:

  • ./my-app — analyze my-app directory
  • /bob/fish — analyze absolute path

Required Skills

  • ai-fingerprint: Generates file_scan.json and system_analysis.json for the same target directory
    • Run it first so this skill can reuse its outputs.
    • Output location: <parent>/ai_fingerprint_results/<target_name>/

Execution Steps

EXECUTION GUIDE - APPLIES TO ALL PHASES AND STEPS

When executing bash or unix (e.g. ls, wc, cd, etc.) commands, never ever string them together into a single command.

  • Never use &&
  • Never use ||
  • Never use compound statements, ever
  • Always execute a bash command one at a time.
  • Always execute a unix command one-at-a-time, never compound them.

When generating JSON, never ever output it directly. Always write python code that generates the json

  • Never generate JSON directly, it's too difficult.
  • Always write the python code that generates the JSON.
  • Always use python code generator to generate JSON.
  • Always use python validation code, to read and confirm JSON was generated properly.
  • Take your time. Generate Python to output JSON. Generate Python to Validate JSON.

Phase 0: Setup and Check for AI-FingerPrint

Parse and set paths:

bash
# Get absolute path of target
TARGET_DIR=$(cd "$target_dir" && pwd)
TARGET_BASE=$(dirname "$TARGET_DIR")
TARGET_NAME=$(basename "$TARGET_DIR")

# Fingerprint results location (alongside target)
FINGERPRINT_DIR="${TARGET_BASE}/ai_fingerprint_results/${TARGET_NAME}"

# Battleprint output location (alongside target)
OUTPUT_DIR="${TARGET_BASE}/battleprint_results/${TARGET_NAME}"
mkdir -p "$OUTPUT_DIR"

All subsequent references to paths use these variables.

Verify fingerprint exists:

  1. Check if $FINGERPRINT_DIR/system_analysis.json exists
  2. If it does NOT exist, invoke the ai-fingerprint skill with $TARGET_DIR as argument. Use a SEPARATE AGENT (via Agent tool) for this to prevent context bleed.
  3. Read $FINGERPRINT_DIR/file_scan.json and $FINGERPRINT_DIR/system_analysis.json into the current context.

Phase 1: Stage 1 Red and Blue

Objective: Perform Red Team and Blue Team Analysis on the target directory.

Process:

  1. Read the file scan results:
bash
cat "$FINGERPRINT_DIR/file_scan.json"
  1. Read the system analysis results:
bash
cat "$FINGERPRINT_DIR/system_analysis.json"
  1. Parallel Execute 2 Agents

    Use the Agent tool to spawn two agents in parallel. Each Agent invocation is automatically in fresh context.

    a. Red Team Agent - use prompts/red_team_stage1.md with the fingerprint data b. Blue Team Agent - use prompts/blue_team_stage1.md with the fingerprint data

    Each agent should write its output to:

    • Red: $OUTPUT_DIR/red_stage_1.json
    • Blue: $OUTPUT_DIR/blue_stage_1.json
  2. Verify Stage 1 Complete

Use Python's built-in JSON parser to check validity:

bash
python3 -c "import json; json.load(open('$OUTPUT_DIR/red_stage_1.json'))" && echo "✓ Valid JSON" || echo "✗ Invalid JSON"

and

bash
python3 -c "import json; json.load(open('$OUTPUT_DIR/blue_stage_1.json'))" && echo "✓ Valid JSON" || echo "✗ Invalid JSON"

Phase 2: Stage 2 Red and Blue

Objective: Perform a second pass Red and Blue Team Analysis on the target directory.

Note: Each Agent tool invocation automatically runs in fresh context - no special action needed.

Red Team Agent (Stage 2)

  1. Read the file scan results:
bash
cat "$FINGERPRINT_DIR/file_scan.json"
  1. Read the system analysis results:
bash
cat "$FINGERPRINT_DIR/system_analysis.json"
  1. Read blue team's plans:
bash
cat "$OUTPUT_DIR/blue_stage_1.json"
  1. Execute Red Team Stage 2

    Use Agent tool with prompts/red_team_stage2.md and the above context.

    Write output to: $OUTPUT_DIR/red_stage_2.json

  2. Verify Stage 2 Complete

bash
python3 -c "import json; json.load(open('$OUTPUT_DIR/red_stage_2.json'))" && echo "✓ Valid JSON" || echo "✗ Invalid JSON"

Blue Team Agent (Stage 2)

  1. Read the file scan results:
bash
cat "$FINGERPRINT_DIR/file_scan.json"
  1. Read the system analysis results:
bash
cat "$FINGERPRINT_DIR/system_analysis.json"
  1. Read red team's plans:
bash
cat "$OUTPUT_DIR/red_stage_1.json"
  1. Execute Blue Team Stage 2

    Use Agent tool with prompts/blue_team_stage2.md and the above context.

    Write output to: $OUTPUT_DIR/blue_stage_2.json

  2. Verify Stage 2 Complete

bash
python3 -c "import json; json.load(open('$OUTPUT_DIR/blue_stage_2.json'))" && echo "✓ Valid JSON" || echo "✗ Invalid JSON"

Phase 3: Synthesis

Perform synthesis and provide final results:

  1. Output a final_analysis.json with the top 8 exploits found in red_team 2. Did blue_team 2 have an answer for these?
  2. Provide an analysis of the efficacy of this battleprint algorithm: a. Did the blue team improve from stage 1 to stage 2 (i.e. did it utilize the knowledge it gained by reading red team plans and improve its defenses against these?). If so, how? b. Did the red team improve from stage 1 to stage 2? If so, how?
  3. Provide final recommendations (top 3) for the engineering team to address. When providing these top 3, be sure to utilize the system analysis to note which AI System and sub-system are most affected.
  4. Provide a weakness indicator for each element in the strand. Use relative weakness (i.e. element with the highest relative weakness gets a 10, element with no relative weakness gets a 0).

All output should be in 2 forms:

  1. JSON file: $OUTPUT_DIR/final_analysis.json (enables downstream processing)
  2. Markdown file: $OUTPUT_DIR/final_analysis.md (allows for easy readability)

Output location: Results are saved alongside the target directory at: <parent_of_target>/battleprint_results/<target_name>/

同梱ファイル

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

よくある質問

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

Perform red and blue team adversarial analysis on AI systems. Use after ai-fingerprint to identify attack vectors and defense strategies for LLM/RAG/Agentic systems.

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

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

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

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

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

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

Battleprintで使えるAIモデルの数に制限はありますか?

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

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

はい。AI-ModConがBSD-2-ClauseライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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