Skip to content
Ciying AI Directory
HomeAI toolsGuidesAI newsSkills directoryChatGPT skillsClaude Code skillsCodex skillsTrending in 24 hoursTop 100 skillsDaily updates
Ciying AI Directory
AI DirectorySkills
中文
Ciying AI Directory
HomeAI toolsGuidesAI newsSkills directoryChatGPT skillsClaude Code skillsCodex skillsTrending in 24 hoursTop 100 skillsDaily updates
Skills directory/openai/openai-agents-js/invoice-total-fixer

Invoice Total Fixer: An OpenAI Agents SDK Sandbox Example

Practice a small agent-assisted code correction against a sandbox invoice fixture. Apply a percentage tax to the subtotal and verify the change using the fixture’s test.

中文

Setup for OpenAI Agents SDK for JavaScript (sandbox example)

A disposable copy of the OpenAI Agents SDK JavaScript examples, using the documented sandbox quickstart and its Node.js repo fixture. Use fictional invoice numbers for this teaching example.

  1. Open the pinned repository snapshot and locate examples/docs/sandbox-agents. Keep the sample repo and skills directories together with the quickstart files.
  2. Use that revision’s sandbox example to load skills/invoice-total-fixer/SKILL.md. Work only inside the sandbox sample repository.
  3. Ask the agent to inspect src/invoice.mjs and tests/invoice.test.mjs, fix the percentage calculation, and run npm test from the sample repo.

Example task

Use invoice-total-fixer on the sandbox example. For an additional mental check, use a subtotal of 125 and a tax rate of 0.08. Before changing code, find the implementation and the existing test. After the smallest fix, run the test and report the actual results.

Expected result

Eight percent of 125 is 10, so the example total is 135. The existing fixture test should pass after a correct change. The agent should show the observed test status and the source file it changed.

Upstream documentation

Original SKILL.md on GitHub · MIT license · Source reviewed 2026-11-15

Frequently asked question

Why does the example use 0.08 instead of 8?

The calculation treats the rate as a fraction, so 0.08 represents eight percent. Check your own data contract before reusing the formula with a different rate representation.

Skills directoryTrending 24hTop 100Daily updates
Ciying AI DirectoryAI toolsGuidesAI newsSkills directory