{"id":29806265,"url":"https://github.com/yifanzz/claude-code-boost","last_synced_at":"2025-10-09T11:35:14.860Z","repository":{"id":305692219,"uuid":"1021694916","full_name":"yifanzz/claude-code-boost","owner":"yifanzz","description":"Claude Code Boost - Hook utilities for Claude Code with intelligent auto-approval","archived":false,"fork":false,"pushed_at":"2025-09-11T16:04:59.000Z","size":13025,"stargazers_count":123,"open_issues_count":3,"forks_count":26,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-16T05:55:24.194Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yifanzz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-07-17T19:48:52.000Z","updated_at":"2025-09-15T17:17:34.000Z","dependencies_parsed_at":"2025-07-21T15:09:03.039Z","dependency_job_id":"587c83b3-59bc-460b-8e32-a846f2b43ab5","html_url":"https://github.com/yifanzz/claude-code-boost","commit_stats":null,"previous_names":["yifanzz/claude-code-boost"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/yifanzz/claude-code-boost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifanzz%2Fclaude-code-boost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifanzz%2Fclaude-code-boost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifanzz%2Fclaude-code-boost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifanzz%2Fclaude-code-boost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yifanzz","download_url":"https://codeload.github.com/yifanzz/claude-code-boost/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifanzz%2Fclaude-code-boost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001304,"owners_count":26083058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-28T14:05:55.472Z","updated_at":"2025-10-09T11:35:14.844Z","avatar_url":"https://github.com/yifanzz.png","language":"TypeScript","readme":"# Claude Code Boost\n\nSmart hooks for Claude Code that reduce friction and keep quality high.\n\n- Auto-approve safe dev operations (less clicking, more coding)\n- Nudge/run tests before ending sessions when changes warrant it\n- Optional desktop notifications for long-running tasks\n\n## Quick Start\n\n```bash\nnpm install -g claude-code-boost\nccb install\n```\n\nSee what gets auto-approved and blocked in the sections below.\n\n## Installation\n\n**Prerequisites**: Node.js 20+ and Claude Code installed\n\n```bash\n# Step 1: Install Claude Code Boost globally\nnpm install -g claude-code-boost\n\n# Step 2: Run the install command to set up the hook\nccb install\n```\n\nThe `ccb install` command guides you through:\n1. Choose installation location (user, project, or project-local settings)\n2. Choose authentication method (API proxy or direct API key)\n3. Configure Claude Code settings automatically\n4. Verify the setup works\n\n## Feature Details\n\n### Auto-Approval Hook\nReduces manual approval overhead by automatically approving common safe operations:\n- File operations (reading, writing, basic file management)\n- Standard build/test commands (`npm test`, `npm build`, `git commit`)\n- Local development requests (`curl localhost:3000`)\n- Package management (`npm install`, dependency updates)\n- Basic Docker operations\n\nAlways blocks destructive system commands (`rm -rf /`, disk formatting, etc.)\n\n### Test Enforcement Hook\nAnalyzes conversation transcripts to detect when tests should be run before ending a session:\n- Parses Claude Code conversation history\n- Uses LLM analysis to determine if code changes warrant testing\n- Can block session termination until tests are executed\n\n### Notification Hook\nSimple desktop notifications for Claude Code events:\n- Cross-platform support (macOS, Windows, Linux)\n- Useful for long-running operations or important alerts\n\n### Transcript Parser\nUtility for processing Claude Code conversation logs:\n- Converts JSONL transcript format to structured XML\n- Extracts user messages, assistant responses, and commands\n- Useful for analysis or integration with other tools\n\n## How it works\n\nClaude Code Boost uses Claude Code's hook system to intercept tool calls before execution:\n\n```\nClaude Code Tool Request → CCB Hook → Decision → Execute/Block\n```\n\n### Auto-Approval Logic\n1. **Fast approval** for obviously safe operations (Read, LS, Glob)\n2. **LLM analysis** for complex operations using system prompts\n3. **Caching** to avoid redundant API calls for identical requests\n4. **Always block** genuinely destructive commands\n\n### Authentication Options\n- beyondthehype.dev API proxy (simplest setup)\n- OpenAI API (for OpenAI or compatible endpoints)\n- Anthropic API (direct Claude access)\n\n## Configuration\n\n### Quick Setup\n```bash\n# Interactive installation with prompts\nccb install --user\n\n# Non-interactive with API key  \nccb install --user --api-key sk-your-api-key-here\n\n# Use project-level settings\nccb install --project-local\n```\n\n### Advanced Configuration\n\nCCB uses a configuration file located at `~/.ccb/config.json` (or `$CCB_CONFIG_DIR/config.json`):\n\n```json\n{\n  \"log\": true,        // Enable/disable approval logging\n  \"cache\": true,      // Enable/disable approval caching (default: true)  \n  \"apiKey\": \"sk-...\"  // Anthropic API key (optional)\n}\n```\n\n**Configuration Options:**\n\n- **`log`** (boolean, default: `true`): Controls whether approval decisions are logged to `~/.ccb/approval.jsonl`\n- **`cache`** (boolean, default: `true`): Controls intelligent caching of approval decisions to avoid redundant AI calls\n- **`apiKey`** (string, optional): Anthropic API key for direct API access (overrides `ANTHROPIC_API_KEY` environment variable)\n\n**Caching Behavior:**\n- ✅ **Enabled by default** for optimal performance\n- 🏠 **Working directory scoped** for safety across different projects\n- 🎯 **Caches only definitive decisions** (approve/block, not \"unsure\")\n- 🚀 **Instant responses** for repeated operations\n- 🧹 **Easy management** with `ccb debug clear-approval-cache`\n\n```bash\n# Disable caching if needed\necho '{\"log\": true, \"cache\": false}' \u003e ~/.ccb/config.json\n\n# Clear approval cache\nccb debug clear-approval-cache\n```\n\n### What gets auto-approved? ✅\n- **File operations**: Reading, writing, editing files\n- **Development tools**: `npm test`, `npm build`, `git commit`\n- **Localhost requests**: `curl http://localhost:3000`\n- **Docker operations**: `docker build`, `docker run`\n- **Package management**: `npm install`, `yarn add`\n\n### What gets blocked? ❌  \n- **System destruction**: `rm -rf /`, `rm -rf /usr`\n- **Disk operations**: `mkfs`, destructive `fdisk`\n- **Malicious activity**: DoS attacks, credential theft\n\n## Testing \u0026 Verification\n\n### Test Auto-Approval Hook\n```bash\n# Test safe operation approval\necho '{\"session_id\":\"test\",\"transcript_path\":\"/tmp/test\",\"tool_name\":\"Read\",\"tool_input\":{\"file_path\":\"/etc/hosts\"}}' | ccb auto-approve-tools\n# Expected: {\"decision\":\"approve\",\"reason\":\"Read is a safe read-only operation\"}\n\n# Test dangerous operation blocking\necho '{\"session_id\":\"test\",\"transcript_path\":\"/tmp/test\",\"tool_name\":\"Bash\",\"tool_input\":{\"command\":\"rm -rf /\"}}' | ccb auto-approve-tools\n# Expected: {\"decision\":\"block\",\"reason\":\"...\"}\n```\n\n### Test Other Hooks\n```bash\n# Test notification system\necho '{\"session_id\":\"test\",\"transcript_path\":\"/tmp/test\",\"cwd\":\"/tmp\",\"hook_event_name\":\"Notification\",\"message\":\"Test notification from CCB\"}' | ccb notification\n\n# Test Stop hook (requires transcript file)\necho '{\"session_id\":\"test\",\"transcript_path\":\"/path/to/transcript.jsonl\",\"cwd\":\"/tmp\",\"stop_hook_active\":false}' | ccb enforce-tests\n```\n\n### Debug Commands\n```bash\n# Clear approval cache\nccb debug clear-approval-cache\n\n# View current config\ncat ~/.ccb/config.json\n\n# View approval logs  \ntail -f ~/.ccb/approval.jsonl\n\n# View cached decisions\ncat ~/.ccb/approval_cache.json\n```\n\n## Development Goals\n\nClaude Code Boost aims to make Claude Code more practical for daily development work by reducing friction in common workflows.\n\n### What's Working Today\n- 🛡️ Auto-approval for safe operations (reduces manual clicking)\n- 🧪 Test enforcement through conversation analysis\n- 🔔 Basic desktop notifications\n- 📊 Transcript parsing utilities\n\n### Planned Improvements\n- Better caching strategies to reduce API costs\n- More sophisticated test detection patterns\n- Additional hook types based on user feedback\n- Performance optimizations\n\nThis is an early-stage project that solves real workflow friction. Contributions and feedback are welcome as we figure out what developers actually need from Claude Code automation.\n\n## Community \u0026 Support\n\n- **Issues**: [Report bugs or request features](https://github.com/yifanzz/claude-code-boost/issues)\n- **Discussions**: [Share usage patterns and suggestions](https://github.com/yifanzz/claude-code-boost/discussions)  \n- **Documentation**: [Development setup in CLAUDE.md](./CLAUDE.md)\n- **Contributing**: See CLAUDE.md for local development instructions\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n---\n\n```bash\nnpm install -g claude-code-boost \u0026\u0026 ccb install\n```\n","funding_links":[],"categories":["HarmonyOS","Tools \u0026 Utilities","SDK与开发工具"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyifanzz%2Fclaude-code-boost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyifanzz%2Fclaude-code-boost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyifanzz%2Fclaude-code-boost/lists"}