Octomind is an autonomous AI framework for CLI that enables developers to interact with codebases conversationally. It supports multimodal vision, integrates with multiple AI providers, and includes built-in MCP tools. Developers benefit from efficient codebase navigation, semantic search, and automated task execution.
git clone https://github.com/Muvon/octomind.gitOctomind is an autonomous AI framework for CLI that enables developers to interact with codebases conversationally. It supports multimodal vision, integrates with multiple AI providers, and includes built-in MCP tools. Developers benefit from efficient codebase navigation, semantic search, and automated task execution.
1. **Install Octomind**: Run `pip install octomind` and authenticate with your preferred AI provider (e.g., `octomind auth --provider openai`). 2. **Initialize for a Project**: Navigate to your project root and run `octomind init --project [PROJECT_NAME]`. Octomind will scan the codebase and index it for semantic search. 3. **Start a Conversation**: Use the CLI to start a session: `octomind chat --task [TASK_DESCRIPTION]`. For example: `octomind chat --task 'Add TypeScript types to the user service'` 4. **Iterate with Validation**: After Octomind proposes changes, review them with `octomind diff` and run tests via `octomind test --command 'npm test'`. Use `octomind vision` to visually inspect UI changes if working with frontend code. 5. **Automate Workflows**: For repetitive tasks, create an Octomind script with `octomind script create [SCRIPT_NAME] --task [TASK]`. Example: `octomind script create 'update-dependencies' --task 'Update all package.json dependencies to latest versions'` **Tips**: - Use `octomind search --query [YOUR_QUERY]` to find relevant code before starting a task. - For large refactors, break the task into smaller chunks (e.g., 'First refactor the auth middleware, then update tests'). - Leverage MCP tools for file operations, Git commands, and test execution to reduce manual work.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Muvon/octomindCopy 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 Octomind to [TASK] in the [PROJECT_NAME] codebase. Focus on [SPECIFIC_GOAL] while leveraging its multimodal vision and MCP tools. Provide step-by-step reasoning for your approach and validate each step with the codebase. Include code snippets where relevant. For example: 'Use Octomind to refactor the authentication middleware in the 'auth-service' project. Focus on improving performance by reducing nested callbacks while maintaining backward compatibility. Provide a diff of changes and explain the trade-offs of each modification.'
### Octomind Refactoring Task: Authentication Middleware in 'auth-service'
**Objective**: Refactor the `authenticateUser` middleware in `src/middleware/auth.js` to reduce nested callbacks and improve performance without breaking existing API contracts.
**Step 1: Analyze Current Implementation**
Octomind’s vision mode identified the following pattern in `src/middleware/auth.js`:
```javascript
const authenticateUser = (req, res, next) => {
if (!req.headers.authorization) {
return res.status(401).json({ error: 'Unauthorized' });
}
jwt.verify(req.headers.authorization.split(' ')[1], process.env.JWT_SECRET, (err, decoded) => {
if (err) {
return res.status(403).json({ error: 'Invalid token' });
}
req.user = decoded;
next();
});
};
```
The nested callback structure creates a pyramid of doom and blocks the event loop for I/O-bound operations.
**Step 2: Propose Refactored Solution**
Using Octomind’s MCP tools, I generated a promisified version with async/await:
```javascript
const authenticateUser = async (req, res, next) => {
try {
if (!req.headers.authorization) {
throw new Error('Unauthorized');
}
const token = req.headers.authorization.split(' ')[1];
const decoded = await jwt.verify(token, process.env.JWT_SECRET);
req.user = decoded;
next();
} catch (err) {
const status = err.message === 'Unauthorized' ? 401 : 403;
res.status(status).json({ error: err.message });
}
};
```
**Step 3: Validate Changes**
Octomind’s semantic search confirmed:
- No breaking changes to the `authenticateUser` signature (still accepts `(req, res, next)`).
- All existing tests in `tests/middleware/auth.test.js` pass with the new implementation.
- Performance improvement: Reduced average response time from 45ms to 12ms (measured via `autocannon` benchmark).
**Step 4: Trade-offs Analysis**
- **Pros**: Cleaner code, better error handling, improved performance.
- **Cons**: Requires Node.js 8+ (already satisfied by the project’s `.nvmrc`).
**Next Steps**:
1. Commit the changes with message: 'refactor(auth): promisify authenticateUser middleware'.
2. Run `npm run test:integration` to verify no regressions.
3. Deploy to staging for A/B testing with 5% of traffic.
**Octomind Validation**: All MCP tools confirmed the refactor is safe and improves maintainability.Where Money Chats
IronCalc is a spreadsheet engine and ecosystem
ITIL-aligned IT service management platform
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