Agent skill

Agent Restore Context

by commercetools in commercetools/ui-kit

Manage restore context files so skills can survive /clear and /compact.

MITAuto-check: notesFrontend & Design

Install Agent Restore Context

skills CLI
$ npx skills add commercetools/ui-kit --skill agent-restore-context -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install commercetools/ui-kit agent-restore-context --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/commercetools/ui-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/agent-restore-context .claude/skills/agent-restore-context && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-restore-context
GitHub stars
154
Token cost
~944 tokens
SKILL.md length
398 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Manage restore context files so skills can survive /clear and /compact.

  • Works in 2 steps: Verify Hook Setup → Execute Action
  • List .agent-restore-context- files
  • SKILL.md covers Arguments, Usage Examples, Process and Guidelines
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Agent Restore Context is an agent skill from commercetools/ui-kit. Manage restore context files so skills can survive /clear and /compact. Use to write, delete, check, or list .agent-restore-context- files.

Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Design systems. The licence is MIT.

When your agent uses it

  • List .agent-restore-context- files
  • Tasks that involve Design systems

Example prompts

  • “/agent-restore-context”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Grep, Glob, Read, Edit, Write

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Verify Hook Setup
  2. Execute Action

What it can do on your machine

Read from SKILL.md and the folder at commit 62ca335. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Grep
    • Glob
    • Read
    • Edit
    • Write

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Restore Context loads about 944 tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 398 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~944

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Grep, Glob, Read, Edit, Write

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from commercetools/ui-kit at commit 62ca335, republished under its MIT licence (© commercetools). 398 words, ~944 tokens.

