Skip to content
Back to skills

Direnv Envrc Bootstrap

ASecurity

Create/update a standard direnv `.envrc` that seeds a worktree `.env` from `~/.config/{slug}/.env` or from another git worktree, then loads it via `dotenv_if_exists`. Use when bootstrapping new git worktrees, fixing missing env vars in Codex-created worktrees, or standardizing local secret loading with direnv.

  • 30 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 8, 2026
ai-agentsshellbashgit

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned November 8, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill direnv-envrc-bootstrap --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Direnv Envrc Bootstrap?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Direnv Envrc Bootstrap
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-direnv-envrc-bootstrap/badge)](https://www.skillsdirectory.com/skills/majiayu000-direnv-envrc-bootstrap)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: direnv-envrc-bootstrap
description: Create/update a standard direnv `.envrc` that seeds a worktree `.env` from `~/.config/{slug}/.env` or from another git worktree, then loads it via `dotenv_if_exists`. Use when bootstrapping new git worktrees, fixing missing env vars in Codex-created worktrees, or standardizing local secret loading with direnv.
---

# Direnv Envrc Bootstrap

## Quick start

Option A (recommended for Codex worktrees): generate `.envrc` plus a pasteable Codex Setup Script:

- `bash scripts/codex_env_clipboard.sh`
- Paste clipboard into Codex → Environment → Setup script (or run `./codex_setup_script.sh`)

Option B (repo-only): generate `.envrc` and allow/load env in your shell:

- `bash scripts/write_envrc.sh`
- `source scripts/bootstrap_direnv.sh`

## Defaults

- Seeds `./.env` from `~/.config/medicalassistant_mcp/.env` if present.
- Otherwise tries to copy `./.env` from another `git worktree` (first one found).
- If still missing and `./.env.template` exists, copies it to `./.env`.
- Loads env vars via `dotenv_if_exists` (direnv stdlib).

## Common variants

- Different app/config path:
  - `bash scripts/write_envrc.sh --config-slug my_app`
  - `source scripts/bootstrap_direnv.sh --config-slug my_app`

- Overwrite existing `.envrc`:
  - `bash scripts/write_envrc.sh --force`

- For Codex setup script generation with a custom config slug:
  - `CONFIG_SLUG=my_app bash scripts/codex_env_clipboard.sh`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.