# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## What This Is A platform-agnostic system prompt library for LLM agents. 29 personas across 10 domains (cybersecurity, intelligence, military, law/economics, history, linguistics, engineering, academia). Each persona has a `general.md` base variant plus optional specialization and personalized (`salva.md`) variants. Total: ~108 variants. ## Build ```bash pip install pyyaml # only dependency python3 build.py # builds all personas → generated/ ``` Output goes to `generated//.{prompt.md,yaml,json}`. The `generated/` directory is gitignored. Optional: `cp config.example.yaml config.yaml` for dynamic variable injection. Build works without it. ## Architecture **Build pipeline** (`build.py`): Reads persona `.md` files with YAML frontmatter → parses sections → applies config templating (`{{key}}`, `{{#if key}}...{{/if}}`, `{{#unless}}`) → outputs three formats per variant. **Persona structure**: Each persona lives in `personas//` with: - `_meta.yaml` — metadata, triggers, relations, variants list - `general.md` — base prompt (YAML frontmatter + markdown sections: Soul, Expertise, Methodology, Tools & Resources, Behavior Rules, Boundaries) - `.md` — domain-narrowed variants - `salva.md` — user-personalized variant **Templates**: `personas/_template.md` and `personas/_meta_template.yaml` are starting points for new personas. Files starting with `_` are skipped during build. **Config system**: `config.yaml` (gitignored) provides user-specific values. `build.py` flattens nested keys (`user.name`, `infrastructure.tools.sdr_scanner`) and injects them into persona templates. Supports `{{#if key}}` / `{{#unless key}}` conditional blocks. **Cross-persona escalation**: Each persona's Boundaries section defines handoff triggers to other personas, enabling multi-agent chains (e.g., Neo → Cipher → Sentinel → Frodo). Build auto-extracts these into `generated/_index/escalation_graph.json`. **Shared library** (`personas/_shared/`): Reusable knowledge bases (skipped during persona build, indexed into outputs): - `skills/` — 42 shared skills from OpenClaw/kali-claw (SKILL.md + references per skill) - `paperclip-skills/` — 52 skills from paperclip-docs (ceo-advisor, coding-agent, security-review, etc.) - `design-md/` — 58 brand DESIGN.md files (Stripe, Claude, Linear, Apple, Vercel, etc.) - `ui-ux-pro-max/` — BM25 search engine + 14 CSV data files (67 styles, 161 products, 57 fonts) - `kali-tools/` — 16 Kali Linux tool reference docs (nmap, hashcat, metasploit, AD, OSINT, wireless) - `openclaw-personas/` — Original 6 OpenClaw persona definitions + SOUL.md + IDENTITY.md + TOOLS.md - `osint-sources/` — OSINT master reference and investigation templates - `ad-attack-tools/` — Active Directory attack chain references **Build outputs** (`generated/_index/`): - `escalation_graph.json` — cross-persona handoff map extracted from Boundaries sections - `trigger_index.json` — keyword→persona routing for multi-agent auto-switching - `skills_index.json` — all shared skills mapped to personas with metadata **Skill injection**: Build auto-maps skills from `_shared/skills/` to personas via domain mapping. Each persona's JSON/YAML output includes a `skills` array listing applicable shared skills. ## Install to Platforms ```bash python3 build.py --install claude # deploy to ~/.claude/commands/ python3 build.py --install gemini # deploy to Gemini Gems format python3 build.py --install antigravity # deploy to Antigravity IDE ``` ## Conventions - Persona codenames are lowercase directory names (`neo`, `frodo`, `sentinel`) - Every persona must have `general.md` with valid YAML frontmatter - Frontmatter fields: `codename`, `name`, `domain`, `subdomain`, `version`, `address_to`, `address_from`, `tone`, `activation_triggers`, `tags`, `inspired_by`, `quote`, `language` - Section headers use `## ` (H2) — the build parser splits on these - Turkish honorific titles ("Hitap") are used for `address_to` fields - `config.yaml` must never be committed (contains personal infrastructure details)