Post-implementation lookahead skill. Trigger automatically at the END of any implementation turn — after writing code, modifying files, refactoring, adding features, fixing bugs, or making architectural changes. This skill makes the agent reason one turn ahead: what will break, what edge cases were introduced, what security holes were opened, what patterns are now inconsistent, and what the next human prompt will likely expose as a problem. Use this skill whenever the agent has just shipped a change and is about to respond to the user. It produces a compact, structured FORESIGHT block — never a wall of text. The goal is to surface future breakage *now*, before the next turn, using fewer tokens than the user would spend prompting for it manually. Use this even for small changes — a one-line type change can break ten callers. A one-line config change can expose an entire API.
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
You just implemented something. Before you close the turn, run this skill.
Goal: Think one turn ahead. What will the next human prompt expose? What did this change silently break? What security surface did it open? Output a compact FORESIGHT block — not a verbose analysis.
The value proposition is simple: it's cheaper in tokens and time to surface a problem now — in a 120-word block — than for the user to discover it, describe it, and prompt you to fix it in the next turn. Every line in the FORESIGHT block that catches a real issue saves an entire round trip.
Run at the end of any turn where you:
Do not run for: pure explanations, read-only analysis, documentation-only changes, or changes with zero downstream consumers (e.g., a new leaf file with no importers yet — though even then, consider whether the pattern you established will be copied).
Append this block at the end of your normal response. Keep it under 120 words total. No preamble.
---
⚡ FORESIGHT
🔴 Will break: [1-2 things that will fail imminently — specific, not vague]
🟡 Watch out for: [1-2 edge cases or silent regressions introduced]
🔒 Security: [1 auth, injection, exposure, or secrets issue introduced]
🔁 Broken pattern: [1 architectural/naming/pattern inconsistency created]
➡️ Thinking ahead: [what the user is likely to ask next, in one line]
---If nothing genuinely applies in a category, omit that line. Do not pad with "None" or "N/A." A three-line block is better than a five-line block with filler.
The order below is intentional — start with what will crash, then what will silently corrupt, then what opens a hole, then what creates tech debt, then what the user will notice.
These are things that will cause a build error, runtime crash, or test failure in the existing codebase — not hypothetical future code. Trace the blast radius outward from your change.
Ask yourself:
How to trace callers: Mentally (or actually) grep for the function/type/export name you changed. Check index files, barrel exports, and re-exports — these hide transitive dependencies. If you renamed something, check that every import was updated, including dynamic imports and string-based references.
These won't crash immediately but will produce wrong results, corrupt data, or fail under specific conditions. They're the bugs that pass CI but break in production.
Ask yourself:
A code change can open a security surface without triggering any test failure. These issues are silent, severe, and easy to miss because they require thinking about adversarial inputs and unauthorized access rather than happy-path correctness.
Ask yourself:
credentials: true with a wildcard origin?Pattern breaks create tech debt that compounds. The next developer (or the next agent turn) will copy this inconsistency, and now there are two ways of doing the same thing.
Ask yourself:
useState where the app uses a store, used callbacks where everything else uses async/await)?This is the most underrated line. A good prediction shows you understand the user's workflow, not just the code. Ground it in what the user is actually building — not a generic "test the changes."
Ask yourself:
Good example:
---
⚡ FORESIGHT
🔴 Will break: `useSessionStore` still imports old `SessionState` type — TS error on next build
🟡 Watch out for: Empty `meals` array hits `.reduce()` with no initialValue → runtime throw
🔒 Security: `getMealHistory` endpoint has no auth guard — returns any user's data with a changed `userId` param
🔁 Broken pattern: `logFood()` uses local error toast; all other mutations use the global `ErrorBoundary`
➡️ Thinking ahead: "The nutrition total isn't updating after I log a meal"
---Bad examples (common failure modes):
# Too vague — names nothing specific
⚡ FORESIGHT
🔴 Will break: There might be some TypeScript errors somewhere in the codebase
🟡 Watch out for: Make sure to handle edge cases properly and test thoroughly
# Hallucinated — inventing callers/files that don't exist
⚡ FORESIGHT
🔴 Will break: `UserDashboard.tsx` calls `getProfile()` which now returns a different shape
(^ Did you actually verify that UserDashboard.tsx exists and calls getProfile?)
# Parrot — repeating what you just said in the implementation response
⚡ FORESIGHT
🟡 Watch out for: I changed the return type from string to number
(^ You already said this. The FORESIGHT block should add NEW information.)
# Generic next-prompt — not grounded in the user's actual task
➡️ Thinking ahead: "Can you add tests for this?"
(^ What will they ACTUALLY ask, given the feature they're building?)Small change (1-3 files, single concern): Run foresight, keep it tight. Likely 2-3 lines. Security line is often omittable here.
Medium change (feature, refactor, 4-10 files): All five categories likely relevant. This is the sweet spot for the skill.
Large change (architecture shift, new system, 10+ files): Run foresight, but also flag: "Consider a dedicated review pass — this change has too many surfaces for a 120-word block to cover."
Only output what you have actual evidence for. If you traced the callers and found a real breakage, say it. If you're speculating that "something might break," don't. The skill's value comes from precision, not from hedging.
If you're uncertain whether a caller exists: check before claiming it will break. A false positive in the FORESIGHT block erodes the user's trust in the skill. One missed item is less damaging than one hallucinated item.
Before writing the block, mentally verify:
If you can't answer yes to all five, take 10 more seconds before writing. The block is small — every word matters.
tombrewsviews/foresight-skill
SKILL.md
7a95e42
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.