- Home
- Skills
- Business & Operations
- Deepen the Task: Rewrite a Feature Request Before You Build
Deepen the Task: Rewrite a Feature Request Before You Build
by Hatim Lk
Before you build a feature: how a professional in that field would do it, the rawest source material, the methods, the outside proof that it works, then the request rewritten with a pass bar for each requirement.
$7
Deepen the Task: Rewrite a Feature Request Before You Build
Example session with this skill installed
Deepen this feature request before we build it: add a CSV export button to the invoices page.
- Read your context and instructions
- Compiled the deepen the task
- Generated the data export
No project is in this working directory, so references to the repo below say how to find each thing, not a guessed path. Nothing has been built.
1. Field and professional
"Add a CSV export button to the invoices page" belongs to
financial data export and
spreadsheet interop. The professional is a
billing or accounts-receivable engineer who ships exports that accountants open in Excel and load into their bookkeeping software. They read RFC 4180, the OWASP CSV Injection page, ISO 4217's currency minor-units table and Excel's import behaviour for each locale.
2. What they'd do that the request doesn't ask
- Build the export from the same scoped, filtered query as the page, not from the rendered rows. ★ This changes how the work is done. Without it, the file either holds only the visible page of results or ignores the active filters. A second hand-written query can also drift from the page's tenant and role rules and leak rows.
- Write for the real opener: Excel, opened by double-click, in the user's locale. ★ This also changes the work. Without a UTF-8 BOM, accented names turn into garbage characters. In comma-decimal locales (fr-FR and others) Excel's list separator is
;, so a comma file opens as a single column. - Write money as exact decimal strings, with a separate currency column. Use the currency's real number of decimals (JPY 0, BHD 3) and no symbols or thousands separators. Without this, float drift (
0.30000000000000004) and1,234.00split across columns break the totals. - Escape formula injection in text cells only. Customer names and memos are user-controlled, so a value like
=HYPERLINK(...)would run when the file is opened. Prefix text cells that start with= + - @ \t \rwith'. Never escape the amount columns: a blanket rule on-corrupts credit notes and refunds. - Quote per RFC 4180 using a real CSV writer. Commas, quotes and line breaks inside memo fields shift every later column when strings are joined by hand.
- Measure the largest export before choosing how to generate it. Count the invoices of the biggest tenant under the widest filter. Without the number, the request either times out or loads everything into memory. This is a measurement, not an async pipeline.
- Read everything from one snapshot (a single query or transaction). Paging through live data can drop or duplicate rows while invoices are being written.
- Fix the column contract: names, order, ISO 8601 dates, and date vs timestamp stated with its timezone. Downstream macros and import templates break when columns move, and timezone shifts move invoices into the wrong month.
- Name the file by what it contains, e.g.
invoices_2026-11-01_2026-11-30_<exported-at>.csv. Otherwise several downloads namedexport.csvcan't be told apart.
Later (features, not part of this request): XLSX, column picker, scheduled or emailed exports, line-item export, accounting-software formats, background jobs for very large exports.
3. Rawest material
| Source | Where |
|---|---|
| CSV format | RFC 4180: https://www.rfc-editor.org/rfc/rfc4180 |
| Formula injection | OWASP "CSV Injection": https://owasp.org/www-community/attacks/CSV_Injection |
| Decimals per currency | ISO 4217 minor-units table (published by SIX, the maintenance agency) |
| The page's list query and its auth/tenant scoping | Repo: grep for the invoices route, controller or loader, and the function the list calls |
| Invoice schema (types of amount and date columns) | Repo migrations or schema file; or \d invoices (or equivalent) in the database |
| Real worst-case values | Production or staging query: longest names and memos; values containing , " \n; non-ASCII text; values starting with = + - @; negative totals; distinct currencies |
| Largest export size | SELECT tenant_id, count(*) FROM invoices GROUP BY 1 ORDER BY 2 DESC LIMIT 5 (adapt to the schema) |
| How the file is really used | A file the finance user makes by hand today, plus their accounting tool's import template. Ask for one; it doesn't exist in the repo. |
Digested material, to be treated as hypotheses: the one-line request itself, any ticket summary of it, and assumptions like "users just want the table as CSV".
4. Methods and tools
- Reuse the list query function, passing it the page's current filter and sort params. Question: does the export equal the view, under the same authorization?
- The stack's standard CSV writer, in streaming mode (e.g. Python
csvwith\r\n, Nodecsv-stringify), not joined strings. Question: are the RFC 4180 quoting rules correct? - Decimal or DB-
numeric-to-text formatting, using the currency's minor-units exponent. Question: does the exported amount equal the stored amount exactly? - Round-trip property test (e.g. Hypothesis or fast-check): generate adversarial strings, write them, parse them back with an independent parser. Question: does any input break the quoting?
- Reconciliation test: CSV row count and per-currency
SUM(total)vs a database aggregate over the same filter. Question: are rows lost or duplicated, and is there amount drift? - Injection fixture test: text cells starting with each trigger character get prefixed; negative amounts stay numeric. Question: is the file safe to open without breaking credit notes?
- Authorization test: tenant A, even with crafted filter params, exports no rows from tenant B. Question: does the export leak data?
- Load measurement: time and peak memory for an export of the largest tenant's size. Question: is a synchronous streamed response enough?
- Manual open in Excel (the user's locale), Google Sheets and LibreOffice. Question: does it open correctly for the real user?
5. Outside proof
- Ground truth: the database aggregate for the same filter. Pass = 0 difference in row count and in per-currency sum, compared exactly as decimals.
- Bars set before building (proposed; the numbers are yours to set):
- largest-tenant export finishes in under ~10 s;
- memory stays flat as rows grow (streamed);
- 0 formulas run on open;
- 0 cross-tenant rows;
- 100% of 10,000 adversarial rows round-trip unchanged.
- Held-out data: an anonymized sample of real invoices kept out of the test fixtures. Export it once at the end and pass with 0 diffs against the database.
- A judge: not needed, since no competing methods are being scored.
- Your own use: the finance user exports last month and opens the file by double-click in their own Excel. Pass if:
- accents render correctly;
- columns split correctly;
- the totals equal the month total in the accounting system;
- it imports into their tool with no hand edits.
6. Rewritten request
Add a CSV export button to the invoices page that downloads
every invoice matching the page's current filters and sort (not just the visible page), produced by
the same scoped query the page uses.
Stop gate: before the button is visible, show me the column contract (names, order, formats) and a sample file built from real worst-case rows, opened in Excel in my locale. Build the button only after I approve these.
Requirements, each with what proves it met:
1.
Same rows as the view, same permissions. Proof: an integration test shows CSV count and per-currency sum equal the DB aggregate for the same filter (0 difference), and tenant A exports 0 tenant-B rows even with crafted params.
2.
Correct CSV. RFC 4180, CRLF, standard writer, streamed. Proof: 10,000 generated adversarial rows round-trip through an independent parser at 100%.
3.
Opens correctly in my Excel. UTF-8 with BOM, delimiter <, or ; — my choice>. Proof: the manual open check in step 5 passes.
4.
Exact money. Decimal strings at the currency's ISO 4217 exponent, separate currency column, no symbols or thousands separators. Proof: the reconciliation test above, and a JPY/BHD fixture if those currencies exist.
5.
Safe text. Text cells starting with = + - @ \t \r are prefixed with '; amount columns are never touched. Proof: an injection fixture test, including a negative-total credit note that stays numeric.
6.
Dates. ISO 8601, with timezone stated for timestamps. Proof: an invoice issued at 23:30 local time on the last day of the month appears in that month.
7.
Size measured first. Report the largest tenant's row count and export time and memory before choosing the implementation. Proof: it meets the bars set in step 5.
8. Filename states the date range and export time. Proof: a unit test on the name.
Out of scope: XLSX, column picker, scheduled exports, line items.
7. Your choices before I build
- Delimiter and encoding: comma or semicolon, for the Excel locale your users actually have.
- Rows: all filtered rows (my recommendation) or only the visible page.
- Columns: the exact set and order, ideally matching your accounting tool's import template if you can share it.
- Bars: the time limit and the row count above which we'd revisit (e.g. 10 s / 50k rows).
- Granularity: one row per invoice (my recommendation) or one per line item.
export.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
What it does
A one-line feature request hides most of the work. Deepen the Task makes the request deeper, not bigger, before anyone writes code:
- Field and professional: which field the work belongs to, and who does it for a living.
- What they'd do that the request doesn't ask: the habits that change how the work is done, each with what breaks without it. Feature ideas go to a separate "later" list instead of creeping in.
- Rawest material: the primary sources (standards, schemas, real worst-case data, the user's own files) instead of summaries.
- Methods and tools: the techniques that answer each question, with the question they answer.
- Outside proof: ground truth, bars set before building, held-out data, and the user's own field test.
- The request rewritten: each requirement with what proves it was met, plus a stop gate before the risky part.
- Your choices: the decisions only you can make, with a recommendation.
Use it
Before any new feature, or say "deeper". Works on any stack: it reads your repo when there is one.
Works well with
Optional: decide-by-debate when several methods compete (sold separately or in the bundle).
Used on a real app
Used throughout the development of Glood (glood.app), an iPhone cycling app in public beta.
Does not execute code or build features. Keeps scope identical to the original request. Requires user approval of the rewritten proposal before proceeding.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
Nothing to install. It runs in your AI agent.
Optional companion: the decide-by-debate skill, used when several methods compete (sold separately or in the bundle). Not needed to use this skill.
Permissions
What's inside
Frequently Asked Questions
New in Business & Operations
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Business & Operations.