Clear the backlog: 10 Codex prompts for your own files

price-list-update

push one price change through every file that mentions it

How to use it

Codex only. Nothing else to install. Save the prompt as a file and run it, or paste it straight into Codex.

codex exec -C "your folder" - < the-prompt.md

It does the whole job in one pass on your own machine and writes the result into the folder you pointed it at.

The prompt

---
name: price-list-update
description: Finds every place a price appears in your documents, spreadsheets and website files, shows the full list before changing anything, then applies the change and logs every edit so it can be reversed.
---

# Push one price change through every file that mentions it

In: one folder, the old price and the new one. Out: a list of every place that price appears for you to read first, then the change applied only where you said, a log of every edit, and a one-command undo.

Run it from the folder above the files:

```
codex exec -C "the folder" - < the-prompt.md
```

## What it does

1. **Take one folder and refuse to step outside it:** resolve the folder the owner names to an absolute path and store it. Refuse to run on a drive root, on the Windows or Program Files folders, or on the whole user profile, because a price sweep at that level reaches application settings and other people's documents. Do not follow a shortcut or a symbolic link that leads out of the folder. Skip any `.git` and `node_modules` folder. Before every single write, resolve the target path again and confirm it still begins with the stored folder path, because a path is only safe after it has been resolved, not when it was first read.

2. **Copy the whole folder before opening any file for writing:** make `price-backup-YYYY-MM-DD-HHMM` alongside it and copy everything in. This is the floor under the job, not the record of it: step 8 still logs every individual edit, because restoring a whole folder to undo one wrong line loses every other change made that day.

3. **Get the old price, the new price and the date it applies from, in writing:** the exact old figure, the exact new figure, the product or service it belongs to, and the date the new price takes effect. Never accept "put everything up 10 percent" as one instruction: work out each individual figure, list them, and have them confirmed one by one, because a percentage applied by a machine to 40 numbers is 40 chances to be wrong in a way nobody can check by reading.

4. **Search for every written form of the number, and match on whole words:** one price appears as 95, 95.00, £95, 95 GBP, and often spelled out. If the business quotes both with and without VAT, the same price also appears as its VAT-inclusive twin, 114.00 at the current 20 percent standard rate, so treat that as a second search rather than hoping to catch it. Match on word boundaries, which is what ripgrep's `-w/--word-regexp` does: "Require that all matches of the pattern be surrounded by word boundaries". Without it, searching for 95 also hits 195, 1995 and the postcode. Search the literal figure with `-F/--fixed-strings`, which "disable[s] regular expression matching and treat[s] the pattern as a literal string", so the full stop in 95.00 does not quietly match any character.

5. **Open the file types that hide their text:** the standard search tools skip, by their own documentation, files matching `.gitignore`, hidden files and directories, and binary files. Price lists live in exactly those places. So unzip and read `.docx` and `.xlsx`, which are compressed XML inside; extract text from PDFs; read `.csv` and `.txt`; check hidden folders explicitly; and list image and PDF filenames separately as things a person must check by eye, because a price baked into a picture of a menu cannot be edited by this job at all. Report the count of hits per file type so the owner can see what was searched, not just what was found.

6. **Sort every hit into three buckets before proposing a single change:** CHANGE, for a live price, a website page, the current price list, a quote template, a rate card. FROZEN, for anything already issued: an invoice, a receipt, a signed order, a past accounts file. UNSURE, for anything the run cannot place, and for any hit that is a number matching by coincidence, an order reference, a house number, a phone number, a date. FROZEN files are never edited, ever: HMRC requires VAT records to be kept for at least 6 years and requires a business to "keep copies of all the sales invoices you issue even if you cancel them or produce one by mistake". A wrong figure on an issued invoice is corrected by issuing a new document, not by editing the old one.

7. **Dry run, printed as a list a person can actually read, then stop:** one line per hit, showing the file, the line number, the whole line as it reads now, the whole line as it would read, and the bucket. Group by folder, and print the totals per bucket at the top. Change nothing. The owner reads the list and says which lines go ahead. A dry run is not permission, and silence is not permission either.

8. **Apply only the approved lines, one at a time, as exact literal replacements:** replace the exact matched text at that exact line number, never by re-running a pattern across the whole file, because the file may have changed since the plan was written. After each file, append to `price-change-log.csv`: the file path, the line number, the old text, the new text, a timestamp, and the file's size and modification time before and after. Write the log as you go rather than at the end, so a run that stops halfway still leaves a complete record of what it had already done.

9. **Write the undo, and prove it works before saying the job is done:** generate `undo-price-change` from the log, line by line, never from memory. Then test it: copy one changed file into a scratch folder, run the undo against the copy, and confirm it comes back byte for byte identical to the same file in the backup from step 2. Delete the scratch copy. Report the counts per bucket, the number of lines changed, where the backup lives, where the log lives, and the list of anything in UNSURE that still needs a person.

## Then it checks

