invoice-total-fixer

Fixes invoice total calculations by applying tax as a percentage of the subtotal.

Updated May 23, 2026
One-click install
npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill invoice-total-fixer-kiranimmadi2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: invoice-total-fixer
Source: https://github.com/kiranimmadi2/promptforge-ai/tree/main/openai-agents-js/examples/docs/sandbox-agents/skills/invoice-total-fixer
Command: npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill invoice-total-fixer-kiranimmadi2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Invoice totals in the sandbox quickstart repository are calculated incorrectly, causing test failures. This Skill guides the correction of the total formula so tax is applied as a percentage of the subtotal. ## Core Features & Use Cases - Implementation Inspection: Reviews the existing invoice total code and its test before making any edits. - Formula Correction: Applies the expected formula subtotal + subtotal * taxRate to compute the total. - Test Verification: Runs npm test from the repository directory after editing and reports the result. - Use Case: A developer working through the sandbox agents quickstart finds the invoice total test failing and needs the calculation fixed and verified. ## Quick Start Fix the invoice total calculation in the sandbox quickstart repository so tax is applied as a percentage of the subtotal, then run npm test to verify.

Frequently Asked Questions about invoice-total-fixer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix an incorrect invoice total calculation?

Inspect the implementation and its test first, then update the total formula to subtotal + subtotal * taxRate so tax is applied as a percentage of the subtotal. Run npm test afterward to confirm the fix.

What is the correct formula for invoice total with tax?

The expected formula is subtotal + subtotal * taxRate, where taxRate is expressed as a decimal percentage. This adds the tax amount to the subtotal to produce the final total.

How do I verify an invoice calculation fix in a Node.js repository?

Run npm test from the repository directory after editing the implementation. The test suite validates the corrected total calculation, and the command result should be reported.

Why does my invoice total test keep failing?

The test fails when the implementation does not apply tax as a percentage of the subtotal. Check that the formula matches subtotal + subtotal * taxRate rather than adding the tax rate directly or ignoring it.