Use this skill for a non-exact location only. First decide whether the current working directory already fits the user's request. Stay there when it does.
When another location is needed:
- Set
LOCATIONto the user's named location. Runbm get LOCATION. - Use the result when
bm get LOCATIONreturns exactly one path. - Otherwise run
bm list --porcelain. Each record isbookmark<TAB>path; the separator is a literal tab. Parse bookmark and path as separate fields so paths containing spaces remain intact. - Rank fallback matches in this order:
- exact bookmark name;
- exact path basename;
LOCATIONas a path component;- a contextually related bookmark name.
Prefer basename matches over path-component matches. For example, foo
selects /Users/toni/foo over /Users/toni/src/foo/design-system.
For related names, use the task's meaning: backend-repo is more relevant
to backend work than frontend-for-backend. Do not choose by substring
matching alone.
5. If one path is clearly the best match, select it. If multiple paths remain
plausible, inspect each for task relevance. Check its directory, repository
status and remote when applicable, and read README.md or AGENTS.md when
present. Continue when one candidate is clearly relevant; otherwise show the
candidates and ask the user to choose.
6. If no match exists, tell the user what was tried and ask for a bookmark name
or path. Do not search the entire drive.
7. Run every following operation from the selected path. Set tool cwd when
supported; otherwise use cd -- "$path" && ....
8. Continue the user's task there. Do not merely report the path or ask the user
to change directory.
Completion: the user's task runs from the selected relevant path. If selection remains unclear, stop after showing candidates and asking the user.