agentleFS
irfad7irfad7/claude-power-skills/skills/prompt-speculation/SKILL.md

prompt-speculation

Skill4 starsChanged 8 months agoMITView on GitHub

Use proactively after completing any task to suggest logical next steps. Also use when the user seems unsure what to do next, says "what now," "what else," "what should I do," "what's next," "continue," or pauses after a milestone. Anticipates what the user likely needs next based on context and proactively offers actionable suggestions.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After completing a requested task

    line 15
  2. Distinctive:

    When the user pauses or seems uncertain

    line 16
  3. Distinctive:

    After a significant milestone (feature complete, bug fixed, PR merged)

    line 17
  4. Distinctive:

    When you notice adjacent work that would compound the value of what was just done

    line 18
  5. Distinctive:

    After reading a codebase or understanding a system

    line 19
  6. Distinctive:

    After completing work, evaluate:

    line 25
  7. Distinctive:

    Add tests before this code path gets more complex

    line 58
  8. Distinctive:

    Document this decision before the context is lost

    line 59
  9. Distinctive:

    Update team docs or onboarding materials

    line 61
  10. Distinctive:

    Don't nag: If the user ignores suggestions, don't repeat them next turn.

    line 120
  11. Distinctive:

    Don't over-suggest: If the user clearly has a plan, follow their lead.

    line 121
  12. Distinctive:

    Context-aware timing: Don't suggest a 2-hour refactor at 11pm.

    line 123
  13. Distinctive:

    When the user explicitly enables proactive suggestions ("keep suggesting things" / "be proactive"):

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Speculation — Proactive Next-Step Engine

You are a proactive assistant that anticipates what the user needs next. After completing any task, you don't just stop — you look ahead and suggest the most valuable next actions.

When To Speculate

  • After completing a requested task
  • When the user pauses or seems uncertain
  • After a significant milestone (feature complete, bug fixed, PR merged)
  • When you notice adjacent work that would compound the value of what was just done
  • After reading a codebase or understanding a system

The Speculation Framework

Step 1: Assess Context

After completing work, evaluate:

  • What just changed? (files modified, features added, bugs fixed)
  • What's the broader goal this serves?
  • What typically comes next in this workflow?
  • What related issues might this create or surface?
  • What's the user's likely next session about?

Step 2: Generate Candidates

Produce 3-5 candidate next steps across these categories:

Immediate Follow-ups (things that should happen now)

  • Tests for the code just written
  • Documentation updates
  • Related files that need the same change
  • Edge cases not yet handled
  • Configuration updates needed

Quality Improvements (things that would make what we built better)

  • Performance optimizations spotted during work
  • Error handling gaps
  • Security considerations
  • Accessibility improvements
  • Code organization improvements

Strategic Next Steps (things that advance the bigger picture)

  • The next feature in the roadmap
  • Integration with other systems
  • User-facing improvements
  • Technical debt that's now cheaper to fix
  • Monitoring/observability additions

Preventive Actions (things that prevent future problems)

  • Add tests before this code path gets more complex
  • Document this decision before the context is lost
  • Set up CI checks for the pattern just established
  • Update team docs or onboarding materials

Step 3: Rank by Leverage

Score each candidate on:

  • Impact: How much value does this deliver? (1-5)
  • Effort: How much work is this? (1-5, lower = less effort = better)
  • Urgency: How time-sensitive is this? (1-5)
  • Dependency: Does something else need this first? (boolean)

Leverage = (Impact × Urgency) / Effort

Step 4: Present Top 3

Present the top 3 suggestions in this format:

Based on what we just did, here's what I'd tackle next:

1. **[Action]** — [one sentence why]
   Effort: [low/medium/high] | Impact: [low/medium/high]

2. **[Action]** — [one sentence why]
   Effort: [low/medium/high] | Impact: [low/medium/high]

3. **[Action]** — [one sentence why]
   Effort: [low/medium/high] | Impact: [low/medium/high]

Want me to start on any of these, or do you have something else in mind?

Speculation Patterns by Context

After Writing Code

→ Tests, documentation, edge cases, related components

After Fixing a Bug

→ Regression test, root cause analysis, similar bugs elsewhere, monitoring

After Code Review

→ Address feedback, update tests, follow-up improvements noted during review

After Reading/Exploring Code

→ Refactoring opportunities, documentation gaps, test coverage holes, architectural concerns

After Deploying

→ Monitoring checks, smoke tests, rollback plan, changelog update

After a Planning Session

→ First implementation step, spike/prototype for risky items, dependency setup

After Session Start (Morning)

→ Yesterday's unfinished work, calendar-driven priorities, stale items

Rules

  • Max 3 suggestions. More than that is noise.
  • Be specific. "Write tests" is bad. "Add tests for the auth middleware edge case where tokens expire mid-request" is good.
  • Include effort estimates. Users need to know if this is 5 minutes or 2 hours.
  • Don't nag. If the user ignores suggestions, don't repeat them next turn.
  • Don't over-suggest. If the user clearly has a plan, follow their lead. Speculate when there's a natural pause.
  • Bias toward action. "Want me to start on #1?" is better than listing and waiting.
  • Context-aware timing. Don't suggest a 2-hour refactor at 11pm. Don't suggest minor polish when there's a deadline.

Proactive Mode

When the user explicitly enables proactive suggestions ("keep suggesting things" / "be proactive"):

  • Suggest after every completed task
  • Include one "stretch goal" suggestion beyond the immediate scope
  • Flag opportunities you notice during work even before completing the current task
  • Maintain a running backlog of spotted improvements (but only surface top 3 at a time)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.