Logo: Ai Fingerprint

Ai Fingerprint

Organisatioun
AI-ModCon
ai-fingerprint

Generate comprehensive AI system fingerprint with architecture analysis and Strand generation. Use when analyzing AI/LLM systems for security assessment or system profiling.

Iwwersiicht

EditeurAI-ModCon
Repositorygenesis-skills
Skill-Nummai-fingerprint
Stären
37
Forks
16
Matgeliwwert Dateien
8
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.

  • 8 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 Ai Fingerprint 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/ai-fingerprint
  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/ai-fingerprint .claude/skills/ai-fingerprint
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ai Fingerprint 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 Ai Fingerprint automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Ai Fingerprint 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.

AI Fingerprint - System Analysis and Strand Generation

You are executing the AI Fingerprint skill. This performs comprehensive AI system analysis and generates a unique strand fingerprint that characterizes the system's LLM, RAG, and Agentic properties.

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, strand generation).

Your Task

Execute a 2-stage fingerprinting process that produces:

  1. System Analysis JSON: Complete architectural analysis with security-relevant details
  2. Strand Fingerprint: Compact string representation (e.g., A1ITMX-S1N4NNED-NXNNXNN)

Arguments

The user provides a target directory path and optional flags.

Expected format: <target_dir> [--output-dir <path>] [--ai-system-type <type>]

Examples:

  • ./my-app — analyze my-app with defaults
  • ./my-app --output-dir ./custom — use custom output directory
  • ./codebase --ai-system-type RAG — focus on RAG system analysis

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: Argument Parsing & Setup

Parse these arguments:

  • target_dir (required): Path to AI system codebase to analyze
  • --output-dir <path> (optional, default: derived from target)
  • --ai-system-type [LLM|RAG|Agentic|All] (optional, default: All)

Validate and set paths:

  1. Target directory exists and is readable
  2. Derive output directory location (results will be created alongside the target directory):
bash
# Get absolute path of target
TARGET_DIR=$(cd "$target_dir" && pwd)
TARGET_BASE=$(dirname "$TARGET_DIR")
TARGET_NAME=$(basename "$TARGET_DIR")

# Output alongside target: e.g., /bob/ai_fingerprint_results/fish/
OUTPUT_DIR="${TARGET_BASE}/ai_fingerprint_results/${TARGET_NAME}"
mkdir -p "$OUTPUT_DIR"

All subsequent references to <output_dir> refer to $OUTPUT_DIR.

Scan codebase:

bash
python3 scripts/ai_fingerprint.py scan "$TARGET_DIR" --output "$OUTPUT_DIR/file_scan.json"

This gives you a quick inventory of AI-related files without reading everything.


Phase 1: System Analysis

Objective: Understand the codebase architecture from a security and AI systems perspective.

Process:

  1. Read the file scan results:
bash
cat "$OUTPUT_DIR/file_scan.json"
  1. Identify key files to examine:

    • AI/LLM integration files (look for: openai, anthropic, langchain, etc.)
    • Configuration files
    • Entry points (main.py, app.py, index.js, etc.)
    • Agent/tool definition files
    • Database/vector store files
  2. Read critical files (up to 20-30 files) focusing on:

    • AI/LLM integration points
    • Prompt construction
    • Input handling
    • Authentication/authorization
    • Data storage (vector DBs, regular DBs)
    • Tool definitions (for agentic systems)
    • RAG pipeline components
  3. Apply the system analysis prompt to yourself:

Read the prompt at: prompts/system_analysis.md

Follow its instructions to analyze what you've learned about the codebase.

  1. Write structured JSON output:

Save your analysis as JSON to:

$OUTPUT_DIR/system_analysis.json

Use the JSON structure specified in the prompt. CRITICAL: Output ONLY valid JSON with no markdown code blocks or explanatory text.

Validate the JSON:

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

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

If validation fails, fix the JSON and retry.


Phase 2: Strand Generation

Objective: Generate a compact strand fingerprint from the system analysis.

Process:

  1. Generate and embed strand in one step:
bash
python3 scripts/ai_fingerprint.py embed "$OUTPUT_DIR/system_analysis.json"

This will:

  • Generate the strand fingerprint from the analysis
  • Add it as a top-level "strand" field in the JSON
  • Save the updated JSON file

Example result:

json
{
  "strand": "A1ITMX-S1N4NNED-NXNNXNN",
  "ai_system_type": "LLM",
  ...
}
  1. Display strand cheatsheet for user reference:
bash
python3 scripts/ai_fingerprint.py cheatsheet

