Install the "agent-restore-context-setup" agent skill from https://github.com/commercetools/ui-kit/tree/main/.agents/skills/agent-restore-context-setup into .claude/skills/agent-restore-context-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-restore-context-setup", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add commercetools/ui-kit --skill agent-restore-context-setup -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "agent-restore-context-setup" agent skill from https://github.com/commercetools/ui-kit/tree/main/.agents/skills/agent-restore-context-setup into .agents/skills/agent-restore-context-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-restore-context-setup", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add commercetools/ui-kit --skill agent-restore-context-setup -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "agent-restore-context-setup" agent skill from https://github.com/commercetools/ui-kit/tree/main/.agents/skills/agent-restore-context-setup into .cursor/skills/agent-restore-context-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-restore-context-setup", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add commercetools/ui-kit --skill agent-restore-context-setup -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "agent-restore-context-setup" agent skill from https://github.com/commercetools/ui-kit/tree/main/.agents/skills/agent-restore-context-setup into .gemini/skills/agent-restore-context-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-restore-context-setup", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add commercetools/ui-kit --skill agent-restore-context-setup -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "agent-restore-context-setup" agent skill from https://github.com/commercetools/ui-kit/tree/main/.agents/skills/agent-restore-context-setup into .github/skills/agent-restore-context-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-restore-context-setup", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add commercetools/ui-kit --skill agent-restore-context-setup -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "agent-restore-context-setup" agent skill from https://github.com/commercetools/ui-kit/tree/main/.agents/skills/agent-restore-context-setup into .opencode/skills/agent-restore-context-setup/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-restore-context-setup", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
agent-restore-context-setup
GitHub stars
154
Token cost
~1.4k tokens
SKILL.md length
623 words
Files
2
Skills in repo
11
Repo updated
First seen
Licence
MIT
At a glance
Set up the restore-context hook so skills can resume workflows after /clear and /compact.
Works in 6 steps: Detect Layout → Check if Already Configured → Locate the Hook Script → …
Setting up a new project
SKILL.md covers How It Works, Process and Guidelines
Runs Shell scripts from its folder; calls git
What it does
Agent Restore Context Setup is an agent skill from commercetools/ui-kit. Set up the restore-context hook so skills can resume workflows after /clear and /compact. Use when setting up a new project or after cloning a repo that uses restore-context skills.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `resources/agent-restore-context.sh`).
It sits in Frontend & Design, covering Design systems. The licence is MIT.
When your agent uses it
Setting up a new project
After cloning a repo that uses restore-context skills
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
Ships script files (Shell), which the agent can run.
Shell commands in SKILL.md call:
git
From the folder's file list and the shell code blocks in SKILL.md.
Network
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
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 Setup loads about 1.4k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 623 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~52
When it runs· the whole SKILL.md, loaded when a task matches
~1.4k
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
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.
Download SKILL.mdSave it as .claude/skills/agent-restore-context-setup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
agent-restore-context-setup
description
Set up the restore-context hook so skills can resume workflows after /clear and /compact. Use when setting up a new project or after cloning a repo that uses restore-context skills.
allowed-tools
Bash, Grep, Glob, Read, Edit, Write
disable-model-invocation
false
scope
knowledge
Setup Restore Context
Set up a generic SessionStart hook that re-injects context after /clear or
/compact. Any skill that writes a .agent-restore-context-<name> file in the
project root will have its contents automatically injected into the fresh
conversation.
How It Works
Skills write .agent-restore-context-<skill-name> files with resume prompts.
A SessionStart hook with matcher clear|compact runs agent-restore-context.sh.
The script globs for .agent-restore-context-* and outputs their contents.
The model receives that output and follows the resume instructions.
Skills manage their own file lifecycle (write/delete).
Security: The contents of .agent-restore-context-* files are injected
verbatim into the model's context on every session start after /clear or
/compact. Treat these files with the same trust as other executable config.
Only skills running in your project should write them — this is why the
.gitignore entry in step 5 is important.
Process
1. Detect Layout
Determine which configuration layer the project uses:
Check
Layout
Skills directory
.agents/ directory exists
agents
.agents/skills/
Only .claude/ exists
claude
.claude/skills/
Settings files always live under .claude/ regardless of layout.
Note: When installed via the skills CLI targeting the Claude Code agent,
the skill is placed under .claude/skills/. When targeting a universal agent
(Amp, Cline, Cursor, etc.), it is placed under .agents/skills/.
2. Check if Already Configured
Read .claude/settings.json and .claude/settings.local.json (if it exists).
Search both for restore-context. If found in either file, report that the hook
is already configured and stop.
3. Locate the Hook Script
Find the script by checking both potential locations in order:
Use whichever path exists. If neither exists, stop and report that the skill
files could not be found — the user may need to re-install the skill.
Verify the script is executable. If not executable, run chmod +x.
Optional — symlink for dual-layout projects: If both
.claude/skills/ and .agents/skills/ directories exist but the skill is
only in one of them, you may create a symlink at the missing location so
both layouts share a single copy. For example, if the script was found under
.claude/skills/, create a symlink under .agents/skills/:
Reverse the paths if the script was found under .agents/skills/ instead.
This is optional — the hook only needs the one resolved path to work.
4. Register the Hook
Show full SKILL.md (249 more words)Show less
Choose settings file
Ask the user:
"Should I add the restore-context hook to .claude/settings.json
(shared — committed to the repo, takes effect for all teammates once pushed)
or .claude/settings.local.json (local only — never committed, affects only
your machine)?"
Recommendation: choose settings.json if you want the whole team to
benefit from the hook. Choose settings.local.json if you are the only one
who will use this workflow, or if teammates install their skills to different
paths.
If the chosen settings file does not exist, create it as an empty JSON object
({}) before merging.
Use the resolved script path from step 3 (relative to the project root), then
merge the following into the chosen file's hooks object. Do not overwrite
existing hooks — add to or create the SessionStart array:
Where <resolved-script-path> is the relative path found in step 3, e.g.
.claude/skills/agent-restore-context-setup/resources/agent-restore-context.sh
or .agents/skills/agent-restore-context-setup/resources/agent-restore-context.sh.
5. Add Gitignore Entry
Check .gitignore for .agent-restore-context-*. If the pattern is already
present, skip this step. If .gitignore does not exist, check whether the
project is a git repo (git rev-parse --is-inside-work-tree). If it is,
create .gitignore; if not, skip this step entirely. Once the file exists,
append:
# Restore context files (used by skills to resume workflows after /clear and /compact)
.agent-restore-context-*
6. Confirm
Report to the user:
Where the hook was registered (which settings file)
The path to the script
That any skill can now write .agent-restore-context-<name> files to use
this pattern
Guidelines
Always read target files before modifying them
Do not create .agents/ or .agents/skills/ directories — only use them if
they already exist
This skill is idempotent — safe to run multiple times
Agent Restore Context Setup 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 Setup compared with similar skills
Skill
Stars
Used in
Tokens
Auto-check
Licence
Repo updated
Agent Restore Context Setup this skillcommercetools/ui-kit
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…
Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.
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.
Set up the restore-context hook so skills can resume workflows after /clear and /compact. Agent Restore Context Setup is an agent skill from commercetools/ui-kit. Set up the restore-context hook so skills can resume workflows after /clear and /compact.
When should I use Agent Restore Context Setup?
Agent Restore Context Setup fits situations like: setting up a new project; after cloning a repo that uses restore-context skills.
How do I install Agent Restore Context Setup in Claude Code?
Run `npx skills add commercetools/ui-kit --skill agent-restore-context-setup -a claude-code`. Or copy the skill folder (.agents/skills/agent-restore-context-setup in commercetools/ui-kit) into .claude/skills/agent-restore-context-setup in your project. Claude Code loads it when a task matches its description.
How do I install Agent Restore Context Setup in Codex?
Run `npx skills add commercetools/ui-kit --skill agent-restore-context-setup -a codex`. Or copy the skill folder (.agents/skills/agent-restore-context-setup in commercetools/ui-kit) into .agents/skills/agent-restore-context-setup in your project. Codex loads it when a task matches its description.
Can I use Agent Restore Context Setup 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-setup -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-setup, .gemini/skills/agent-restore-context-setup, .github/skills/agent-restore-context-setup and .opencode/skills/agent-restore-context-setup in your project.
What does Agent Restore Context Setup need to run?
Going by SKILL.md and its folder, Agent Restore Context Setup needs a shell for the scripts in its folder and the command-line tools its instructions call (git). Our summary lists: A Bash shell. Its frontmatter pre-approves these tools: Bash, Grep, Glob, Read, Edit, Write.
Does Agent Restore Context Setup access the network?
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Is Agent Restore Context Setup 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 Setup use?
Agent Restore Context Setup 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 Setup use?
About 1.4k tokens (SKILL.md is roughly 5.6k 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 Setup?
Skills that share tags, products or a category with Agent Restore Context Setup: 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 Setup?
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.