Logo: Battleprint

Battleprint

Organisatioun
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.

Iwwersiicht

EditeurAI-ModCon
Repositorygenesis-skills
Skill-Nummbattleprint
Stären
37
Forks
16
Matgeliwwert Dateien
6
LizenzBSD-2-Clause
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 6 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    AI-ModCon huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Battleprint an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/AI-ModCon/genesis-skills/tree/main/skills/basesafe-skills/battleprint
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Battleprint an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Battleprint automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Battleprint net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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>/

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Battleprint op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Battleprint besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Battleprint an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/AI-ModCon/genesis-skills/tree/main/skills/basesafe-skills/battleprint an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Battleprint benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Battleprint benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Battleprint domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Battleprint gratis?

Jo. AI-ModCon huet de Skill ënner der Lizenz BSD-2-Clause op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