codewhale.history 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/snapshot/SKILL.md +8 -2
package/package.json
CHANGED
package/skills/snapshot/SKILL.md
CHANGED
|
@@ -14,8 +14,14 @@ When the user types `//snapshot on`, `//snapshot off`, or `//snapshot status`, m
|
|
|
14
14
|
2. **If Git repo exists**: reply "This workspace has a Git repo — snapshotting is not needed. Use `git restore <file>` to undo changes."
|
|
15
15
|
3. **If no Git repo**: create `_snapshots/` directory, write a note to persist `snapshot_enabled=true`, then confirm to the user.
|
|
16
16
|
4. From this point forward, before editing any **existing** file:
|
|
17
|
-
- Run
|
|
18
|
-
|
|
17
|
+
- Run the following PowerShell command to snapshot with a timestamp:
|
|
18
|
+
```
|
|
19
|
+
$ts = Get-Date -Format 'yyyy-MM-dd_HH-mm-ss'
|
|
20
|
+
$base = [System.IO.Path]::GetFileNameWithoutExtension('<file>')
|
|
21
|
+
$ext = [System.IO.Path]::GetExtension('<file>')
|
|
22
|
+
Copy-Item '<file>' "_snapshots/$base.$ts$ext"
|
|
23
|
+
```
|
|
24
|
+
- Result example: `foo.py` → `_snapshots/foo.2026-06-20_11-30-00.py`
|
|
19
25
|
- Do NOT snapshot brand-new files being created for the first time
|
|
20
26
|
|
|
21
27
|
### `//snapshot off`
|