agent-restore-context-setup — community agent-restore-context-setup, nimbus, community, ide skills

v1.0.0

关于此技能

适用于需要在会话重置或压缩后恢复上下文的对话式 AI 代理。 Set up the restore-context hook so skills can survive /clear and /compact. Detects .claude/ vs .agents/ layout automatically.

commercetools commercetools
[4]
[2]
更新于: 3/19/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 8/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
8/11
Quality Score
52
Canonical Locale
en
Detected Body Locale
en

适用于需要在会话重置或压缩后恢复上下文的对话式 AI 代理。 Set up the restore-context hook so skills can survive /clear and /compact. Detects .claude/ vs .agents/ layout automatically.

核心价值

赋予代理自动从 `.agent-restore-context-<name>` 文件中重新注入上下文的能力,使用通用的 `SessionStart` hook 和 `agent-restore-context.sh` 脚本,提高会话的连续性和工作流效率。

适用 Agent 类型

适用于需要在会话重置或压缩后恢复上下文的对话式 AI 代理。

赋予的主要能力 · agent-restore-context-setup

会话重置后恢复对话上下文
自动化上下文重新注入以实现无缝的用户体验
使用恢复的上下文调试对话流程

! 使用限制与门槛

  • 需要文件系统访问以读取 `.agent-restore-context-<name>` 文件
  • 依赖于 `SessionStart` hook 以及 `clear|compact` 匹配器
  • 仅限于能够执行 shell 脚本(如 `agent-restore-context.sh`)的代理

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

评审后的下一步

先决定动作,再继续看上游仓库材料

Killer-Skills 的主价值不应该停在“帮你打开仓库说明”,而是先帮你判断这项技能是否值得安装、是否应该回到可信集合复核,以及是否已经进入工作流落地阶段。

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

agent-restore-context-setup 是什么?

适用于需要在会话重置或压缩后恢复上下文的对话式 AI 代理。 Set up the restore-context hook so skills can survive /clear and /compact. Detects .claude/ vs .agents/ layout automatically.

如何安装 agent-restore-context-setup?

运行命令:npx killer-skills add commercetools/nimbus。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

agent-restore-context-setup 适用于哪些场景?

典型场景包括:会话重置后恢复对话上下文、自动化上下文重新注入以实现无缝的用户体验、使用恢复的上下文调试对话流程。

agent-restore-context-setup 支持哪些 IDE 或 Agent?

该技能兼容 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer。可使用 Killer-Skills CLI 一条命令通用安装。

agent-restore-context-setup 有哪些限制?

需要文件系统访问以读取 `.agent-restore-context-<name>` 文件;依赖于 `SessionStart` hook 以及 `clear|compact` 匹配器;仅限于能够执行 shell 脚本(如 `agent-restore-context.sh`)的代理。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add commercetools/nimbus。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    agent-restore-context-setup 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

agent-restore-context-setup

安装 agent-restore-context-setup,这是一款面向AI agent workflows and automation的 AI Agent Skill。查看评审结论、使用场景与安装路径。

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

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

  1. Skills write .agent-restore-context-<skill-name> files with resume prompts.
  2. A SessionStart hook with matcher clear|compact runs agent-restore-context.sh.
  3. The script globs for .agent-restore-context-* and outputs their contents.
  4. The model receives that output and follows the resume instructions.
  5. Skills manage their own file lifecycle (write/delete).

Process

1. Detect Layout

Determine which configuration layer the project uses:

CheckLayoutSkills directory
.agents/ directory existsagents.agents/skills/
Only .claude/ existsclaude.claude/skills/

Settings files always live under .claude/ regardless of layout.

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

The script is at <skills-dir>/agent-restore-context-setup/resources/agent-restore-context.sh (using the skills directory from step 1).

Verify the script exists and is executable. If not executable, run chmod +x.

4. Register the Hook

Permission check

Run gh repo view --json viewerPermission --jq '.viewerPermission'. If the result is READ, warn the user that the repo is read-only — any changes made to .claude/settings.json or .gitignore will need to be committed and pushed manually. Continue with the rest of the steps as normal.

Choose settings file

Ask the user:

"Should I add the restore-context hook to .claude/settings.json (shared/committed) or .claude/settings.local.json (local only)?"

Compute the script path relative to the project root (from step 3), then merge the following into the chosen file's hooks object. Do not overwrite existing hooks — add to or create the SessionStart array:

json
1{ 2 "SessionStart": [ 3 { 4 "matcher": "clear|compact", 5 "hooks": [ 6 { 7 "type": "command", 8 "command": "bash <skills-dir>/agent-restore-context-setup/resources/agent-restore-context.sh" 9 } 10 ] 11 } 12 ] 13}

5. Add Gitignore Entry

Check .gitignore for .agent-restore-context-*. If not present, append:

# Restore context files (used by skills to survive /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 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

为prompts.chat的信息反馈系统生成可定制的插件小部件

149.6k
0
AI

flags

Logo of vercel
vercel

React 框架

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

Python中具有强大GPU加速的张量和动态神经网络

98.6k
0
开发者工具