bookmark

claude_code 0 companion files
← Back

SKILL.md

---
name: bookmark
description: Manage directory bookmarks using the `to` CLI (fish shell). Use when user says "bookmark this", "bookmark this dir", "bookmark this as X", "unmark X", "remove bookmark", "unbookmark", "list bookmarks", "show bookmarks", "go to bookmark X". Do NOT trigger on "save this", "remember this", "forget this" — those are for memory.
allowed-tools: Bash(fish:*)
---

# Directory Bookmarks via `to` (tofish)

Manages directory bookmarks using the `to` fish shell function. Since Claude Code runs bash, all commands must be wrapped with `fish -c "..."`.

## Commands Reference

```bash
# Bookmark current directory (name = basename of current dir)
fish -c "to add"

# Bookmark current directory with a custom name
fish -c "to add myname"

# Bookmark a specific directory with a name
fish -c "to add myname /path/to/dir"

# Remove a bookmark
fish -c "to rm myname"

# List all bookmarks
fish -c "to ls"

# Rename a bookmark
fish -c "to mv oldname newname"

# Resolve bookmark to its path (for navigation)
fish -c "to resolve myname"

# Clean broken bookmarks (targets that no longer exist)
fish -c "to clean"

# Show help
fish -c "to help"
```

## Workflow

### Bookmark current directory
When user says "bookmark this" or "bookmark this as X":
1. If no name given, run `fish -c "to add"` (uses current dir basename)
2. If name given, run `fish -c "to add <name>"`
3. Confirm the bookmark was created by running `fish -c "to ls"` and showing the result

### Remove a bookmark
When user says "unmark X", "remove bookmark X", "unbookmark X":
1. Run `fish -c "to rm <name>"`
2. Confirm removal

### List bookmarks
When user says "list bookmarks", "show bookmarks":
1. Run `fish -c "to ls"`
2. Display the output

### Go to a bookmark
When user says "go to bookmark X":
1. Resolve the path: `fish -c "to resolve <name>"`
2. Use the resolved path to `cd` in the current bash session (fish subprocess cd won't persist)

### Rename a bookmark
When user says "rename bookmark X to Y":
1. Run `fish -c "to mv <old> <new>"`

### Clean broken bookmarks
When user says "clean bookmarks":
1. Run `fish -c "to clean"`

## Important
- Bookmarks are stored in `/root/.tofish`
- The `to` function is defined in `/root/.config/fish/functions/to.fish`
- Always use `fish -c "to ..."` wrapper — never call `to` directly in bash
- For navigation, resolve first then cd in bash: `cd "$(fish -c "to resolve myname")"`

No companion files

Add companion files to enhance this skill

Danger Zone

Deleting this skill will remove all associated files. This action cannot be undone.

Owner
Prasham Trivedi
Created
4/13/2026, 5:38:34 AM
Last Updated
4/13/2026, 5:38:34 AM
🆔 Skill ID
UH4gf44mvYp6J4HJtAewV