Removing docs/.scrolls/
This skill undoes
. It removes the scrolls folder and the pointer chain (
→
→
) that setup installed. The removal goes into a single commit whose message names the commit before it, which is the restore point.
This is destructive.
Never apply without showing the user the plan first, unless they passed
/
.
Everything is relative to the current working directory unless
/
says otherwise, not relative to this skill's own location.
Cross-platform
All of the logic is in one stdlib-only Python file,
.
(bash: macOS, Linux, or Windows with Git Bash/WSL) and
(PowerShell 7+) are thin launchers that find Python 3.9+ and pass every flag through unchanged, so the two can't behave differently. Pick by what's available: try
, and if that succeeds use
. Otherwise use
via
(preferred), or
only if
isn't installed.
Options
Read these from the invocation text, in any order:
- / / : where to look, instead of the current directory. Repeatable. The path may be a project folder (), a docs folder (, the same form takes), or the scrolls folder itself.
- / : look under the git repository's top level, whichever subdirectory you're in.
- / : look in the current directory explicitly. This is the default anyway.
- / : find every scrolls folder ( or , containing a ) under the base directory and remove them all, with each one's pointer files, in one commit. The search goes 8 levels deep and skips vendor and build folders, the same way and sweep. Without , only the exact spots above are checked.
- / : also delete these files outright, even when they contain content setup didn't write. is a comma-separated list, and the flag can be repeated:
- , ,
- any other plain file name that sits next to the folder, e.g. . Paths are rejected.
- , which is what a bare means: + +
- / : show the plan and stop.
- / : skip the confirmation step (step 2).
- : apply and stage the changes, but leave the commit to the user. The script prints the command to finish with.
You can pass at most one of
,
, and
.
and
combine with any of them. No
is needed: both
and
are found.
What happens to each file
| File | Without | With naming it |
|---|
| Scrolls folder | | (same) |
| (its parent) | Removed only if nothing else is left in it | (same) |
| Deleted if it held only setup's block. If it has other content, the block is cut out. If it mentions the scrolls folder in wording setup didn't write, it's left alone and flagged needs review | Deleted |
| The ## Access Scrolls Agentic Memory
/ stub is cut out, along with a pre-1.2.0 embedded block if there is one. The file is deleted if nothing is left | Deleted |
| Kept while still exists, because still works. If is deleted, the pointer line is cut out (the file is deleted if that empties it) | Deleted |
| Other names | — | Deleted |
Matching ignores trailing whitespace and extra blank lines, and accepts a heading at any level (setup demotes its heading when it inserts into an existing file). Anything else that still mentions the folder or
, such as a README or a CI config, is
reported but never edited.
Steps
1. Preview
Run the script
without , passing the user's other flags through:
bash <skill-dir>/scripts/remove.sh [flags...]
pwsh <skill-dir>/scripts/remove.ps1 [flags...]
This only prints the plan: the repository, branch, previous-commit SHA, one line per file, any other references found, and the exact commit message. Nothing changes.
- Exit 1: no scrolls folder was found. Pass on the script's hint (try , or ), and stop.
- Exit 2: a usage error, such as combined with , or a path given to . Report it and stop.
- Exit 3: a safety refusal. Report the reason exactly as printed, and stop. Do not work around it by committing, stashing, or deleting the user's files yourself; let the user choose. The refusals are:
- something under the paths to be removed has uncommitted, untracked, or ignored changes, which the restore point wouldn't contain
- other changes are already staged
- the repository has no commits yet
- the folders span more than one repository
2. Confirm
Show the user the plan, then ask before going further. Call out anything marked
purged (content beyond setup's will be lost) or
needs review. Skip this step only if the user passed
/
. If they passed
/
, stop after step 1.
3. Apply
Run the same command again, with
added. The script:
- records as the previous commit
- runs and edits the files as planned
- commits only those paths, with this message:
maint(memory): scrolls-removed
- previous commit: #<full SHA of the commit before the removal>
Notes:
- removed folder: docs/.scrolls (7 tracked files)
- deleted: SCROLLS.md (held only the scrolls pointer block)
- stripped: CLAUDE.md (scrolls pointer stub removed; other content kept)
- kept: AGENTS.md (still points at CLAUDE.md, which stays)
- pruned empty folder: docs (empty once the scrolls folder is gone)
Scrolls-Action: remove
Scrolls-Previous-Commit: <full SHA>
Scrolls-Folder: docs/.scrolls
Scrolls-Deleted: SCROLLS.md
Scrolls-Stripped: CLAUDE.md
Scrolls-Kept: AGENTS.md
Scrolls-Pruned: docs
The
section is for people. The final paragraph is standard git trailers, for tools: one
line per path, with paths relative to the repository root. Kinds are
,
,
,
,
,
, and
.
reads these with
git log --format='%(trailers:unfold,only)'
(finding removal commits with
--grep='^Scrolls-Action:'
), and uses them to put back exactly what was removed.
Never hand-edit or reword this message.
If
fails (exit 4, usually a pre-commit or commit-msg hook), the removal stays staged. Report the hook's output and the
git commit -F <git-dir>/SCROLLS_REMOVE_MSG
command to finish with. Never retry with
.
This skill never pushes.
4. Follow up on leftovers
For each file listed as
needs review or under "Other files that still mention…": read it, and offer to fix any reference that's actually stale. Use normal editing judgment, the same as
step 2. Don't fold those edits into the removal commit. Make them a separate change, and only if the user agrees.
5. Report
Give:
- the new commit SHA, and the previous-commit SHA it records
- what was removed, deleted, stripped, purged, kept, or pruned
- anything flagged for review
- how to undo it: , which brings back just the memory into the repo as it is now, or
git revert --no-edit <new-sha>
straight away
Limitations
- Only works inside a git repository that has at least one commit. Without one, there would be no way to undo the removal.
- Only committed content can be restored from the previous commit, which is why any uncommitted, untracked, or ignored content under the targets blocks the run.
- With , pointer files are looked for only next to the folder that contains the scrolls folder. That's where setup puts them for , , and the default. A custom- setup that put them elsewhere will have them reported as other references rather than cleaned.
- The commit type isn't a standard Conventional Commits type, so a strict commitlint hook may reject it (exit 4, above).
Examples
Worked examples are in
. Each example has a premise, the usage, caveats, and the expected output. Read that file only when you need it: for example, when a request does not map clearly to the flags above, or when the user asks for an example.
Development
See
for the layout, running the
regression
suite, and versioning notes. Don't read or act on
or
while carrying out a user's
request.