用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/MatrixFounder/Agentic-development --skill skill-session-state命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | skill-session-state |
| description | Persist and restore agent session context (Mode, Task, Summary) to survive resets. |
| tier | 0 |
| version | 1 |
This skill provides the mechanism to persist your current working state to a file. This allows you to "reboot" from a seamless context state if the session window is reset.
.agent/sessions/latest.yaml — resolved from the repo root regardless of the
invocation CWD (walk-up to .git, CLAUDE_PROJECT_DIR fallback; SS-1).task_boundary call, plus session metadata..agent/sessions/ is gitignored (SS-2).
Do not git add it and do not ship a committed "seed" state.IF .agent/sessions/latest.yaml exists AND you are starting a new session (blank context):
read_file or view_file.Mode to the file's mode.TaskName and TaskStatus to the file's current_task.context_summary to understand what you were doing.active_blockers to see if you were blocked.First: can you execute at all? This skill is TIER 0 — it loads into every role, including the read-only reviewers and critics (
task-reviewer,plan-reviewer,architecture-reviewer,critic-*), which are declared without an execution tool on purpose. If you have no way to run a command, this section does not apply to you: session state is the ORCHESTRATOR's to persist, you have no phase boundary of your own to record, and you should proceed to your actual task. Do not spend your turn attempting the command — a mandatory-sounding instruction that a role cannot satisfy is how a subagent burns its whole turn and returns nothing (skill-parallel-orchestration§2.4).
WHENEVER you call the task_boundary tool, you MUST immediately follow it with a call to the update_state.py script.
python3 .agent/skills/skill-session-state/scripts/update_state.py \
--mode "[Mode]" \
--task "[TaskName]" \
--status "[TaskStatus]" \
--summary "[TaskSummary]" \
--predicted_steps [PredictedTaskSize]
task_boundary.task_boundary first, then update_state.py.If you finish one task and start another in the same session:
docs/TASK.md is archived (via skill-archive-task).task_boundary with the NEW Task Name.update_state.py with the new task details.--add_completed_task "[Old Task Name]" to preserve history....scripts/update_state.py ... --add_completed_task "Optimizing Database"latest.yaml shows: Current Task = UI Bug, Completed = [Database]If you make a critical decision (e.g., "Chose Redux over Context API"), you can append it to the session log:
python3 ...scripts/update_state.py ... --add_decision "Chose Redux over Context API"
--add_blocker "Waiting for API key"--clear_blockers (Use when unblocked)For Parallel Agents: When multiple agents run simultaneously, they must NOT overwrite each other's state in
latest.yaml.
The update_state.py script now implements Atomic File Locking (fcntl.lockf on Unix).
# Pseudo-code
with FileLock("latest.yaml", "r"):
state = load()
# Pseudo-code
with FileLock("latest.yaml", "w"):
state = load() # Re-read to get latest
state.update(my_changes)
save(state)
Standards for code documentation, comments, and artifact updates.
Detailed checklist for verifying System Architecture and Data Models.
Structured checklist for code review: bugs, style, performance, security, docs.