invoice-total-fixer

Correct invoice totals by applying tax to subtotal in sandbox repositories.

3.6k|897|Updated May 31, 2025
One-click install
npx skills add https://github.com/openai/openai-agents-js --skill invoice-total-fixer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: invoice-total-fixer
Source: https://github.com/openai/openai-agents-js/tree/main/examples/docs/sandbox-agents/skills/invoice-total-fixer
Command: npx skills add https://github.com/openai/openai-agents-js --skill invoice-total-fixer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Corrects invoice totals by applying tax to the subtotal within sandbox repositories.

Core Features & Use Cases

  • Validates that the invoice total equals subtotal plus tax when taxRate is provided in tests.
  • Guides developers to inspect implementation and tests before editing, ensuring changes are verified with the project's test suite.

Quick Start

Edit the invoice total logic in the sandbox repository and run npm test to verify the changes.

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 invoice totals by applying tax to the subtotal in a sandbox repository?

To fix invoice totals by applying tax, edit the logic to enforce the formula subtotal + subtotal * taxRate. Inspect the implementation and tests in the sandbox repository before making changes to ensure accurate tax calculation adjustments.

Why does my invoice total not match the subtotal plus tax in npm tests?

Your invoice total fails npm tests because the calculation logic does not apply the correct formula subtotal + subtotal * taxRate. You must update the implementation to add the tax amount to the subtotal when a taxRate is provided.

What is the correct formula for calculating an invoice total with a tax rate?

The correct formula for calculating an invoice total with a tax rate is subtotal + subtotal * taxRate. This ensures the tax amount is accurately applied to the subtotal and added to the final total during sandbox testing.

How do I validate changes to invoice tax calculation logic using npm test?

To validate changes to invoice tax calculation logic, run npm test in your sandbox repository after editing the implementation. This executes the test suite to verify that your adjusted invoice total equals the subtotal plus the calculated tax.

Can I use this approach to verify tax logic in sandbox quickstart invoices?

Yes, you can verify tax logic in sandbox quickstart invoices by enforcing the correct total formula. Inspect the existing tests, adjust the invoice total calculation, and run npm test to confirm the tax adjustments are valid.

Do I need to inspect implementation tests before editing invoice total logic?

Yes, you need to inspect implementation tests before editing invoice total logic. Reviewing the test suite helps you understand the expected subtotal and taxRate behavior and ensures your changes pass validation when you run npm test.