fresh

Save current plan state and prepare for fresh context restart

6 stars

Best use case

fresh is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Save current plan state and prepare for fresh context restart

Teams using fresh should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/fresh/SKILL.md --create-dirs "https://raw.githubusercontent.com/Zate/cc-plugins/main/plugins/devloop/skills/fresh/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/fresh/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How fresh Compares

Feature / AgentfreshStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Save current plan state and prepare for fresh context restart

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Fresh Start

Save the current devloop plan state for resuming after a context reset. **You do the work directly.**

## Step 1: Read Current Plan

Use the **Read** tool to read `.devloop/plan.md`.

If no plan exists, tell user to run `/devloop` first.

## Step 2: Find Current Task

Identify the next pending task (first `- [ ]` in the plan).

## Step 3: Save State

Write to `.devloop/next-action.json`:

```json
{
  "task": "Task X.Y: Description",
  "phase": "Current Phase Name",
  "notes": "Any context about work in progress",
  "saved_at": "YYYY-MM-DD HH:MM"
}
```

## Step 4: Confirm

Tell user:

```
State saved to .devloop/next-action.json

Next steps:
1. Run /clear to reset context
2. Run /devloop:run to resume work
```

---

**Tip**: Before doing a full `/devloop:fresh` + `/clear`, try pressing `Esc+Esc` first. This triggers partial summarization which compresses your context without losing state — often enough to keep working without a restart.

**Note**: The next-action.json file is consumed (deleted) when `/devloop:run` runs.

---

## Token Efficiency & Fresh Threshold

The default `fresh_threshold` is 10 tasks. However, token-heavy workloads exhaust session context faster and benefit from a lower threshold.

**Recommended thresholds by workload**:

| Workload | Recommended `fresh_threshold` | Why |
|----------|------------------------------|-----|
| Sequential tasks (default) | 10 | One agent at a time, moderate context growth |
| Swarm (parallel workers) | 5-7 | Each spawn adds its full context; N parallel spawns = N× context cost |
| Large `token_budget` (8000+) | 5 | Heavy context per task exhausts budget sooner |
| 1M context model | 25-50 | Much larger budget; fresh restarts are less urgent |
| Epic phases (run-epic) | 10 (default) | Phases run inline like `/devloop:run`; pause at phase boundaries for `/clear` if context is heavy |

**When to lower the threshold**:
- Running `/devloop:run-swarm` with 5+ concurrent workers per batch
- Using a high `tokens.token_budget` (>8000) in local.md
- Experiencing slow responses or context warnings before completing the plan

**When to raise the threshold**:
- Using a 1M-context model (configure `fresh_threshold: 25` or higher in `.devloop/local.md`)
- Sequential tasks with small, focused file changes

**Configure in `.devloop/local.md`**:
```yaml
---
fresh_threshold: 7        # Lower for swarm workloads
context_threshold: 70     # Exit ralph loop at this context %
tokens:
  token_budget: 4000      # Context per task affects how fast budget fills
---
```

Related Skills

Example Skill

6
from Zate/cc-plugins

Brief description of what this skill does and the domain expertise it provides.

vulnerability-patterns

6
from Zate/cc-plugins

Index of vulnerability detection pattern skills. Routes to core patterns (universal) and language-specific patterns for security scanning.

vuln-patterns-languages

6
from Zate/cc-plugins

Language-specific vulnerability detection patterns for JavaScript/TypeScript, Python, Go, Java, Ruby, and PHP. Provides regex patterns and grep commands for common security vulnerabilities.

vuln-patterns-core

6
from Zate/cc-plugins

Universal vulnerability detection patterns applicable across all programming languages. Includes hardcoded secrets, SQL/command injection, path traversal, and configuration file patterns.

scan

6
from Zate/cc-plugins

Run a security assessment using deterministic static analysis tools with LLM-powered triage

results

6
from Zate/cc-plugins

View the most recent security scan results without re-running the scan

remediation-library

6
from Zate/cc-plugins

Index of security remediation skills. Routes to specialized skills for injection, cryptography, authentication, and configuration vulnerabilities.

remediation-injection

6
from Zate/cc-plugins

Security fix patterns for injection vulnerabilities (SQL, Command, XSS). Provides language-specific code examples showing vulnerable and secure implementations.

remediation-crypto

6
from Zate/cc-plugins

Security fix patterns for cryptographic vulnerabilities (weak algorithms, insecure randomness, TLS issues). Provides language-specific secure implementations.

remediation-config

6
from Zate/cc-plugins

Security fix patterns for configuration and deployment vulnerabilities (path traversal, debug mode, security headers). Provides language-specific secure implementations.

remediation-auth

6
from Zate/cc-plugins

Security fix patterns for authentication and authorization vulnerabilities (credentials, JWT, deserialization, access control). Provides language-specific secure implementations.

fix

6
from Zate/cc-plugins

Fix or guide remediation for a specific security finding from the latest scan report