⛰️ LifeOS — The AI-powered Life Operating System that helps you hill climb to wherever you're going.
fix(critical): fix SessionStart hook and remove private skill references
Daniel Miessler1f818c23d780
diff --git a/.claude/hooks/load-core-context.ts b/.claude/hooks/load-core-context.tsindex b987eb01..6d7c0552 100755--- a/.claude/hooks/load-core-context.ts+++ b/.claude/hooks/load-core-context.ts@@ -3,24 +3,24 @@/*** load-core-context.ts*- * Automatically loads your PAI skill context at session start by reading and injecting- * the PAI SKILL.md file contents directly into Claude's context as a system-reminder.+ * Automatically loads your CORE skill context at session start by reading and injecting+ * the CORE SKILL.md file contents directly into Claude's context as a system-reminder.** Purpose:- * - Read PAI SKILL.md file content+ * - Read CORE SKILL.md file content* - Output content as system-reminder for Claude to process* - Ensure complete context (contacts, preferences, security, identity) available at session start* - Bypass skill activation logic by directly injecting context** Setup:- * 1. Customize your ~/.claude/skills/PAI/SKILL.md with your personal context+ * 1. Customize your ~/.claude/skills/CORE/SKILL.md with your personal context* 2. Add this hook to settings.json SessionStart hooks* 3. Ensure PAI_DIR environment variable is set (defaults to $HOME/.claude)** How it works:* - Runs at the start of every Claude Code session- * - Skips execution for subagent sessions (they don't need PAI context)- * - Reads your PAI SKILL.md file+ * - Skips execution for subagent sessions (they don't need CORE context)+ * - Reads your CORE SKILL.md file* - Injects content as <system-reminder> which Claude processes automatically* - Gives your AI immediate access to your complete personal context*/@@ -37,38 +37,40 @@ async function main() {process.env.CLAUDE_AGENT_TYPE !== undefined;if (isSubagent) {- // Subagent sessions don't need PAI context loading- console.error('🤖 Subagent session - skipping PAI context loading');+ // Subagent sessions don't need CORE context loading+ console.error('🤖 Subagent session - skipping CORE context loading');process.exit(0);}// Get PAI directory from environment or use defaultconst paiDir = process.env.PAI_DIR || join(homedir(), '.claude');- const paiSkillPath = join(paiDir, 'skills/PAI/SKILL.md');+ const coreSkillPath = join(paiDir, 'skills/CORE/SKILL.md');- // Verify PAI skill file exists- if (!existsSync(paiSkillPath)) {- console.error(`❌ PAI skill not found at: ${paiSkillPath}`);- console.error(`💡 Create your PAI skill file or check PAI_DIR environment variable`);+ // Verify CORE skill file exists+ if (!existsSync(coreSkillPath)) {+ console.error(`❌ CORE skill not found at: ${coreSkillPath}`);+ console.error(`💡 Ensure CORE/SKILL.md exists or check PAI_DIR environment variable`);process.exit(1);}- console.error('📚 Reading PAI core context from skill file...');+ console.error('📚 Reading CORE context from skill file...');- // Read the PAI SKILL.md file content- const paiContent = readFileSync(paiSkillPath, 'utf-8');+ // Read the CORE SKILL.md file content+ const coreContent = readFileSync(coreSkillPath, 'utf-8');- console.error(`✅ Read ${paiContent.length} characters from PAI SKILL.md`);+ console.error(`✅ Read ${coreContent.length} characters from CORE SKILL.md`);- // Output the PAI content as a system-reminder+ // Output the CORE content as a system-reminder// This will be injected into Claude's context at session startconst message = `<system-reminder>PAI CORE CONTEXT (Auto-loaded at Session Start)-The following context has been loaded from ${paiSkillPath}:+📅 CURRENT DATE/TIME: ${new Date().toLocaleString('en-US', { timeZone: 'America/Los_Angeles', year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false })} PST++The following context has been loaded from ${coreSkillPath}:----${paiContent}+${coreContent}---This context is now active for this session. Follow all instructions, preferences, and guidelines contained above.@@ -77,7 +79,7 @@ This context is now active for this session. Follow all instructions, preference// Write to stdout (will be captured by Claude Code)console.log(message);- console.error('✅ PAI context injected into session');+ console.error('✅ CORE context injected into session');process.exit(0);} catch (error) {console.error('❌ Error in load-core-context hook:', error);diff --git a/.claude/skills/CORE/SKILL.md b/.claude/skills/CORE/SKILL.mdindex f61d5950..ddda6cf2 100644--- a/.claude/skills/CORE/SKILL.md+++ b/.claude/skills/CORE/SKILL.md@@ -283,45 +283,6 @@ The intern agent is your high-agency genius generalist - perfect for parallel exFor advanced delegation strategies, spotcheck patterns, and when interns can invoke engineers:`~/.claude/skills/CORE/workflows/delegation-patterns.md`-## 🌐 Web Scraping & MCP Systems--### Route Triggers-- Daniel says "use the MCP" or "use Bright Data" or "use Apify" → Use system-mcp SKILL-- Daniel mentions "scrape my site" or "scrape website" → Use system-mcp SKILL-- Daniel asks "extract data from" or "get data from website" → Use system-mcp SKILL-- Daniel mentions "Instagram scraper" or "LinkedIn data" or social media scraping → Use system-mcp SKILL-- Daniel asks "Google Maps businesses" or lead generation → Use system-mcp SKILL-- Questions about "web scraping" or "data extraction" → Use system-mcp SKILL--### Web Scraping: Use system-mcp Skill--**The system-mcp skill is THE skill for web scraping and data extraction.**-- Location: ~/.claude/skills/system-mcp/-- Handles: Bright Data, Apify, and future web scraping providers-- Implementation: TypeScript wrappers that call APIs directly (not old MCP protocol tools)-- **When Daniel says "use the MCP" or "use Bright Data" or "use Apify"** → Use system-mcp SKILL-- Execute with: `bun run script.ts` using TypeScript imports-- Example: `import { scrapeAsMarkdown } from '~/.claude/skills/system-mcp/providers/brightdata/actors'`-- 99% token savings by filtering data in TypeScript code BEFORE model context--**Why TypeScript Wrappers (not old MCP protocol):**-- Direct API calls (faster, more efficient)-- Filter results in code before sending to model (massive token savings)-- Full control over data processing-- No MCP protocol overhead--### MCP Profile Management (LEGACY - Different System)--**Route Triggers:**-- Daniel says "switch MCP" or "change MCP profile" → LEGACY profile swap-- Daniel mentions "chrome MCP" or "dev MCP" or "security profile" → LEGACY profiles-- Daniel asks "what MCP profiles exist" or "available profiles" → LEGACY system-- Daniel says "load research profile" or "swap MCP" → LEGACY profile swap + restart-- Questions about "MCP configuration" or "two MCP systems"--**📚 Complete MCP Profile Management Guide:**-`~/.claude/skills/CORE/workflows/mcp-profile-management.md`----**This completes the CORE skill quick reference. All additional context is available in the documentation files listed above.**