Empezar
Scheduled-Agent Prompt Diet — Pointer Prompts

Scheduled-Agent Prompt Diet — Pointer Prompts

Turn a long recurring agent prompt into a short pointer prompt plus a procedure file, with a keep/delete table for every sentence.
#Investigación
Valoración
Se necesitan más valoraciones
Vendidos
0
Cómo se usa
Descargar

How it works

Scheduled-Agent Prompt Diet takes the long prompt of a recurring agent job (a cron or scheduled routine) and turns it into three things you can review: a procedure file for your repository, a pointer prompt under 700 characters for the scheduler, and a keep/delete table.

1. Measure and segment. It counts the characters, splits the prompt into numbered sentences and states the core job in one sentence. If the prompt has no clear job, it stops and tells you.

2. Classify every sentence. KEEP (changes the agent's decision on every run, such as a silent-output rule or a stop condition), MOVE (procedure that belongs in a file) or DELETE (incident history, finished decisions, justifications). Each row quotes the original text and gives a one-line reason.

3. Flag what a rewrite must not hide. Secrets pasted into the prompt, instructions that contradict each other, and references to files nobody explained are listed as findings and marked NEEDS-OWNER instead of being guessed.

4. Give you a safe rollout order. Push the procedure file first, then change only the prompt text, then read it back and check the length.

Sample output

Real run of this Skill on a sample prompt we wrote (a fake shop inventory agent whose prompt contains an old incident note, a retired data source, a pasted fake API key, two contradicting email rules and a silent-output rule). The Skill's actual output, unedited:

Measure

Original: 1478 characters (the prompt text only, counted from "[Daily Inventory Check" to "daily stock report"."), 18 segments. Core job: "Each morning, compare every SKU in inventory/stock.csv against inventory/reorder-points.csv and write the SKUs at or below their reorder point to reports/low-stock-today.md."

Findings

  • [secret] S4: The prompt contains a supplier API key (a live-looking secret key). It is NOT copied into any artifact below. Rotate this key now, because it has been pasted into a chat and a scheduler prompt, and store the new one outside the prompt (in your secret store or environment).
  • [conflict] S12 vs S13: S12 says "Never email a supplier directly; draft the order in reports/draft-orders.md and wait for a human." S13 says "always send the supplier an email with the order the moment a SKU is low." These are opposite. Not resolved here. Both are marked NEEDS-OWNER and the email behavior is left out of the pointer prompt until you decide.
  • [dangling] S4: The prompt uses a supplier API for lead times but never says which tool, endpoint or where the key lives once removed from the prompt. NEEDS-OWNER.
  • [dangling] S5: returns.csv is given without a folder. Kept as written; confirm the full path. NEEDS-OWNER.
  • [unclear] S11 vs S18: "write no file" when nothing is low, but the prompt also says to commit the report at the end. The prompt does not say whether to skip the commit on a silent run. Kept as written; NEEDS-OWNER.
  • [unclear] S17: On Mondays only SKUs starting A-M are checked, so N-Z SKUs are never checked on Mondays. Kept as written (it changes what the agent does); flagged only because the stated reason (slow repo) is history, not a requirement.
  • [unclear] S6: S6 uses "returns.csv" rows "marked pending" but not which column or value marks them. Kept as written.

A. Procedure file

Save at a path of your choice (referred to in the pointer prompt as <your-procedure-file>).

# Daily Inventory Check

Schedule: every day 07:30.
Role: you are the inventory agent for our shop.

## Hard rules (these override everything else)
- If nothing is at or below its reorder point: reply with a single `.` and write no file.
- If inventory/stock.csv is missing: stop, reply "stock.csv missing", and do nothing else.

## Steps
1. Pull the latest repository.
2. Open inventory/stock.csv.
3. Subtract the rows in returns.csv that are marked pending from the counts before comparing.
   NEEDS-OWNER: full path of returns.csv, and which column/value means "pending".
4. Compare each SKU against inventory/reorder-points.csv.
   - On Mondays, only check SKUs whose names start with A-M.
5. For every SKU at or below its reorder point, add a line to reports/low-stock-today.md with: SKU, current count, reorder point.
6. Look up supplier lead times with the supplier API. Do not print the API key.
   NEEDS-OWNER: which tool/endpoint to call, and where the key is stored now (the old key must be rotated).
7. Draft the order in reports/draft-orders.md.
   NEEDS-OWNER: conflicting instructions. One said "Never email a supplier directly; draft the order and wait for a human." Another said "always send the supplier an email with the order the moment a SKU is low." Decide which one applies (or when each applies).
8. Keep the report under 40 lines.
9. Commit the report at the end with the message "daily stock report".
   NEEDS-OWNER: should the commit be skipped on a silent run (nothing low, no file written)?

B. Pointer prompt (394 characters)

[Daily Inventory Check — every day 07:30] Pull the latest repository, then read <your-procedure-file> and follow it exactly. The procedure file is the source of truth (do not paste its contents back into this prompt). If no SKU is at or below its reorder point, reply with a single . and write no file. If inventory/stock.csv is missing, stop, reply "stock.csv missing" and do nothing else.

(The supplier-email rule is not in the pointer prompt because S12/S13 conflict; add it once you decide.)

C. Keep/delete table

S# Starts with Label Reason
S1 "[Daily Inventory Check — every day 07:30]" MOVE Routine name/schedule go into the pointer prompt; role line goes in the file.
S2 "Every morning pull the latest repo," MOVE Procedure steps (pull, open stock.csv, compare to reorder-points.csv). Pull is also in the pointer.
S3 "For every SKU at or below" MOVE Report-writing step and format.
S4 "Use the supplier API key ..." MOVE Lookup step moves to the file; the key itself is removed (secret) and flagged NEEDS-OWNER.
S5 "IMPORTANT: on 2026-09-02 the agent" DELETE Incident history; the rule inside it is carried by S6.
S6 "so always subtract rows in returns.csv" MOVE Live rule that changes counts every run; kept in the file as step 3, not deleted.
S7 "That incident is resolved and" DELETE Finished decision, no effect on current behavior.
S8 "We switched from the old Sheets" DELETE Migration log.
S9 "the old export is retired, ignore" DELETE Retired source; the agent only reads the CSV in the steps anyway.
S10 "Be friendly and encouraging in" DELETE Tone filler (per Phase 2). Note: if you want the tone, move it back.
S11 "If nothing is at or below" KEEP Silent-output rule; changes the reply every run. In pointer and file.
S12 "Never email a supplier directly;" NEEDS-OWNER Approval-gate style rule that directly conflicts with S13.
S13 "Also, always send the supplier" NEEDS-OWNER Conflicts with S12.
S14 "Keep the report under 40" MOVE Format limit.
S15 "If stock.csv is missing, stop" KEEP Hard stop condition. In pointer and file.
S16 "Historically the agent was slow on" DELETE History/justification.
S17 "so on Mondays only check SKUs" MOVE Live rule that changes which SKUs are checked; kept in step 4.
S18 "Remember to commit the report at" MOVE Procedure step (commit message).

Rollout checklist

  1. Save and push the procedure file BEFORE changing the scheduler. A pointer prompt that references a file that does not exist yet makes the next run fail. Resolve the NEEDS-OWNER items in the file first.
  2. Rotate the leaked supplier API key and store the new one outside the prompt.
  3. Change only the prompt text in the scheduler. Leave the schedule and the name alone.
  4. Read the prompt back from the scheduler and confirm it is under 700 characters and that the path resolves in the pushed commit.
  5. Check the repeat factor yourself: look at how your scheduler echoes the prompt in its responses and logs. The saving is (1478 − 394) = 1084 characters × the number of times you actually see it.
  6. After the first real run, compare the output with an earlier run. If the behavior drifted, the cause is a segment labeled DELETE or MOVE that was really KEEP — move it back.

Use cases

  • Shrink a scheduled-agent prompt that has grown by accretion after every incident
  • Move the procedure of a recurring job into a file that can be searched and reviewed in git
  • Find a secret or a contradiction hiding in an old routine prompt before it causes a bad run

FAQ

Does it connect to my scheduler or edit my files? No. It rewrites the text you paste and gives you the artifacts. You save the file and change the scheduler yourself.

Will it change what my agent does? It is built to remove words, not behavior. When it is unsure whether a sentence matters, it keeps it and says so. Read every DELETE row before applying, and compare the first real run with an earlier one.

How many tokens will I save? It reports the character counts it measured, before and after. The real saving depends on how many times your scheduler repeats the prompt, so check that in your own logs.

Does it send my prompt anywhere? The Skill itself sends nothing to an external service. It runs inside your own agent. Redact secrets and customer data before pasting.