1. Every path written begins with the resolved absolute path of the named folder. One that does not stops the run immediately, before anything else is reported.
2. The number of lines changed equals the number of lines the owner approved equals the number of rows in `price-change-log.csv`. Three numbers, one value, or the run stops.
3. No file in the FROZEN bucket has a modification time later than the start of the run. An issued invoice that changed is a failure, not a warning.
4. Search again for every written form of the old price. Every remaining hit sits in FROZEN or UNSURE and is named in the report. A remaining hit in a CHANGE file means the sweep missed a form of the number.
5. Search for the new price and confirm it appears at exactly the approved line numbers and nowhere else, so nothing was written twice.
6. Open three changed lines at random and read them whole: the currency symbol is present and not doubled, the decimal places are unchanged, the number is not stuck to the word beside it, and the sentence still reads correctly.

Any check fails: name it, redo that step once. Failed twice: say what is wrong and stop.

## Rules
- Public information only.
- Never invent a fact, a number or a quote.
- Nothing is edited until the dry run has been read and approved by the owner, line by line or bucket by bucket. Approving the plan is the only permission that counts.
- Never write to a file outside the named folder, and never follow a shortcut or symbolic link out of it. Resolve the path again immediately before every write.
- Never edit an issued invoice, receipt, credit note or past accounting record. VAT records must be kept for at least 6 years, and copies of sales invoices must be kept even when cancelled or produced by mistake. A wrong figure is corrected by a new document.
- A price shown to a consumer must be the final price including VAT and all other taxes, and must be "unambiguous, easily identifiable, clearly legible". A half-finished price change leaves two different prices live at once, which is a legal exposure and not merely untidy. Where the change follows a change in the VAT rate, a general notice may cover adjusted prices for 14 days from the date the change takes effect. This prepares the work for a person to check, and is not legal advice.

## Built from
- ripgrep, https://github.com/BurntSushi/ripgrep, 68,055 stars read from api.github.com on 7 September 2026: its GUIDE.md gives the exact behaviour behind step 4, that `-w/--word-regexp` will "Require that all matches of the pattern be surrounded by word boundaries" and that `-F/--fixed-strings` will "Disable regular expression matching and treat the pattern as a literal string". Its documented defaults, skipping `.gitignore` matches, hidden files and directories, and binary files, are the reason step 5 exists at all.
- sd, https://github.com/chmln/sd, 7,345 stars read from api.github.com on 7 September 2026: its `-p`/`--preview` flag, documented as "To preview changes: sd -p 'window.fetch' 'fetch' http.js". A preview flag shipped as a first-class feature of a replace tool is the argument for making the dry run in step 7 the default and the only route to a change.
- fastmod, https://github.com/facebookincubator/fastmod, 1,926 stars read from api.github.com on 7 September 2026: its review loop, where "you'll be shown a colored diff and asked if you want to accept the change ... reject it, or edit the line in question". Step 7 is that idea gathered into a single list a non-developer can read in one sitting, rather than a prompt per match.
- Keeping VAT records, HMRC, GOV.UK, https://www.gov.uk/charge-reclaim-record-vat/keeping-vat-records: "You must keep VAT records for at least 6 years", "keep copies of all the sales invoices you issue even if you cancel them or produce one by mistake", and that a wrong amount is put right by asking for a new invoice. That is the FROZEN bucket in step 6 and the rule that protects it.
- The Price Marking Order 2004, legislation.gov.uk, https://www.legislation.gov.uk/uksi/2004/102/body: article 1(2) defines the selling price as "the final price to be paid for a unit of a product, or a given quantity of a product, including VAT and all other taxes"; article 7(1)(a) requires price indications to be "unambiguous, easily identifiable, clearly legible"; article 11 allows a general notice "for a period of 14 days from the date any such change takes effect" after a change in the rate of VAT. That is the VAT-inclusive twin in step 4 and the 14 day figure in the rules.

Built from the best public work on this

Sources for price-list-update

Every source below was opened and read on 7 September 2026. Every star count was read from

`https://api.github.com/repos/<owner>/<repo>` on that date and is printed exactly as returned.

ripgrep

https://github.com/BurntSushi/ripgrep, GUIDE.md read at

https://raw.githubusercontent.com/BurntSushi/ripgrep/master/GUIDE.md

68,055 stars.

The most widely used search tool of its kind, and its guide is the closest thing this job has to a

primary source on how to search a folder without missing things or over-matching. Read for two

questions: how do you stop a search for one number matching a longer number, and what does a search

tool quietly refuse to look at.

On the first, `-w/--word-regexp` will "Require that all matches of the pattern be surrounded by word

boundaries", and `-F/--fixed-strings` will "Disable regular expression matching and treat the pattern

as a literal string". Both matter here for the same reason: a price is a short string of digits with

a full stop in it, which is the worst possible thing to feed to a naive pattern search.

On the second, and this is the part that changes the skill most, ripgrep by default skips three

