The morning after a bad overnight run
An agent ran all night and something is wrong. This page walks through finding out what it changed and putting it back, with the commands you would type.

See what changed
Start with sk. It shows how things are and the latest changes. sk list shows the changes it saw lately, newest at the bottom. Behind it is the diary, which records what appeared, vanished, moved or changed, when, and which program did it, with that program's parents.
sk show 12 shows which files change 12 touched.
Put back one change
When one entry in the list is the damage, sk undo 12 puts that change back. sk undo --last is there too. An ordinary user can undo only what they could have changed by hand, and sudo includes everyone's changes. If the agent ran as a different user, you will want sudo.
Put back everything since a moment
When the whole night went wrong, go back to a time before it started. sk back 02:00 puts everything back as it was at 02:00. sk back 1h goes back an hour. To limit it to one folder, add --only, as in sk back 1h --only ~/project, and the rest of the machine stays as it is.
A bookmark works the same way. sk mark saves one, and sk back m1234 returns to it.
To see first what a go-back would do, add --dry-run: sk back 1h --dry-run lists what would come back and what would not, and changes nothing. It does not foresee database, container or cloud changes, or a write that fails partway. A time ahead of the computer's clock is refused, with a pointer to a bookmark. If the clock was moved back, go back by bookmark.
Clock time or bookmark
A clock time is fuzzy by milliseconds. That matters for a file that was being written at that moment, and a go-back to a time in the middle of a file a program keeps writing through one open handle leaves that file as it is, and says so. A bookmark made with sk mark is exact and avoids the problem. If you are about to start an agent on something that matters, make a bookmark first.
Taking a go-back back
A go-back is written down. It ends with a bookmark of how things were just before it, and sk back to that bookmark takes the go-back back. On a full disk, or in the cases listed on what it cannot undo, it may not come back exactly, and the go-back names what it could not.
One session, with the commands only
The session below shows the commands in the order you might use them. The comments say what each is for, and no output is shown.
sk # how things are, and the latest changes
sk list # the changes it saw lately, newest at the bottom
sk show 12 # which files change 12 touched
sk undo 12 # put that one change back
sk back 02:00 # everything as it was at 02:00
sk back 1h --only ~/project # the same, for one folder and one hour
sk mark # save a bookmark before trying something
sk back m1234 # go to a bookmark, which is exact
# a go-back leaves a bookmark too; going back to it takes the go-back back
The window with the cat
In testing The cat lives in a pixel-art room window that shows the last 24 hours, and a tap on a fallen thing in the room puts that change back. The window has run in test machines on Linux and Windows and on GitHub's Mac. On Windows, a script deleted six files and one tap in the window brought them back.
What a go-back leaves alone
Some things do not come back, such as a mail already sent or a payment already made. Something an agent made through a cloud call is removed by a go-back when the API's answer said where it is; otherwise it is left, and the go-back says so. The full list is on what it cannot undo.
Next: what it cannot undo, how it keeps things, or install.