How koushikbaagh/claude-code-leak works
Claude Code is a terminal-based AI software-engineering assistant. The principal workflow is a user prompt entering the terminal UI, being prepared and sent through the query engine, then producing tool activity and a response; tool permissions gate user approval. Slash commands provide a separate route for session, configuration, and workflow management. The README also documents IDE bridging, persistent sessions, MCP, agents, skills, and task management. Some of these implementations are not present in the supplied tree or sampled excerpts, so their links are limited to documented capabilities and supported paths.
Main entry points: QueryEngine.ts Query engine · commands.ts Command registry · App.tsx Terminal app · usePermissionHandler.ts Permission dialog
Components 21
Terminal interaction
- Terminal app
src/components/App.tsx - Prompt input
src/components/PromptInput/PromptInput.tsx - Permission dialog
src/components/permissions/FilePermissionDialog/usePermissionHandler.ts
Agent runtime
- Query engine
src/QueryEngine.ts - Tool contracts
src/Tool.ts - Session transcripts
src/utils/sessionStorage.ts - Portable session reads
src/utils/sessionStoragePortable.ts
Commands and workflows
- Command registry
src/commands.ts - Session history
src/assistant/sessionHistory.ts - Task management
src/commands/tasks/tasks.tsx - Persistent memory
src/commands/memory/memory.tsx
External integrations
- Plugin options
src/utils/plugins/pluginOptionsStorage.ts - Secure credentials
src/utils/secureStorage/plainTextStorage.ts - macOS Keychain
src/utils/secureStorage/macOsKeychainStorage.ts - IDE bridge
src/bridge/bridgeMain.ts
Other components
- Terminal user
- IDE extension
- Anthropic API
- Project workspace
- MCP servers
- User approval
Connections 21
- Terminal user → Terminal app: uses
- Terminal app → Prompt input: renders
- Terminal app → Command registry: dispatches
- Prompt input → Query engine: submits prompt
- Query engine → Anthropic API: sends query
- Query engine → Tool contracts: uses contracts
- Query engine → Permission dialog: requests approval
- Permission dialog → User approval: prompts
- Permission dialog → Query engine: allows or rejects
- Query engine → Project workspace: tool effects
- Query engine → Session transcripts: flushes session
- Session transcripts → Portable session reads: uses reader
- Session history → Session transcripts: loads sessions
- Command registry → Task management: dispatches
- Command registry → Persistent memory: dispatches
- Command registry → Plugin options: configures plugins
- Plugin options → Secure credentials: stores secrets
- Secure credentials → macOS Keychain: uses on macOS
- IDE bridge → IDE extension: exchanges messages
- IDE bridge → Query engine: runs sessions
- Query engine → MCP servers: invokes tools