Direnv Workspaces — DevOps skill for Claude Code
Per-folder identities for Claude Code, gh, aws, docker, kube and git, switched by direnv.
How to install Direnv Workspaces
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open chasanc/direnv-workspaces and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Direnv Workspaces does
Per-folder identities for Claude Code, gh, aws, docker, kube and git, switched by direnv.
Alternatives in DevOps
- Render Deploy — Deploy applications to Render's cloud platform using Git-backed services 14.6k ★
- Ship Release — Systematic release workflow for RTK: build verification, version bump, changelog update, git tag, and push to 11.9k ★
- AWS Skills Pack — AWS cloud services skills 1.6k ★
README
direnv-workspaces
**Work for several clients or employers from one laptop without mixing up accounts.** `cd` into a folder and your Claude Code account, `gh`, `aws`, `docker`, `kube`, npm config, git email and SSH key switch to that folder's identity. No logging in and out.

Why
| Without it | With it |
|---|---|
One gh/aws/Claude login at a time; you log out and in between projects |
Each folder has its own logins, all valid at once |
| A commit lands with the wrong email, or a push uses the wrong SSH key | includeIf picks the email and key by folder |
| A tool started from a dock icon or cron uses whatever was logged in last | Anything started without workspace env falls back to personal, never to a company |
| Claude Code memory, plugins and history from one client leak into another | Each workspace has its own Claude config and memory, with no credentials copied |
| Claude can read a different client's folder by accident | Deny rules block each workspace's Claude from the others' folders and config |
| Setting up a new client takes an afternoon | ws new acme you@acme.com, then log in once |
How it works
- personal uses every tool's default location (
~/.claude,~/.config/gh,~/.aws, ...). - Each other workspace lives in
~/.config/workspaces//and applies only inside its folder~/work//. - A one-line
.envrcin that folder points direnv at the workspace. Oncd, direnv sets the tools' config-dir variables (CLAUDE_CONFIG_DIR,GH_CONFIG_DIR,AWS_CONFIG_FILE, ...). A gitincludeIfrule sets the email and SSH key. - Leaving the folder restores personal.
Not a security boundary
Everything runs as one Linux user. Any program you run can read every file. This prevents *accidents* (wrong account, wrong key, wrong email), not hostile code. For a hard wall use a dev container or a second Linux user.
Inst
Related Skills
Agent Worker
A headless coding agent in a Docker container: Cursor or Claude Code. You give it a task, it works in a worksp
Clawup
Deploy fleets of specialized OpenClaw agents to your cloud. Define identities in YAML, provision with one comm
Agent Identity Governance Skills
Claude Code skills for agent identity governance: inventory the non-human identities your AI agents and automa
Soc2 Evidence Ledger
Auditor-traceable SOC 2 evidence from GitHub, AWS and Linear in one sealed folder. A Claude Skill and Python C
Claude Pod
Docker sandbox for the Claude Code CLI. Runs Claude against one project folder — including with --dangerously-
Agenhood
Self-hosted, open-source platform for running autonomous AI agents 24/7 with sandboxed Docker containers, pers
Related Agents
Infra Specialist
Use for isolated Terraform, Docker, AWS, Azure, and deployment-documentation work across terraform/, aws/, doc
Release Safety Reviewer
Focused worker for AWS CDK, Lambda deployment safety, blue-green rollout automation, Jenkins, GitHub Actions,
DevOps AWS Expert
Use this agent when the user needs help with DevOps tasks involving AWS services, Docker containers, Terraform