Octofriend is an open-source coding assistant that helps developers write and debug code faster. It integrates with TypeScript and supports Claude agents. Ideal for operations teams looking to automate coding tasks.
git clone https://github.com/synthetic-lab/octofriend.githttps://github.com/synthetic-lab/octofriend
1. Install Octofriend by following the instructions in the GitHub repository. 2. Set up your TypeScript project and ensure it's properly configured. 3. Use the prompt template to request help with your specific coding task. Be as detailed as possible about the task and requirements. 4. Review the code provided by Octofriend and test it thoroughly. Pay special attention to any edge cases mentioned. 5. Iterate on the code as needed, using Octofriend to help debug and refine your solution.
Quickly switch between different LLM models to find the best solution for coding challenges.
Utilize built-in Docker support to run code in isolated environments without complex setup.
Leverage custom-trained ML models to automatically fix code errors and improve code quality.
Integrate with MCP servers to access rich data and streamline development processes.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/synthetic-lab/octofriendCopy 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.
Help me write a TypeScript function to [TASK] using the following requirements: [REQUIREMENTS]. Provide the code and explain how it works. Also, suggest any potential edge cases I should test for.
Based on your request, here's a TypeScript function that calculates the total price of items in a shopping cart, including tax and discounts:
```typescript
function calculateTotalPrice(items: CartItem[], taxRate: number, discountCode?: string): number {
let subtotal = 0;
let discount = 0;
// Calculate subtotal
for (const item of items) {
subtotal += item.price * item.quantity;
}
// Apply discount if applicable
if (discountCode) {
if (discountCode === 'SAVE10') {
discount = subtotal * 0.1;
} else if (discountCode === 'SAVE20') {
discount = subtotal * 0.2;
}
}
// Calculate total with tax and discount
const total = (subtotal - discount) * (1 + taxRate);
return total;
}
```
This function takes an array of CartItem objects, a tax rate, and an optional discount code. It first calculates the subtotal by multiplying the price of each item by its quantity. Then, it applies a discount if a valid discount code is provided. Finally, it calculates the total by applying the tax rate to the discounted subtotal.
Potential edge cases to test for:
1. Empty cart
2. Invalid discount code
3. Negative quantities or prices
4. High tax rates (e.g., 100% or more)Cloud ETL platform for non-technical data integration
IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
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