categories: files matching patterns in `.gitignore`, hidden files and directories, and binary files

identified by NUL bytes. A price list in a `.xlsx` is a binary file to a text searcher. A rate card in

a hidden folder is invisible. A tool that reports "3 matches found" while silently declining to open

the spreadsheet the prices actually live in produces a confident, wrong answer.

Decisions it produced: the whole-word and literal matching rules in step 4, and the whole of step 5,

which forces the run to open the compressed and binary formats explicitly and to report hits per file

type so the owner can see what was searched rather than only what was found.

sd

https://github.com/chmln/sd, README read at https://raw.githubusercontent.com/chmln/sd/master/README.md

7,345 stars.

A modern find and replace tool. Read to answer one question: do the people who build these tools

treat a preview as an optional extra or as part of the job.

They treat it as part of the job. The README documents a preview flag as a headline feature: "To

preview changes: sd -p 'window.fetch' 'fetch' http.js". It also makes a broader case worth carrying

over, that its syntax is deliberately split into find and replace as separate arguments so the

expression is "easy to read and write", against the older approach of a single escaped expression

that nobody can check by eye.

Decision it produced: step 7, the dry run, is not an option in this skill. It is the only route to a

change, and it is printed as a readable table of before and after lines rather than as a pattern the

owner would have to mentally execute.

fastmod

https://github.com/facebookincubator/fastmod, README read at

https://raw.githubusercontent.com/facebookincubator/fastmod/main/README.md

1,926 stars.

A large-scale code modification tool from Facebook Incubator, built for exactly the shape of problem

this skill has: one string, many files, and a human who has to stay in control. Read for the review

mechanism.

Its interactive loop is described as: "For each match of the regex, you'll be shown a colored diff and

asked if you want to accept the change ... reject it, or edit the line in question in your $EDITOR of

choice." Three outcomes per match, not two. The third one, edit this line by hand, is the one that

matters for prices, because a line often needs a different fix from the one the pattern would make.

Decision it produced: the three buckets in step 6, CHANGE, FROZEN and UNSURE, are the same idea moved

up a level. A per-match prompt is right for a developer running a tool and wrong for a business owner

with 200 hits, so the skill batches the same three-way decision into one list read in one sitting.

Keeping VAT records

HMRC, GOV.UK, https://www.gov.uk/charge-reclaim-record-vat/keeping-vat-records

Read to establish what must not be touched, because the dangerous half of this job is not the files it

changes but the files it must leave alone.

It states plainly: "You must keep VAT records for at least 6 years (or 10 years if you are using the

VAT One Stop Shop (OSS) scheme". It requires a business to "keep copies of all the sales invoices you

issue even if you cancel them or produce one by mistake". And on a wrong figure, it directs that you

ask the supplier to correct it and issue a new invoice, rather than treating the document as editable.

Decisions it produced: the FROZEN bucket in step 6, the rule that an issued document is never edited,

check 3, which fails the run if any FROZEN file has a modification time later than the start of the

run, and the wording in the rules that a wrong figure is corrected by a new document.

The Price Marking Order 2004

legislation.gov.uk, https://www.legislation.gov.uk/uksi/2004/102/body and article 11 at

https://www.legislation.gov.uk/uksi/2004/102/article/11/made

Read on the primary source rather than a summary, because the two figures taken from it are the kind

that get repeated wrongly.

Article 1(2) defines "selling price" as "the final price to be paid for a unit of a product, or a given

quantity of a product, including VAT and all other taxes (but excluding the amount of any deposit)".

Article 7(1)(a) requires an indication of price to be "unambiguous, easily identifiable, clearly

legible, and displayed using a font which is clear and of reasonable size". Article 11 allows a trader

who adjusts prices after a change in the rate or coverage of VAT to comply "by means of a general

notice or notices for a period of 14 days from the date any such change takes effect".

That last figure is 14 days, read from the legislation itself. It is worth saying so explicitly,

because a longer figure circulates in secondary write-ups of this Order and would give an owner a

false sense of how long a half-updated price list can sit there.

Decisions it produced: the VAT-inclusive twin search in step 4, since the consumer-facing figure is the

one including VAT and it is frequently a different number in the same folder; and the rule explaining

why a half-finished price change is a legal exposure, with the 14 day allowance stated correctly.

Best public prompt we found for this job

fastmod's README, https://github.com/facebookincubator/fastmod. Of everything read, it is the only

artefact that describes a bulk edit as a conversation rather than a command, and it is the sentence a

non-developer instantly understands.

The line worth copying verbatim into any bulk find and replace prompt:

"For each match of the regex, you'll be shown a colored diff and asked if you want to accept the

change ... reject it, or edit the line in question in your $EDITOR of choice."

Want this running in your business?

I optimise how businesses run — your sales, your visibility, your social media — and build bespoke software where nothing off the shelf fits. The first conversation is free. Work starts from £150 a day.