Final Summary Presentation

Once all phases are complete, present a comprehensive summary to the user:

🎯 AI FINGERPRINT COMPLETE

Target: <target_name>
System Type: <detected_type>
Strand: <strand_fingerprint>

📊 System Characteristics:

LLM Component (6 chars): <llm_part>
  • Provider: <API/Local/Hybrid>
  • Models: <count>
  • Activity: <Inference/Training/Finetuning>
  • Modality: <input/output>

Agentic Component (8 chars): <agentic_part>
  • Topology: <single/multi/hierarchical>
  • Agent Count: <count>
  • Autonomy: <level>
  • Tools: <count>
  • Sandboxing: <level>
  • Human Gates: <present/none>

RAG Component (7 chars): <rag_part>
  • Pattern: <basic/advanced/agentic/none>
  • Retrieval: <dense/sparse/hybrid>
  • Corpus: <documents/tools/mixed>
  • Vector DB: <type>

🔍 Key Architecture Insights:
  • <insight 1>
  • <insight 2>
  • <insight 3>

📁 Output Files:
  • System Analysis: $OUTPUT_DIR/system_analysis.json
  • File Scan: $OUTPUT_DIR/file_scan.json
  • CWE Context: $OUTPUT_DIR/cwe_context.txt
  • Strand Output: $OUTPUT_DIR/strand_output.txt
  
📍 Output Location: Results are saved alongside the target directory at:
  <parent_of_target>/ai_fingerprint_results/<target_name>/

Include:

  • The complete strand fingerprint
  • Breakdown of what each component means
  • Key architectural insights
  • Security-relevant observations
  • File locations for all outputs

Integration with Other Skills

This fingerprinting skill is designed to be used as a prerequisite for security analysis skills like battleprint.

Typical workflow:

  1. Run ai-fingerprint to generate system_analysis.json and strand
  2. Use the system_analysis.json as input to downstream security tools
  3. The strand provides a compact identifier for the system's profile

Example:

bash
# Step 1: Generate fingerprint
/ai-fingerprint ./my-ai-app

# Step 2: Use fingerprint in security analysis
/battleprint ./my-ai-app

The battleprint skill can detect if a fingerprint already exists and reuse it, or generate a new one.


Error Handling

If file scanning fails:

  • Check target directory permissions
  • Try manual file reading of key directories
  • Continue with manual inventory

If JSON validation fails:

  • Use the json_validator to extract and fix the JSON
  • Ensure no markdown code blocks (````json) in output
  • Ensure proper JSON syntax (quotes, commas, brackets)

If strand generation fails:

  • Check that system_analysis.json is valid
  • Verify strand.py script exists in battleprint skill
  • Generate a fallback strand: XXXXXX-XXXXXXXX-XXXXXXX

If CWE context is missing:

  • Continue without CWE classifications (less precise but still valuable)
  • Note in output that CWE context was unavailable

Important Notes

Dependencies:

  • This skill includes all required Python utilities in the scripts/ directory
  • No external dependencies on battleprint_skill
  • Scripts are standalone and self-contained

Memory Efficiency:

  • Don't try to read ALL files
  • Use file scanning to identify the ~20-30 most relevant files
  • Focus on AI-related, config, and entry point files

JSON Quality:

  • The system_analysis.json is critical for downstream tools
  • Must be valid JSON with proper structure
  • Use the json_validator to ensure correctness

Strand Interpretation:

  • The strand is a compact fingerprint, not a full analysis
  • Reference the cheatsheet for interpretation
  • Each position encodes specific characteristics

Output Quality:

  • Provide evidence-based analysis with file references
  • Include line numbers where relevant
  • Be thorough but concise

Technical Notes

  • No API keys needed: You're already Claude Code, no external LLM calls
  • Pure Python utilities: All helper scripts are non-LLM operations
  • Prompt-driven analysis: Your reasoning powers drive the analysis
  • Structured outputs: JSON schemas ensure consistency
  • Reusable artifacts: Outputs can be used by multiple downstream tools

This skill is the foundation for AI system security analysis - it creates the fingerprint that other tools can build upon!

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 Ai Fingerprint?

Generate comprehensive AI system fingerprint with architecture analysis and Strand generation. Use when analyzing AI/LLM systems for security assessment or system profiling.

Firwat Ai Fingerprint op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ai Fingerprint 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 Ai Fingerprint 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/ai-fingerprint 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 Ai Fingerprint 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 Ai Fingerprint benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ai Fingerprint 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 Ai Fingerprint 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 👇