Install
openclaw skills install @luckystar513/wdp-ctx-enSave, load, verify, export, or clear a project's stable profile and incremental work snapshots to enable session-resilient context management in English.
openclaw skills install @luckystar513/wdp-ctx-enThis is the English variant of the /wdp-ctx skill. It turns the current project's context into documents, so any coding agent can reload it with one command after a restart, a context clear/compact, or when switching agents or projects. Core value = context that is always readable and switchable.
profile.md), maintained by the profile subcommand;sum subcommand.Core principle: stable info goes to the profile, volatile info goes to snapshots. Snapshots reference the profile via profile: in frontmatter instead of duplicating the tech stack.
/wdp-ctx-en <subcommand> [arguments]
| Subcommand | What it does | Arguments |
|---|---|---|
sum | Save the current work state as a snapshot (incremental diff vs last; --deep = deep analysis) | <project path> --deep |
init | Load profile + latest snapshot and resume last session | <project path> |
profile | Create/update the project's stable profile | <project path> |
verify | Check snapshot drift vs current code (read-only) | <project path> |
export | Merge profile + snapshot into AGENTS.md for agents that don't know this skill | <project path> |
list | List all profiles and snapshots (newest first) | — |
clear | Remove snapshots (profile kept by default; --keep N keeps newest N) | <project path> --keep N --profile |
Run with no subcommand → defaults to list and shows this usage.
<storage root>/<project slug>/
├── profile.md # stable layer (maintained by the profile subcommand)
├── <YYYY-MM-DD_HHMMSS>.md # snapshot layer (appended by the sum subcommand)
└── latest.md # pointer to the latest snapshot (read by init/verify)
/wdp-ctx-en and /wdp-ctx share the same storage, so switching between the two languages never loses context.
Resolution order — use the first one that exists; prefer project-level:
<project path>/.claude/skills/wdp-ctx/summaries/<project path>/.claude/skills/wdp-ctx-en/summaries/~/.claude/skills/wdp-ctx/summaries/~/.claude/skills/wdp-ctx-en/summaries/Create the directory if none exists. Per-project subdirectories are keyed by project slug; filenames carry timestamps, so multiple projects never mix.
pwd); sum <path> = given path.latest.md first, else the newest by timestamp.git status --short, git log --oneline -10, git diff --stat.prev / created / profile are required.latest.md to the newest snapshot filename.profile first.--deep mode (explicit opt-in, more tokens): split into 2-5 subsystems → fan out read-only sub-agents to analyze each (current state, drift vs snapshot, non-obvious issues) → optionally one cross-cutting agent (TODO/FIXME, git log) → synthesize a more complete snapshot, tags: [deep]. Confirm the user is willing to wait before dispatching.
---
type: snapshot
project: <project slug>
created: <YYYY-MM-DDTHH:MM:SS>
author: <agent name>
commit: <git hash or ~>
prev: <previous snapshot filename or ~>
profile: <profile.md or ~>
tags: []
---
# Work snapshot · <project name>
## Current focus
<one line: why this work is happening now>
## Done since last
- ✅ <point>
## In progress
- 🔄 <point, incl. blockers/risks> (new progress: …; or mark "no change since last")
## Changed / dropped
- ⛔ <dropped item> → reason
## Next steps (3-5)
- <in order of value>
## Non-obvious learnings this session
- <pitfalls, counterintuitive findings, overturned assumptions>
## Decisions & why
- <What + Why, to avoid repeating mistakes>
pwd; else the given path.<slug>/profile.md; if missing, report "no profile yet — suggest /wdp-ctx-en profile", then continue to the snapshot; if present, read it fully and restate: one-line positioning, tech stack, architecture, must-not-break rules, how to run, known gotchas.latest.md points to, else the newest by timestamp (exclude profile.md/latest.md); read fully and restate: current focus, done, in progress, next steps, learnings, decisions. If the target project directory is empty, fall back to another project's latest snapshot and say so explicitly.pwd; else the given path.updated.---
type: profile
project: <project slug>
updated: <YYYY-MM-DDTHH:MM:SS>
---
# Project profile · <project name>
## One-line positioning
## Tech stack
## Architecture overview
## Business domain
## Invariants (must not break)
- <mandatory, prohibited to violate>
## How to run
- build/test/run/deploy
## External dependencies
- <services/APIs/where credentials live>
## Decisions & why
## Known gotchas
- <gotcha + how to avoid>
Resolve the project; read the latest snapshot (if none, report "no snapshot yet — run sum first" and stop), parse frontmatter (created/commit).
Collect current state: git (status/branch/log/diff, skip if not a repo); check each key path mentioned in the snapshot/profile for existence; check "in progress / next" items against the code.
Judge item by item:
| Label | Meaning |
|---|---|
| ✅ still valid | matches current state, nothing to do |
| 🔄 progress not recorded | git has new changes the snapshot doesn't reflect → suggest sum |
| ⚠️ stale | mentioned files/modules/next steps no longer exist or are done → needs sum to revise |
| ❌ conflict | snapshot contradicts the code → refresh immediately, don't resume from the stale snapshot |
Report: snapshot time vs now, commit comparison, drift table, staleness verdict (fresh / slightly stale / badly stale), and the suggested action (sum or profile).
Merge the profile + latest snapshot into AGENTS.md in the project root, so agents that don't know this skill can read it at startup. If either layer is missing, use what exists and mark "this section not maintained yet".
Merge policy (never lose user content):
<!-- wdp-export-begin --> / <!-- wdp-export-end --> → replace only between the markers;Template (compact — AGENTS.md should stay short):
<!-- wdp-export-begin -->
# Project Context (auto-generated by wdp /wdp-ctx export)
## What / Quick summary
## Tech stack
## Architecture (top-level)
## Invariants (must not break)
## How to run
## Current work state (as of <snapshot time>)
- current focus / in progress / next (top 3) / recently done
## Known gotchas / Decisions
<!-- wdp-export-end -->
Never write secrets (only where credentials live), never write full snapshot history. Report: path, created/replaced/appended, which sections are missing.
<storage root>/**/*.md, excluding latest.md (the pointer file). If empty, report "no documents yet" and suggest sum / profile.created and the title as the summary column; end with counts: N snapshots, M profiles, across K projects.init <project path>; update the profile → profile <project path>.Irreversible destructive operation — confirm twice before deleting.
Default behavior: snapshots (<timestamp>.md) are the default targets; profile.md is kept by default; latest.md is handled after snapshots are deleted; --keep N keeps the newest N per project.
clear <path>) / profile only (clear --profile) / keep newest N (clear --keep N, can combine with a project path).Anywhere in this session, proactively remind the user to save/load context when:
/wdp-ctx-en sum/wdp-ctx-en sum/wdp-ctx-en sumOne line is enough, e.g.: "X is done — run /wdp-ctx-en sum to save a snapshot; next time /wdp-ctx-en init resumes."
| Mistake | Fix |
|---|---|
| Putting the tech stack / business into a snapshot | Stable info goes to the profile; snapshots only record state changes |
| Overwriting the previous snapshot | Timestamped filenames are appended, never overwritten |
| Ignoring git diff / the previous snapshot | The incremental diff is what makes snapshots valuable |
Frontmatter missing prev/created | Without them incremental resume is impossible |
| init reads the snapshot but not the profile | Read both — rules/tech stack live in the profile |
| Sorting profile/latest.md as snapshots | Show them separately; exclude latest.md |
| clear deletes without confirming | Destructive ops require listing first, then a second confirmation |
| clear deletes the profile by mistake | Profile is kept by default unless explicitly requested |
clear --keep N the wrong direction | Keep newest N, delete the rest |
| verify modifies files | verify is read-only |
| export overwrites an existing AGENTS.md | With markers, replace only the maintenance section; without, append |
| Dispatching sub-agents in normal mode | --deep is explicit opt-in |
| Recording secrets, not just locations | No subcommand may write secret contents |