跳到正文
cccskills
免费在 GitHub 公开

agent-restore-context

Manage restore context files so skills can survive /clear and /compact. Use to write, delete, check, or list .agent-restore-context-* files.

中文简介正在准备中。当前显示原文说明。

集成工具Jira
查看安装方法

包含的文件(1)

  • SKILL.md3.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

Usage Examples

  • /agent-restore-context write jira-implement-task — create or overwrite a restore context file with the provided 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. Write .agent-restore-context-<skill-name> to the project root with the provided 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 ===
    
  2. Confirm the file was written and its path.

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Set up the restore-context hook so skills can survive /clear and /compact. Detects .claude/ vs .agents/ layout automatically.

中文简介正在准备中。当前显示原文说明。

commercetools/nimbus52026年10月17日 更新

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

中文简介正在准备中。当前显示原文说明。

commercetools/nimbus52026年10月17日 更新

Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.

中文简介正在准备中。当前显示原文说明。

commercetools/nimbus52026年10月17日 更新

Archive a completed change. Use when the user wants to finalize and archive a change after implementation is complete.

中文简介正在准备中。当前显示原文说明。

commercetools/nimbus52026年10月17日 更新

Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.

中文简介正在准备中。当前显示原文说明。

commercetools/nimbus52026年10月17日 更新

Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.

中文简介正在准备中。当前显示原文说明。

commercetools/nimbus52026年10月17日 更新

查看 commercetools 的全部技能

报告此技能的问题