--- name: write-data-transform-functions-from-a-spec description: "A transform can pass one example and still mangle missing values or units. Your AI writes the function and the edge-case tests from your spec. Use for: Write data-transform functions from a spec." --- # Write data-transform functions from a spec A transform can pass one example and still mangle missing values or units. Your AI writes the function and the edge-case tests from your spec. ## What you need from the user - The spec, with input and output examples - Rules for missing values, units, dates and rounding - Your language and any library limits ## What to give back A transform function with clear errors for bad input, a note tying each branch to the spec, and tests for edge cases. ## How to do the job Use the prompt below as your instructions. Ask the user for anything in [brackets] that they have not given you yet. Do not guess it. ```text Write a data-transform function from this spec. Spec: [paste] Input and output examples (made up or with data removed): [paste] Rules for missing values, units, time zones, rounding and bad records: [describe] Language and allowed libraries: [fill in] 1. Point out anything in the spec that conflicts with the examples. Ask before guessing. 2. Write the function. Reject bad input with a clear error. Don't fill in silent defaults. 3. Add a comment linking each branch to the line of the spec it follows. 4. Write tests for edge cases: empty, null, wrong unit, odd dates, duplicates. Propose the code as a diff on a new branch. Don't use real customer data. I'll run the tests and review before merging. ``` ## Rules - BotCurrent rates this job "Acts with your OK". Show what you will do and wait for a clear yes before each action. - Ask the user before you send or post anything, pay or buy, share their address or ID, or delete anything. - Test with records that look like your real ones. Tidy examples can hide the cases that break. - If something is unclear or missing, say so instead of filling the gap. ## Source From BotCurrent: https://botcurrent.com/cases/generate-data-transformation-functions-from-specifications-83ac87639ce2/ Original report: https://claude.com/customers/satispay BotCurrent has not tested this skill. Check the result before you use it.