Claude Code Manager (CCM) automates code management tasks for developers. It tracks execution, visualizes workflows, and integrates with Node.js projects. CCM connects to SQLite databases for data storage and provides CLI tools for streamlined operations.
git clone https://github.com/MarkShawn2020/claude-code-manager.gitClaude Code Manager (CCM) automates code management tasks for developers. It tracks execution, visualizes workflows, and integrates with Node.js projects. CCM connects to SQLite databases for data storage and provides CLI tools for streamlined operations.
1. **Install CCM**: Run `npm install -g claude-code-manager` to install the CLI tool globally. Ensure you have Node.js v18+ and SQLite installed. 2. **Initialize Project**: Navigate to your project directory and run `ccm init --db-path ./logs/errors.db` to set up the SQLite database for tracking errors and execution logs. 3. **Run Analysis**: Use the prompt template above to analyze your project. Replace `[PROJECT_NAME]` with your project name (e.g., `ecommerce-api`) and `[TASK]` with your specific goal (e.g., `identify the top 5 most frequent errors`). 4. **Visualize Workflows**: Run `ccm visualize --output workflows.mmd` to generate a Mermaid diagram of your project's workflows, which CCM tracks during execution. 5. **Integrate Monitoring**: Add `ccm track --error-log ./logs/errors.log` to your CI/CD pipeline to automatically log errors during deployments. Use `ccm monitor --threshold 10` to get alerts when error rates exceed 10 per minute. **Tips for Better Results:** - Use `--verbose` flag (e.g., `ccm analyze --verbose`) to get detailed stack traces and context for errors. - Combine CCM with `pm2` for real-time process monitoring: `pm2 start app.js --name api-server --attach --interpreter node -- ccm track --error-log ./logs/errors.log`. - Regularly prune old logs with `ccm cleanup --older-than 30d` to keep the SQLite database performant.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/MarkShawn2020/claude-code-managerCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use Claude Code Manager to [TASK]. For example: 'Use Claude Code Manager to analyze the execution logs of [PROJECT_NAME] from the last 7 days. Identify the top 5 most frequent errors and suggest fixes based on the error messages and stack traces.' Include [PROJECT_NAME] and [TASK] as placeholders.
Here’s the analysis of the execution logs for the `ecommerce-api` project over the past week:
**Top 5 Errors Identified:**
1. **Database Connection Timeout** (342 occurrences)
- Root Cause: Misconfigured connection pool size in `db.js`. The pool was set to 5, but the server handles 200+ concurrent requests.
- Fix: Increased pool size to 20 and added retry logic with exponential backoff.
- Impact: Reduced timeouts by 85% in staging.
2. **Invalid JWT Token** (218 occurrences)
- Root Cause: Token expiration time (`exp`) was set to 1 hour, but the frontend refreshes tokens every 30 minutes, causing race conditions.
- Fix: Extended token expiration to 2 hours and implemented silent refresh on the frontend.
- Impact: Eliminated 90% of 401 errors.
3. **Memory Leak in Image Processing** (156 occurrences)
- Root Cause: Unclosed file handles in the `sharp` library during image resizing. The `fs.unlink` was missing in the cleanup function.
- Fix: Added `await sharp(filePath).toFile(outputPath).then(() => fs.unlink(filePath))` to ensure cleanup.
- Impact: Reduced memory usage by 40% in load tests.
4. **Race Condition in Cart Updates** (98 occurrences)
- Root Cause: Concurrent requests to the `/cart` endpoint without proper locking mechanism, leading to lost updates.
- Fix: Implemented Redis-based distributed locks using `ioredis` with a 500ms TTL.
- Impact: Eliminated cart desync issues reported by users.
5. **Uncaught Promise Rejection** (72 occurrences)
- Root Cause: Missing `catch` block in the `stripe.webhooks` handler for payment success events.
- Fix: Added error handling and logging for all webhook events.
- Impact: Improved reliability of payment processing.
**Workflow Visualization:**
The CCM generated this Mermaid diagram of the error-prone workflows:
```mermaid
graph TD
A[Client Request] --> B[API Endpoint]
B --> C{Validate Token}
C -->|Invalid| D[Return 401]
C -->|Valid| E[Process Request]
E --> F[Database Query]
F --> G[Return Response]
G --> H[Close Connection]
H --> I[Log Error if Timeout]
```
**Recommended Next Steps:**
1. Deploy the fixes for the top 3 errors in the staging environment and monitor for 48 hours.
2. Run load tests with 1000 concurrent users to validate the memory leak fix.
3. Update the API documentation to reflect the new token expiration policy.
4. Schedule a team review of the race condition fix to ensure it aligns with the product roadmap.
**Database Insights:**
The CCM also queried the SQLite database to show the correlation between error rates and deployment times:
- Errors spike during deployments (e.g., 200 errors at 2:15 AM during the last deployment).
- Post-deployment, errors gradually decrease as the new code stabilizes.
Would you like me to generate a pull request with these fixes or create a dashboard to monitor these metrics in real-time?AI assistant built for thoughtful, nuanced conversation
Free Accounting Software
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan