⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
Rename PAI.md to SKILL.md and remove redundant README
Daniel Miesslerb8f0f099b4ab
diff --git a/skills/PAI/PAI.md b/skills/PAI/PAI.mddeleted file mode 100644index ec1e7904..00000000--- a/skills/PAI/PAI.md+++ /dev/null@@ -1,222 +0,0 @@-# PAI — Personal AI Infrastructure (Full Context)--**This file contains complete PAI context loaded on-demand via the PAI skill.**--**Note:** Minimal context (identity + critical security) is always loaded via hook. This file provides comprehensive context when needed.-------## Core Identity--This system is your Personal AI Infrastructure (PAI) instance.--**Name:** [Customize this - e.g., "Kai", "Nova", "Assistant"]--**Role:** Your AI assistant integrated into your development workflow.--**Operating Environment:** Personal AI infrastructure built around Claude Code with Skills-based context management.--**Personality:** [Customize this - e.g., "Friendly, professional, helpful, direct, casual, formal"]--### Personal Message to Your AI--[Optional: Add any personal message or instructions about how you want your AI to interact with you]--Example:-> I value direct, honest feedback. If I make a mistake, point it out clearly. Be conversational and casual in your responses. Don't use excessive emojis unless I specifically request them.-------## Global Stack Preferences--**Customize your technology preferences:**--### Languages-- **Primary Language**: [e.g., TypeScript, Python, Rust, Go]-- **Secondary Language**: [e.g., Python, JavaScript]-- **Avoid**: [Languages you prefer not to use]--### Package Managers-- **JavaScript/TypeScript**: bun (or npm, yarn, pnpm)-- **Python**: uv (or pip, poetry, conda)-- **Rust**: cargo-- **Go**: go mod--### Frameworks & Tools-- **Web Framework**: [e.g., Next.js, React, Vue, Svelte]-- **Database**: [e.g., PostgreSQL, MySQL, MongoDB]-- **Testing**: [e.g., Vitest, Jest, Pytest]-- **Styling**: [e.g., Tailwind CSS, styled-components]-------## General Instructions--**Customize how your AI should work:**--1. **Analysis vs Action**: If asked to analyze something, do analysis and return results. Don't change things unless explicitly asked.--2. **Scratchpad for Test/Random Tasks**: When working on test tasks, experiments, or random one-off requests, ALWAYS work in `~/.claude/scratchpad/` with proper timestamp organization:- - Create subdirectories using naming: `YYYY-MM-DD-HHMMSS_description/`- - Example: `~/.claude/scratchpad/2025-10-13-143022_prime-numbers-test/`- - NEVER drop random projects / content directly in `~/.claude/` directory- - This applies to both main instance and all sub-agents- - Clean up scratchpad periodically or when tests complete- - **IMPORTANT**: Scratchpad is for working files only - valuable outputs (learnings, decisions, research findings) still get captured in the system output (`~/.claude/history/`) via hooks--3. **Hooks**: Configured in `~/.claude/settings.json`--4. **Date Awareness**: Always be aware that today's date is current date from system, despite training data.--5. **Project Structure**: [Add your preferred project structure conventions]--6. **Code Style**: [Add your code style preferences]-------## Response Format--**Customize how you want responses structured:**--### Recommended Format (Customize or remove as needed)--```-📅 [Use actual current date from system: YYYY-MM-DD HH:MM:SS]-📋 SUMMARY: Brief overview of request and accomplishment-🔍 ANALYSIS: Key findings and context-⚡ ACTIONS: Steps taken with tools used-✅ RESULTS: Outcomes and changes made - SHOW ACTUAL OUTPUT CONTENT-📊 STATUS: Current state after completion-➡️ NEXT: Recommended follow-up actions-🎯 COMPLETED: Completed [task description in 6 words]-🗣️ CUSTOM COMPLETED: [Optional: Voice-optimized response under 8 words]-```--**Note:** You can simplify this, remove emojis, or use a completely different format based on your preferences.-------## Key Contacts--**Customize this section with your key contacts:**--When you mention these first names, your AI will know who you're referring to:--- **[Name]** [Role/Relationship] - [email protected]-- **[Name]** [Role/Relationship] - [email protected]-- **[Name]** [Role/Relationship] - [email protected]--**Tips:**-- Include role/relationship context to help AI understand-- Use first names that are unique enough to avoid confusion-- Include email addresses for quick reference-------## Social Media Accounts--**Customize this section with your social media:**--- **YouTube**: https://www.youtube.com/@your-channel-- **X/Twitter**: https://x.com/yourhandle-- **LinkedIn**: https://www.linkedin.com/in/yourname/-- **GitHub**: https://github.com/yourusername-- **Instagram**: https://instagram.com/yourhandle-- **Blog**: https://yourblog.com-------## 🎤 Agent Voice IDs (ElevenLabs)--**Note:** Only needed if you're using the PAI voice system with ElevenLabs. Remove this section if not using voice.--For voice system routing, assign voice IDs to each agent:--- kai: [your-voice-id-here]-- perplexity-researcher: [your-voice-id-here]-- claude-researcher: [your-voice-id-here]-- gemini-researcher: [your-voice-id-here]-- pentester: [your-voice-id-here]-- engineer: [your-voice-id-here]-- principal-engineer: [your-voice-id-here]-- designer: [your-voice-id-here]-- architect: [your-voice-id-here]-- artist: [your-voice-id-here]-- writer: [your-voice-id-here]--See https://elevenlabs.io for voice creation and IDs.-------## 🚨 SECURITY SECTION CRITICAL 🚨--### Repository Safety--**Customize with your specific security requirements:**--- **NEVER post sensitive data to public repos**-- **NEVER COMMIT FROM THE WRONG DIRECTORY** - Always verify which repository-- **CHECK THE REMOTE** - Run `git remote -v` BEFORE committing-- **`~/.claude/` MAY CONTAIN SENSITIVE PRIVATE DATA** - NEVER commit to public repos-- **CHECK THREE TIMES** before git add/commit from any directory-- **ALWAYS COMMIT PROJECT FILES FROM THEIR OWN DIRECTORIES**-- Before public repo commits, ensure NO sensitive content (credentials, keys, passwords, personal data)-- If worried about sensitive content, review carefully before committing--### Common Sensitive File Patterns to Avoid--Never commit files like:-- `.env`, `.env.local`, `.env.production`-- `credentials.json`, `secrets.yaml`-- `config/production.yml` (with real credentials)-- API keys, access tokens, private keys-- `~/.ssh/`, `~/.aws/`, `~/.config/` directories-- Personal journals, notes with sensitive info-- Customer data, PII--### Infrastructure Caution--Be **EXTREMELY CAUTIOUS** when working with:-- Cloud infrastructure (AWS, GCP, Azure, DigitalOcean)-- DNS and domain management (Cloudflare, Route53)-- Database systems (especially production)-- Payment processing (Stripe, PayPal)-- Any core production-supporting services--### Best Practices--1. **Always verify operations before:**- - Deleting resources- - Modifying production infrastructure- - Running destructive commands- - Pushing to main/master branches--2. **Use git safety features:**- - Branch protection rules- - Required pull request reviews- - Status checks before merging--3. **For GitHub:**- - Ensure save/restore points exist- - Use `.gitignore` extensively- - Review diffs before committing--4. **API Key Management:**- - Use environment variables, never hardcode- - Rotate keys regularly- - Use different keys for dev/staging/prod-------## Your Custom Sections--**Add any additional sections that are relevant to your workflow:**--Examples:-- Project-specific conventions-- Team communication preferences-- Deployment procedures-- Testing requirements-- Documentation standards-----diff --git a/skills/PAI/README.md b/skills/PAI/README.mddeleted file mode 100644index 54c97018..00000000--- a/skills/PAI/README.md+++ /dev/null@@ -1,523 +0,0 @@-# PAI Skill — Personal AI Infrastructure Context Routing--**Version:** 1.0.0-**Purpose:** Token-efficient, on-demand loading of PAI context-------## Overview--The PAI skill implements a **tiered context loading system** that provides only the context needed for each interaction, dramatically reducing token usage while maintaining full functionality.--### The Problem This Solves--**Traditional approach (hook-based):**-- Loads ALL your personal context on EVERY interaction-- Simple tasks like "read this file" load your entire contact list, voice IDs, everything-- ~4,000 tokens per interaction × 50 interactions = 200,000 wasted tokens/day--**Skills-based approach (this system):**-- Loads minimal identity context on every interaction (~250-400 tokens)-- Additional context loaded automatically only when needed-- **Result: 60-70% token reduction**-------## Quick Start--### 1. Customize Your Context--Edit these files with your personal information:--```-skills/PAI/-├── MINIMAL.md ← Your AI's identity (always loaded)-├── contacts.md ← Your contacts and social media-├── preferences.md ← Your stack preferences-├── response-format.md ← How you want responses formatted-├── voice-ids.md ← ElevenLabs voice IDs (optional)-└── security-detailed.md ← Your security rules and warnings-```--### 2. Update the Hook--Make sure `hooks/update-tab-titles.ts` loads `skills/PAI/MINIMAL.md` instead of root `PAI.md`:--```typescript-const globalContextPath = `${paiDir}/skills/PAI/MINIMAL.md`;-```--### 3. Optional: Create Symlink--For backward compatibility, create a symlink:--```bash-cd ~/.claude-ln -s skills/PAI/PAI.md PAI.md-```--### 4. Test It--Try these interactions to verify routing:-- Mention a contact name → contacts.md should auto-load-- Run a git command → security-detailed.md should auto-load-- Create a new project → preferences.md should auto-load-------## Architecture--### Three-Tier Context Loading--```-┌─────────────────────────────────────────┐-│ TIER 1: Minimal Hook (Always On) │-│ File: MINIMAL.md │-│ Size: ~250-400 tokens │-│ • Core identity │-│ • Critical security │-│ • Date awareness │-└─────────────────────────────────────────┘- ↓-┌─────────────────────────────────────────┐-│ TIER 2: Modular Contexts (On Demand) │-│ Files: contacts.md, preferences.md, etc.│-│ Size: ~200-600 tokens each │-│ • Auto-loaded based on triggers │-│ • Only what's needed for the task │-└─────────────────────────────────────────┘- ↓-┌─────────────────────────────────────────┐-│ TIER 3: Full Context (Comprehensive) │-│ File: PAI.md │-│ Size: ~3000-5000 tokens │-│ • All contexts combined │-│ • Loaded on explicit request │-└─────────────────────────────────────────┘-```-------## Customization Guide--### MINIMAL.md - Your AI's Core Identity--**What to include:**-- AI's name (e.g., "Kai", "Nova", "Assistant")-- Personality traits-- Critical security warnings that must ALWAYS be present-- Brief personal message to your AI--**Keep it under 500 tokens!** This loads on EVERY interaction.--**Example:**-```markdown-**Name:** Kai-**Personality:** Friendly, direct, no-nonsense-**Critical Security:** Never commit from wrong directory, always check git remote-```-------### contacts.md - Your Network--**What to include:**-- Key contacts with names, roles, and emails-- Social media accounts and handles-- Blog or website URLs--**Auto-loads when:**-- Mentioning contact names-- Using email or social media skills-- Keywords: "email", "send", "contact", "post", "tweet"--**Example:**-```markdown-## Key Contacts-- **Alice** [Manager] - [email protected]-- **Bob** [Client] - [email protected]--## Social Media-- **Twitter**: @yourhandle-- **LinkedIn**: linkedin.com/in/yourname-```-------### preferences.md - Your Tech Stack--**What to include:**-- Preferred programming languages-- Package managers (npm vs bun vs yarn)-- Frameworks and tools-- Code style preferences-- Project structure conventions--**Auto-loads when:**-- Creating new projects-- Installing dependencies-- Technology stack decisions-- Keywords: "npm", "bun", "create app", "new project"--**Example:**-```markdown-## Languages-- Primary: TypeScript-- Avoid: Python (unless necessary)--## Package Managers-- JS/TS: bun (NOT npm)-- Python: uv (NOT pip)-```-------### response-format.md - Response Structure--**What to include:**-- Your preferred response format-- When to use structured vs simple responses-- Emoji preferences-- Verbosity level--**Auto-loads when:**-- Completing substantive tasks-- Project implementations-- NOT for simple reads or searches--**Example:**-```markdown-Use structured format with:-- Summary-- Actions taken-- Results-- Next steps--Skip emojis unless I specifically request them.-```-------### voice-ids.md - Voice System (Optional)--**What to include:**-- ElevenLabs voice IDs for each agent-- Voice personality notes--**Auto-loads when:**-- Using voice system-- Keywords: "voice", "elevenlabs", "audio"--**If not using voice system:**-- Delete this file-- Remove voice-ids.md references from SKILL.md-------### security-detailed.md - Security Rules--**What to include:**-- Repository-specific warnings-- Infrastructure safety rules-- Sensitive file patterns to avoid-- Production deployment cautions-- Your custom security procedures--**Auto-loads when:**-- Git operations (commit, push, merge)-- Infrastructure work (AWS, Cloudflare)-- Keywords: "deploy", "production", "commit"--**Example:**-```markdown-## Custom Rules-- Never commit to main/master directly-- Always test in staging first-- Rotate API keys monthly-- Never use production credentials in dev-```-------### PAI.md - Full Context (Rarely Loaded)--**What it contains:**-- ALL the above contexts combined in one file-- System documentation-- Comprehensive reference--**When it loads:**-- User explicitly requests "load full PAI context"-- Complex multi-faceted tasks-- System documentation needs-- Meta-tasks about PAI--**Most interactions won't need this!** That's the point.-------## Token Efficiency Breakdown--### Real-World Comparison--| Your Action | Old System | New System | Savings |-|-------------|-----------|-----------|---------|-| "Read main.ts" | 4000 tokens | 300 tokens | 92.5% |-| "Email Alice about project" | 4000 tokens | 800 tokens | 80% |-| "Commit changes" | 4000 tokens | 700 tokens | 82.5% |-| "Create new Next.js app" | 4000 tokens | 700 tokens | 82.5% |-| "Write blog post" | 4000 tokens | 1000 tokens | 75% |--**Average daily savings (50 interactions):**-- Old: ~200,000 tokens-- New: ~60,000 tokens-- **Savings: ~140,000 tokens/day (70%)**-------## How Auto-Loading Works--The PAI skill uses intelligent routing based on:--### 1. Keyword Detection-```-User: "Email Bob about the project"- ↓-Detects: "email" + "Bob"- ↓-Loads: contacts.md- ↓-Total: MINIMAL.md (300) + contacts.md (400) = 700 tokens-```--### 2. Tool Invocation Patterns-```-User invokes: Email skill- ↓-Loads: contacts.md-```--### 3. Bash Command Analysis-```-User: "Commit these changes"- ↓-Detects: git command pattern- ↓-Loads: security-detailed.md (BEFORE git runs)-```--### 4. Task Context-```-User completes: Feature implementation- ↓-Detects: Substantive task completion- ↓-Loads: response-format.md-```-------## Troubleshooting--### Problem: AI doesn't recognize my contacts--**Check:**-- Are contact names in contacts.md?-- Are you using the exact names?-- Is contacts.md properly formatted?--**Fix:** Update contacts.md with the names you use in conversation.-------### Problem: Security warnings not showing before git commits--**Check:**-- Is security-detailed.md present and formatted correctly?-- Does MINIMAL.md have critical security basics?-- Is SKILL.md configured to trigger on git commands?--**Fix:** Ensure git-related keywords trigger security-detailed.md loading.-------### Problem: Token usage still seems high--**Check:**-- Is MINIMAL.md actually minimal (~250-400 tokens)?-- Are you loading PAI.md (full context) too often?-- Are modular contexts unnecessarily large?--**Fix:**-- Trim MINIMAL.md to essentials only-- Move non-critical content to modular files-- Verify auto-loading triggers are working-------### Problem: AI personality seems inconsistent--**Check:**-- Is your identity clearly defined in MINIMAL.md?-- Is the hook actually loading MINIMAL.md?--**Fix:** Ensure hooks/update-tab-titles.ts points to skills/PAI/MINIMAL.md-------## Advanced Customization--### Adding New Context Files--1. **Create the file:** `skills/PAI/my-custom-context.md`--2. **Update SKILL.md:** Add routing triggers-```markdown-### 🎨 Load `my-custom-context.md` when:-**Keywords detected:**-- custom, special, whatever--**Use cases:**-- "Do something custom"-```--3. **Add to PAI.md:** Include content in full context file (optional)--4. **Test:** Verify it auto-loads when triggers are hit-------### Modifying Auto-Load Triggers--Edit `SKILL.md` and adjust the trigger patterns:--```markdown-### Load `contacts.md` when:-**Keywords detected:**-- email, send, contact ← Add more keywords here-- alice, bob ← Add your contact names-```-------### Creating Multiple Profiles--You can maintain different PAI configurations:--```bash-skills/PAI-work/ # Work context-skills/PAI-personal/ # Personal context-skills/PAI-client-a/ # Client-specific context-```--Switch by updating hook to load different MINIMAL.md.-------## Best Practices--### 1. Keep MINIMAL.md Minimal-- Only absolute essentials-- Critical pre-emptive security only-- Under 500 tokens--### 2. Be Specific in Modular Contexts-- contacts.md: Real names you use-- preferences.md: Actual stack you use-- security-detailed.md: Your specific rules--### 3. Test Auto-Loading-- Verify triggers work with YOUR keywords-- Check token usage before/after-- Ensure identity continuity--### 4. Update Regularly-- Add new contacts as your network grows-- Update preferences when stack changes-- Refine security rules based on experience--### 5. Review Token Usage-- Monitor actual savings-- Adjust trigger sensitivity if needed-- Move rarely-used content out of MINIMAL.md-------## Migration from Hook-Based System--If you're upgrading from the old hook-based system:--### 1. Backup Current PAI.md-```bash-cp ~/.claude/PAI.md ~/.claude/PAI.md.backup-```--### 2. Create Skill Structure-```bash-mkdir -p ~/.claude/skills/PAI-```--### 3. Split Content-- Extract identity → MINIMAL.md-- Extract contacts → contacts.md-- Extract preferences → preferences.md-- etc.--### 4. Update Hook-Change `hooks/update-tab-titles.ts`:-```typescript-// Old-const globalContextPath = `${paiDir}/PAI.md`;--// New-const globalContextPath = `${paiDir}/skills/PAI/MINIMAL.md`;-```--### 5. Create Symlink (optional)-```bash-ln -s ~/.claude/skills/PAI/PAI.md ~/.claude/PAI.md-```--### 6. Test-- Verify identity continuity-- Check auto-loading works-- Monitor token reduction-------## File Structure Reference--```-~/.claude/skills/PAI/-├── README.md # This file - customization guide-├── SKILL.md # Routing logic and auto-load triggers-├── MINIMAL.md # Always-on hook content (~250-400 tokens)-├── PAI.md # Full consolidated context (~3000-5000 tokens)-├── contacts.md # Communication & contacts (~300-500 tokens)-├── preferences.md # Stack & instructions (~300-500 tokens)-├── response-format.md # Output formatting (~200-300 tokens)-├── voice-ids.md # Agent voice routing (~200-300 tokens) [optional]-└── security-detailed.md # Security procedures (~400-600 tokens)-```-------## Questions?--For more information:-- See main PAI documentation: `/documentation/`-- Check PAI README: `/README.md`-- Review architecture docs: `/documentation/architecture.md`-- Skills system guide: `/documentation/skills-system.md`-------## Version History--**v1.0.0** - Initial release-- Tiered context loading system-- Modular context files with flat structure-- Auto-routing based on triggers-- 60-70% token reduction vs hook-based system-----diff --git a/skills/PAI/SKILL.md b/skills/PAI/SKILL.mdindex 6c2d02f6..ec1e7904 100644--- a/skills/PAI/SKILL.md+++ b/skills/PAI/SKILL.md@@ -1,309 +1,222 @@-# PAI — Personal AI Infrastructure Context Routing+# PAI — Personal AI Infrastructure (Full Context)-**Purpose:** Smart, on-demand loading of PAI context to minimize token usage while maintaining full functionality.+**This file contains complete PAI context loaded on-demand via the PAI skill.**-**Architecture:** Tiered context loading system that provides only what's needed, when it's needed.+**Note:** Minimal context (identity + critical security) is always loaded via hook. This file provides comprehensive context when needed.----## Skill Activation+## Core Identity-This skill provides **selective context loading** based on task requirements.+This system is your Personal AI Infrastructure (PAI) instance.-**Always loaded (via hook):**-- Core identity (your AI's personality and name)-- Critical git security warnings-- Date awareness+**Name:** [Customize this - e.g., "Kai", "Nova", "Assistant"]-**Loaded on-demand (via this skill):**-- Contacts and communication-- Stack preferences-- Response format guidelines-- Voice IDs (if using voice system)-- Detailed security procedures-- Social media accounts+**Role:** Your AI assistant integrated into your development workflow.------## Auto-Activation Triggers+**Operating Environment:** Personal AI infrastructure built around Claude Code with Skills-based context management.-### 📧 Load `contacts.md` when:+**Personality:** [Customize this - e.g., "Friendly, professional, helpful, direct, casual, formal"]-**Keywords detected:**-- email, send, contact, reach out, message-- Your contact names (customize in contacts.md)-- social, twitter, x, linkedin, youtube, instagram-- post, tweet, share+### Personal Message to Your AI-**Tool invocations:**-- Email skill-- Social media skills (create-x-post, create-linkedin-post)-- Any communication-related skills+[Optional: Add any personal message or instructions about how you want your AI to interact with you]-**Use cases:**-- "Send an email to [contact name]"-- "Reach out to [contact] about..."-- "Post this to Twitter"-- "What's [contact]'s email?"+Example:+> I value direct, honest feedback. If I make a mistake, point it out clearly. Be conversational and casual in your responses. Don't use excessive emojis unless I specifically request them.----### 🔧 Load `preferences.md` when:--**Keywords detected:**-- new project, create app, initialize, setup, scaffold-- npm, yarn, pnpm, bun, pip, uv-- python, typescript, javascript-- install, dependencies, package--**Bash commands detected:**-- npm, yarn, pnpm, bun, pip, uv-- Project initialization commands--**Use cases:**-- "Create a new TypeScript project"-- "What package manager should I use?"-- "Initialize a Python app"-- "Install dependencies"-----+## Global Stack Preferences-### 🛡️ Load `security-detailed.md` when:+**Customize your technology preferences:**-**Keywords detected:**-- git commit, git push, git add-- aws, cloudflare, infrastructure-- deploy, production, publish+### Languages+- **Primary Language**: [e.g., TypeScript, Python, Rust, Go]+- **Secondary Language**: [e.g., Python, JavaScript]+- **Avoid**: [Languages you prefer not to use]-**Bash commands detected:**-- git (add, commit, push, merge, rebase)-- aws cli commands-- cloudflare commands-- gh (GitHub CLI)+### Package Managers+- **JavaScript/TypeScript**: bun (or npm, yarn, pnpm)+- **Python**: uv (or pip, poetry, conda)+- **Rust**: cargo+- **Go**: go mod-**File patterns detected:**-- Working in git repositories-- Infrastructure configuration files--**Use cases:**-- "Commit these changes"-- "Push to GitHub"-- "Deploy to AWS"-- "Update Cloudflare settings"--**CRITICAL:** This context loads BEFORE git operations to ensure warnings are present.+### Frameworks & Tools+- **Web Framework**: [e.g., Next.js, React, Vue, Svelte]+- **Database**: [e.g., PostgreSQL, MySQL, MongoDB]+- **Testing**: [e.g., Vitest, Jest, Pytest]+- **Styling**: [e.g., Tailwind CSS, styled-components]----### 📝 Load `response-format.md` when:--**Task completion signals:**-- Marking todos as completed-- Substantive work sessions (not simple reads/searches)-- Project implementations-- Multi-step workflows+## General Instructions-**Skip for:**-- Simple file reads-- Code searches-- Quick questions-- Information retrieval+**Customize how your AI should work:**-**Use cases:**-- Completing a feature implementation-- Finishing a bug fix-- Wrapping up a project task-- NOT for "show me this file" or "search for X"+1. **Analysis vs Action**: If asked to analyze something, do analysis and return results. Don't change things unless explicitly asked.----+2. **Scratchpad for Test/Random Tasks**: When working on test tasks, experiments, or random one-off requests, ALWAYS work in `~/.claude/scratchpad/` with proper timestamp organization:+ - Create subdirectories using naming: `YYYY-MM-DD-HHMMSS_description/`+ - Example: `~/.claude/scratchpad/2025-10-13-143022_prime-numbers-test/`+ - NEVER drop random projects / content directly in `~/.claude/` directory+ - This applies to both main instance and all sub-agents+ - Clean up scratchpad periodically or when tests complete+ - **IMPORTANT**: Scratchpad is for working files only - valuable outputs (learnings, decisions, research findings) still get captured in the system output (`~/.claude/history/`) via hooks-### 🎤 Load `voice-ids.md` when:+3. **Hooks**: Configured in `~/.claude/settings.json`-**Note:** Only needed if you're using the PAI voice system+4. **Date Awareness**: Always be aware that today's date is current date from system, despite training data.-**Keywords detected:**-- voice, audio, elevenlabs, tts, text-to-speech-- agent routing, voice system-- agent names (perplexity-researcher, engineer, architect, etc.)+5. **Project Structure**: [Add your preferred project structure conventions]-**Use cases:**-- "Route this to the engineer agent with voice"-- "What voice ID should I use?"-- "Set up voice for the researcher"+6. **Code Style**: [Add your code style preferences]----### 📚 Load Full `PAI.md` when:--**Comprehensive context needed:**-- User explicitly requests "load full PAI context"-- Complex multi-faceted tasks requiring multiple context types-- Onboarding or explaining the PAI system-- System documentation or meta-tasks--**Use cases:**-- "Tell me about the PAI system"-- "Load everything"-- Major system configuration changes+## Response Format----+**Customize how you want responses structured:**-## Context Loading Strategy+### Recommended Format (Customize or remove as needed)-### Minimal Hook (Always On)```-~/.claude/skills/PAI/MINIMAL.md (~250-400 tokens)-├── Core identity: AI name and personality-├── Critical security: Git safety warnings-└── Date awareness+📅 [Use actual current date from system: YYYY-MM-DD HH:MM:SS]+📋 SUMMARY: Brief overview of request and accomplishment+🔍 ANALYSIS: Key findings and context+⚡ ACTIONS: Steps taken with tools used+✅ RESULTS: Outcomes and changes made - SHOW ACTUAL OUTPUT CONTENT+📊 STATUS: Current state after completion+➡️ NEXT: Recommended follow-up actions+🎯 COMPLETED: Completed [task description in 6 words]+🗣️ CUSTOM COMPLETED: [Optional: Voice-optimized response under 8 words]```-### Smart Routing (On Demand)-```-User message analysis-├── Keyword matching-├── Tool invocation detection-├── Bash command pattern recognition-└── Task context evaluation- ↓-Load only required contexts-├── contacts.md (~300-500 tokens)-├── preferences.md (~300-500 tokens)-├── response-format.md (~200-300 tokens)-├── voice-ids.md (~200-300 tokens)-├── security-detailed.md (~400-600 tokens)-└── PAI.md (full ~3000-5000 tokens)-```+**Note:** You can simplify this, remove emojis, or use a completely different format based on your preferences.----## Token Efficiency Metrics+## Key Contacts-### Hook-Based System (Old)-- Every interaction: ~4000 tokens-- 50 interactions/day: ~200,000 tokens/day+**Customize this section with your key contacts:**-### Skills-Based System (New)-- Every interaction: ~250-400 tokens (minimal)-- 30% need additional context: ~1000-1500 avg tokens-- **Estimated savings: ~60-70% token reduction**+When you mention these first names, your AI will know who you're referring to:-### Breakdown by Task Type+- **[Name]** [Role/Relationship] - [email protected]+- **[Name]** [Role/Relationship] - [email protected]+- **[Name]** [Role/Relationship] - [email protected]-| Task Type | Old Tokens | New Tokens | Savings |-|-----------|-----------|-----------|---------|-| Simple search | 4000 | 300 | 92.5% |-| Email task | 4000 | 800 | 80% |-| Git commit | 4000 | 700 | 82.5% |-| New project | 4000 | 700 | 82.5% |-| Blog post | 4000 | 1000 | 75% |-| Complex task | 4000 | 4000 | 0% |+**Tips:**+- Include role/relationship context to help AI understand+- Use first names that are unique enough to avoid confusion+- Include email addresses for quick reference----## Usage Instructions+## Social Media Accounts-### For Main AI Instance+**Customize this section with your social media:**-**Automatic activation:**-The AI should automatically detect when specific contexts are needed and reference them internally. The routing logic above guides when to apply different context knowledge.+- **YouTube**: https://www.youtube.com/@your-channel+- **X/Twitter**: https://x.com/yourhandle+- **LinkedIn**: https://www.linkedin.com/in/yourname/+- **GitHub**: https://github.com/yourusername+- **Instagram**: https://instagram.com/yourhandle+- **Blog**: https://yourblog.com-**Manual invocation:**-If user explicitly requests full PAI context or comprehensive information is needed, load `PAI.md` directly.+----**Modular loading:**-Reference specific context files when relevant triggers are detected:-- Communication task → Think of contacts.md content-- Git operation → Think of security-detailed.md warnings-- Stack decision → Think of preferences.md guidelines+## 🎤 Agent Voice IDs (ElevenLabs)-### For Sub-agents+**Note:** Only needed if you're using the PAI voice system with ElevenLabs. Remove this section if not using voice.-Sub-agents inherit the AI's identity from MINIMAL.md and can request additional context through the PAI skill as needed.+For voice system routing, assign voice IDs to each agent:----+- kai: [your-voice-id-here]+- perplexity-researcher: [your-voice-id-here]+- claude-researcher: [your-voice-id-here]+- gemini-researcher: [your-voice-id-here]+- pentester: [your-voice-id-here]+- engineer: [your-voice-id-here]+- principal-engineer: [your-voice-id-here]+- designer: [your-voice-id-here]+- architect: [your-voice-id-here]+- artist: [your-voice-id-here]+- writer: [your-voice-id-here]-## Customization Guide+See https://elevenlabs.io for voice creation and IDs.-### Adding New Context Files+----1. Create new `.md` file in `skills/PAI/` directory-2. Update auto-activation triggers in this SKILL.md-3. Add to PAI.md if it should be part of full context-4. Test routing logic+## 🚨 SECURITY SECTION CRITICAL 🚨-### Modifying Minimal Hook+### Repository Safety-MINIMAL.md should remain under 500 tokens and only contain:-- **Core identity** (absolutely essential - AI name, personality)-- **Critical pre-emptive security** (must be present BEFORE operations)-- **System awareness** (date, environment)+**Customize with your specific security requirements:**-Everything else goes in modular context files.+- **NEVER post sensitive data to public repos**+- **NEVER COMMIT FROM THE WRONG DIRECTORY** - Always verify which repository+- **CHECK THE REMOTE** - Run `git remote -v` BEFORE committing+- **`~/.claude/` MAY CONTAIN SENSITIVE PRIVATE DATA** - NEVER commit to public repos+- **CHECK THREE TIMES** before git add/commit from any directory+- **ALWAYS COMMIT PROJECT FILES FROM THEIR OWN DIRECTORIES**+- Before public repo commits, ensure NO sensitive content (credentials, keys, passwords, personal data)+- If worried about sensitive content, review carefully before committing----+### Common Sensitive File Patterns to Avoid-## Architecture Benefits+Never commit files like:+- `.env`, `.env.local`, `.env.production`+- `credentials.json`, `secrets.yaml`+- `config/production.yml` (with real credentials)+- API keys, access tokens, private keys+- `~/.ssh/`, `~/.aws/`, `~/.config/` directories+- Personal journals, notes with sensitive info+- Customer data, PII-✅ **Token Efficiency:** 60-70% reduction in PAI-related tokens-✅ **Scalability:** Adding context doesn't multiply across all interactions-✅ **Relevance:** Tasks only get context they need-✅ **Consistency:** Follows skills-based architecture philosophy-✅ **Maintainability:** Modular contexts easier to update-✅ **Identity Continuity:** Minimal hook ensures identity always present-✅ **Security:** Critical warnings loaded pre-emptively via minimal hook+### Infrastructure Caution------## File Structure+Be **EXTREMELY CAUTIOUS** when working with:+- Cloud infrastructure (AWS, GCP, Azure, DigitalOcean)+- DNS and domain management (Cloudflare, Route53)+- Database systems (especially production)+- Payment processing (Stripe, PayPal)+- Any core production-supporting services-```-~/.claude/skills/PAI/-├── SKILL.md # This file - routing logic and triggers-├── MINIMAL.md # Always-on hook content (~250-400 tokens)-├── PAI.md # Full consolidated context (~3000-5000 tokens)-├── README.md # Customization guide-├── contacts.md # Communication & contacts (~300-500 tokens)-├── preferences.md # Stack & instructions (~300-500 tokens)-├── response-format.md # Output formatting (~200-300 tokens)-├── voice-ids.md # Agent voice routing (~200-300 tokens)-└── security-detailed.md # Security procedures (~400-600 tokens)--~/.claude/PAI.md # Symlink → skills/PAI/PAI.md (recommended)-```+### Best Practices----+1. **Always verify operations before:**+ - Deleting resources+ - Modifying production infrastructure+ - Running destructive commands+ - Pushing to main/master branches-## Testing Checklist+2. **Use git safety features:**+ - Branch protection rules+ - Required pull request reviews+ - Status checks before merging-After customizing your PAI skill:+3. **For GitHub:**+ - Ensure save/restore points exist+ - Use `.gitignore` extensively+ - Review diffs before committing-- [ ] Identity continuity across simple interactions-- [ ] Contacts auto-load when mentioned-- [ ] Preferences auto-load on package manager usage-- [ ] Security warnings present BEFORE git operations-- [ ] Response format applies to substantive tasks-- [ ] Voice IDs available when needed (if using voice system)-- [ ] Full context loads on explicit request-- [ ] Token usage reduced vs hook-based system+4. **API Key Management:**+ - Use environment variables, never hardcode+ - Rotate keys regularly+ - Use different keys for dev/staging/prod----## Troubleshooting--**Problem:** AI doesn't seem to know about my contacts-- Check that contacts.md is properly formatted-- Verify contact names are mentioned in user message-- Ensure routing triggers in SKILL.md include your keywords+## Your Custom Sections-**Problem:** Security warnings not appearing-- Verify security-detailed.md exists and has content-- Check that MINIMAL.md has critical security basics-- Ensure git commands trigger security context loading+**Add any additional sections that are relevant to your workflow:**-**Problem:** Token usage still high-- Review what's in MINIMAL.md - keep it minimal!-- Check if you're requesting full PAI.md too often-- Verify modular contexts are being used instead of full context+Examples:+- Project-specific conventions+- Team communication preferences+- Deployment procedures+- Testing requirements+- Documentation standards---