Refresh

From naveedharri/benai-skills · View interactive version

Refresh is an AI agent skill from the GitHub repository naveedharri/benai-skills. Start a clean Claude session with only the context the next task needs, instead of /compact. Captures the goal of your next session, points to the right files (never copies them), and outputs a self-contained prompt to paste into a fresh chat. Use when: "refresh", "refresh context", "fresh start", "

How to use this skill

Skill file

Refresh

Long sessions rot: the window fills with stale back-and-forth and outputs get worse. /compact summarizes the mess in place and keeps going in the same polluted window. Refresh does the opposite. It captures the goal of your next session, points to the right files, and hands you a clean prompt to paste into a fresh chat. Rebuild, not summarize.

UX Rules

  1. Ask exactly one question: the goal. Don't interrogate.
  2. Wait for the answer. Stop your turn after asking. Do not generate the prompt, a draft, or a "default / in the meantime" handoff before the user replies with the goal. The only exception: the user already stated the goal in the trigger, in which case skip the question and proceed.
  3. Reference files by path only, never copy file content, but only when the data lives in a file the next session can open. The fresh session cannot read this chat. So never hand it a pointer to data that has no retrievable home, see the persistence check in the workflow.
  4. Be concise. The output is a prompt the user pastes, not a report. No preamble around it.
  5. Default level is full when none is given.

Levels

Workflow

  1. Get the goal. Ask "What's the goal of your next session?" then end your turn and wait. Do not run any step below until the user answers. Skip this step only if the goal was already stated in the trigger.
  2. Decide where the handoff is going (critical). A handoff is only useful if its reader can reach the files it references. Figure out the destination:
  1. Scan (full / ultra). Once you have the goal, work over the conversation already in context and the files it referenced. Lite skips this.
  2. Check every referenced thing is reachable by the reader (critical). For every piece of work the next session needs, ask: is it saved somewhere that session can open AND that survives into a fresh environment?
  1. Dedupe hard.
  1. Anchor the location. Name the working directory (and the project, if relevant) up front, so the fresh session knows where it is operating without asking. In travels mode, skip your absolute local path, name the project/shared source instead.
  2. Write + print. Save the handoff to a persistent location (the user's real project folder), never a sandbox scratchpad or /tmp. If you can't tell which path is persistent, ask once. Decide the shape:

Output shape

Emit exactly this, filled in. Omit sections that don't apply to the level.

# Session refresh — <goal>

Continuing work in <project / working directory>. Goal of this session: <goal>

## Where things stand        (full + ultra)
<what's done, key decisions>

## Next steps
1. ...

## Files to open (read these, don't re-derive)
- <path> — <why it matters>

## Carried-over data          (only if it lives nowhere else)
<finalized data that exists only in this chat, verbatim — so the next session has it>

## Avoid repeating            (ultra only)
- <dead-end / rejected approach>

## Skills to run              (ultra only)
- /<skill>

After printing, tell the user in one line what to do with it: "paste this into a fresh chat to continue" (stays here), or "send this to your teammate, they paste it into a fresh chat" plus what to attach (travels).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.