Logo di Battleprint

Battleprint

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

Panoramica

Pubblicato daAI-ModCon
Repositorygenesis-skills
Nome della skillbattleprint
Stelle
37
Fork
16
File inclusi
6
LicenzaBSD-2-Clause
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 6

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da AI-ModCon su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Battleprint in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/AI-ModCon/genesis-skills/tree/main/skills/basesafe-skills/battleprint
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Battleprint in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Battleprint non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Battleprint non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Battleprint su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Battleprint è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Battleprint in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/AI-ModCon/genesis-skills/tree/main/skills/basesafe-skills/battleprint. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Battleprint?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Battleprint?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Battleprint: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Battleprint è gratuita?

Sì. È pubblicata su GitHub da AI-ModCon con licenza BSD-2-Clause. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