skills/context/SKILL.md
Switch the active credential profile for ronan-skills. Three-tier resolver picks the right `~/.claude/.env.<context>` file based on `$RO_CONTEXT` env var, manual override, `.ro-context.local` / `.ro-context` files in the cwd or any ancestor, cwd-glob rules in `~/.claude/contexts.json`, or the default. Skills source via `$(ro context env)` to get a cwd-aware credential file. Use when the user wants to switch credentials between contexts (personal / work / per-client), set up a new context, or debug which context resolved.
npx skillsauth add RonanCodes/ronan-skills contextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ro context is the meta-CLI all other ronan-skills lean on for credential discovery. The actual script lives at skills/context/scripts/ro (in this repo) and is symlinked into ~/.local/bin/ro so it's invokable from any terminal as ro context ….
This SKILL.md is the user-facing documentation. The script's --help is the canonical command reference.
| Question | Command |
|---|---|
| What context am I in right now? | ro context show |
| Why this context (which rule fired)? | ro context where |
| Which env file did the resolver pick? | ro context env |
| Which contexts exist? | ro context list |
| Switch context for the rest of my session | ro context use <name> |
| Stop pinning, go back to cwd-resolution | ro context auto |
| First-time setup | ro context init |
| Add a cwd-glob auto-rule | ro context add-rule '~/Github-Acme/**' acme |
$RO_CONTEXT env var — one-shot per shell, never written to disk.contexts.json:active — manual override set by ro context use. Sticky until cleared by ro context auto..ro-context.local in cwd or any ancestor — gitignored contributor override..ro-context in cwd or any ancestor — committed, repo's declared context. Recommended default for any repo with a stable owner/account.contexts.json — e.g. ~/Github-Acme/** → acme.default in contexts.json — fallback.The "ancestor" walk goes up to $HOME and stops there, never above.
Every skill that needs API tokens does:
set -a; source "$(ro context env)"; set +a
$(ro context env) returns the absolute path of the env file the resolver picked. For single-context users that's always ~/.claude/.env.personal; for multi-context users it varies per cwd.
Backwards compat: ~/.claude/.env is still a symlink to whichever context was last ro context use'd. Skills that haven't migrated to $(ro context env) keep working unchanged.
Everything under ~/.claude/ (no split with ~/.config/):
~/.claude/
contexts.json # { default, active, rules: [[glob, name], ...] }
.env # symlink, kept for backwards compat
.env.personal # real file per context (mode 600)
.env.<other> # one per profile
# 1. Copy the personal template as a starting point
cp ~/.claude/.env.personal ~/.claude/.env.acme
chmod 600 ~/.claude/.env.acme
# …edit with the client's credentials…
# 2. Pin a repo to its context (preferred — committed, no global config needed)
echo acme > /path/to/acme/repo/.ro-context
# OR add a cwd-glob auto-rule
ro context add-rule '~/Github-Acme/**' acme
| If you… | Resolution |
|---|---|
| Forget to switch context, open a terminal in a Simplicity repo | .ro-context resolves automatically |
| Clone a new repo from a client without thinking | cwd-glob (~/Github-<Client>/**) catches it |
| Have overlapping repos in ~/Dev/ (work + personal side-by-side) | Each repo's own .ro-context wins over the glob |
| Want to test cross-account scripts | RO_CONTEXT=other-account env var for one shell |
| Want to "stay in" one context for a long-running session | ro context use <name> until ro context auto |
| Have a long-running process (dev server, Claude session) | The process holds whatever it was started with — symlink swap doesn't poke it. Restart needed |
[[ro-context-env-profiles]] (LLM wiki research vault) — the design rationale + pull-out checklist~/.claude/contexts.json — the user's actual rules + defaultscripts/ro (this skill) — the implementation, ~320 lines of bash, zero dependencies beyond bash + jq + awk + seddevelopment
--- name: worktree description: Coordinate multiple agents on one repo via a worktree-lock pool, so two agents never clobber each other's working tree. Acquire the first free slot (main, then beta/gamma… worktrees, created on demand), work there on your own branch, release when you've pushed. Use before modifying any repo that might be in use by another agent (factory, dataforce, etc.), or whenever you're told a repo is being worked on. Backed by `ro worktree`. category: development argument-hin
testing
--- name: ship description: Ship a feature branch the local-CI-first way — run the full local gate, push, open a PR, squash-merge, then deploy, without waiting on GitHub Actions. Use when a branch is ready for main and you want it merged and deployed now. Reads CI policy from `ro ci` (default skips remote CI because GitHub Actions billing keeps hitting limits). Sibling to /ro:gh-ship (waits on GitHub checks) and /ro:cf-ship (the deploy half). Triggers on "ship it", "ship this", "merge and deploy
testing
--- name: setup-logging description: Set up (or audit) the observability stack in a TanStack Start + Cloudflare Workers app so it is "diagnosable by default" — structured logging (logtape) with a request context carrying trace_id + userId + tenant/orgId, a trace_id propagated FE→BE→logs→Sentry→PostHog, Cloudflare Workers observability enabled, and Sentry + PostHog wired. Two modes: `setup` (wire it into an app) and `audit` (check an existing app + report gaps). Use when scaffolding a new app, wh
development
Manage credentials INSIDE the active ~/.claude/.env file — read which token/account to use for a given app (Simplicity vs Dataforce vs Ronan-personal), add or update a secret WITHOUT it passing through the chat (an interactive Terminal window prompts for it), and track secrets that were exposed in a transcript so they get rotated. Sibling to /ro:context (which switches WHICH env file is active). Use when the user wants to add an API key/token/secret, asks "which credential do I use for X", needs the env organized/labelled, or a secret was pasted into the chat and should be rotated.