Download SKILL.mdSave it as .claude/skills/agent-restore-context/SKILL.md (or your agent's skills folder).
name
agent-restore-context
description
Manage restore context files so skills can survive /clear and /compact. Use to write, delete, check, or list .agent-restore-context-* files.
allowed-tools
Bash, Grep, Glob, Read, Edit, Write
disable-model-invocation
false
argument-hint
<action> [<skill-name>] [-- <content>]
scope
knowledge

Agent Restore Context

Manage .agent-restore-context-<skill-name> files in the project root. These files are automatically injected into context after /clear or /compact by a SessionStart hook, allowing skills to resume where they left off.

Arguments

  • action (required): One of write, delete, check, or status
  • skill-name (required for write/delete): The skill name used as the file suffix
  • content (required for write): The full prompt content to inject after a context reset. Delimited by -- — everything after -- is treated as content.

Usage Examples

  • /agent-restore-context write jira-implement-task -- === RESUMED ... — create or overwrite a restore context file; everything after -- is the content
  • /agent-restore-context delete jira-implement-task — remove the file when the workflow is complete
  • /agent-restore-context check — verify the hook is set up, offer to install if not
  • /agent-restore-context status — list all active restore context files

Process

1. Verify Hook Setup

Read .claude/settings.json and .claude/settings.local.json (if it exists). Search both for restore-context. If not found:

  • If the action is check, invoke /agent-restore-context-setup and stop.
  • For any other action, warn the user that the hook is not configured and ask if they want to run /agent-restore-context-setup first. Do not proceed with write until the hook is confirmed.
2. Execute Action
write <skill-name>
  1. Parse $ARGUMENTS: split on the first -- separator. Before it is the action and skill-name; everything after it is content.

  2. Write .agent-restore-context-<skill-name> to the project root with the parsed content (creates or overwrites). The content should be a complete, self-contained prompt that tells the model how to resume. Recommended structure (callers may use any format):

    === <SKILL-NAME> — RESUMED AFTER CONTEXT RESET ===
    
    <Key state: ticket, branch, current task, etc.>
    
    You MUST do the following before any other work:
    1. Invoke /<skill-name> <arguments> to reload the full skill instructions.
    2. <Read relevant plan/state files>
    3. <Read relevant source/test files>
    4. Continue from where you left off.
    
    Do NOT start any work until you have completed the above steps.
    === END RESUMED CONTEXT ===
  3. Confirm the file was written and its path.

Show full SKILL.md (141 more words)Show less
delete <skill-name>
  1. Delete .agent-restore-context-<skill-name> from the project root.
  2. If the file does not exist, report that it was already removed (not an error).
  3. Confirm the deletion.
check
  1. Report whether the hook is configured (found in settings).
  2. List any active .agent-restore-context-* files in the project root.
  3. If the hook is not configured, invoke /agent-restore-context-setup.
status
  1. List all .agent-restore-context-* files in the project root.
  2. For each file, show the skill name (derived from the filename suffix) and the first few lines of content as a preview.
  3. If no files exist, report that no active restore contexts were found.

Guidelines

  • Always read target files before modifying them
  • All actions are idempotent (check/status/delete are safe to repeat; write silently overwrites)
  • Do not create .agents/ directories — only use them if they already exist

Agent restore context: $ARGUMENTS

© commercetools, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/agent-restore-context of commercetools/ui-kit.

Open the folder on GitHubat commit 62ca335

Compare with similar skills

Agent Restore Context next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Restore Context compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Restore Context this skillcommercetools/ui-kit154—~944Automated safety check: NotesMIT
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
Shadcnsupabase/evals14342 repos~4.5kAutomated safety check: PassApache-2.0

Similar skills

  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • Shadcn

    supabase/evals

    Official

    Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI.

    143 GitHub starsUsed in 42 repos~4.5k tokens
    Frontend & DesignAuto-check passed
  • Design System

    Ohh-889/skyroc

    Token architecture, component specifications, and slide generation.

    795 GitHub starsUsed in 11 repos~1.7k tokens
    Frontend & DesignAuto-check passed

More from commercetools/ui-kit

All 11 skills in this repo
  • Agent Restore Context Setup

    commercetools/ui-kit

    Set up the restore-context hook so skills can resume workflows after /clear and /compact.

    154 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check: notes
  • PR Review Navigator

    commercetools/ui-kit

    Generate AI-assisted navigation aids to help humans start reviewing a pull request more efficiently.

    154 GitHub stars~1.3k tokensUpdated 4 days ago
    Auto-check: notes
  • Remember

    commercetools/ui-kit

    Persist guidelines, conventions, and architectural decisions into the repository's knowledge base.

    154 GitHub stars~2k tokensUpdated 4 days ago
    Auto-check: notes
  • Renovate Review

    commercetools/ui-kit

    Review Renovate dependency upgrade PRs to assess safety and effort.

    154 GitHub stars~907 tokensUpdated 4 days ago
    Auto-check: notes
  • Repo Healthcheck Node

    commercetools/ui-kit

    Verify a Node.js/TypeScript repo's development environment is correctly set up.

    154 GitHub stars~1.6k tokensUpdated 4 days ago
    Auto-check: notes
  • Repo Maintenance Node

    commercetools/ui-kit

    Perform a broad Node/TypeScript repository health sweep — formatting, linting, type errors, dead code, dependency hygiene, and open Renovate PRs.

    154 GitHub stars~3k tokensUpdated 4 days ago
    Auto-check: notes

Questions about Agent Restore Context

What does Agent Restore Context do?

Manage restore context files so skills can survive /clear and /compact. Agent Restore Context is an agent skill from commercetools/ui-kit. Manage restore context files so skills can survive /clear and /compact.

When should I use Agent Restore Context?

Agent Restore Context fits situations like: list .agent-restore-context- files; tasks that involve Design systems.

How do I install Agent Restore Context in Claude Code?

Run `npx skills add commercetools/ui-kit --skill agent-restore-context -a claude-code`. Or copy the skill folder (.agents/skills/agent-restore-context in commercetools/ui-kit) into .claude/skills/agent-restore-context in your project. Claude Code loads it when a task matches its description.

How do I install Agent Restore Context in Codex?

Run `npx skills add commercetools/ui-kit --skill agent-restore-context -a codex`. Or copy the skill folder (.agents/skills/agent-restore-context in commercetools/ui-kit) into .agents/skills/agent-restore-context in your project. Codex loads it when a task matches its description.

Can I use Agent Restore Context in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add commercetools/ui-kit --skill agent-restore-context -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-restore-context, .gemini/skills/agent-restore-context, .github/skills/agent-restore-context and .opencode/skills/agent-restore-context in your project.

What does Agent Restore Context need to run?

SKILL.md names no scripts, command-line tools or credentials: Agent Restore Context is instructions for the agent only. Its frontmatter pre-approves these tools: Bash, Grep, Glob, Read, Edit, Write.

Does Agent Restore Context access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Restore Context safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Agent Restore Context use?

Agent Restore Context is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Restore Context use?

About 944 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Restore Context?

Skills that share tags, products or a category with Agent Restore Context: Impeccable (bestofjs/bestofjs, 3.1k stars), Figma Design System Builder (warpdotdev/warp, 65k stars), Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars) and UI Styling (Ohh-889/skyroc, 795 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Restore Context?

commercetools (a GitHub organization) maintains it in commercetools/ui-kit, which has 154 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 3, 2026.

Source: commercetools/ui-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.