A minimal, privacy-conscious starting point for a self-contained Codex workspace.
The repository separates:
- workspace instructions in
AGENTS.md - Codex configuration, rules, context, and local skills in
.codex/ - durable notes and project context in
obsidian/ - live code repositories in a separate directory referenced by
REPOS_ROOT
It contains no credentials, account identifiers, personal notes, repository history, or machine-specific paths.
Create a repository from this GitHub template, then clone it:
git clone git@github.com:YOUR_ACCOUNT/YOUR_WORKSPACE.git
cd YOUR_WORKSPACESet the two workspace paths in your shell:
export CODEX_HOME="$PWD/.codex"
export REPOS_ROOT="$HOME/src"Start Codex from the repository root so it loads the root AGENTS.md.
- Update
AGENTS.mdwith the routes and constraints that apply to your workspace. - Update
.codex/AGENTS.mdwith guidance that should apply across sessions. - Add reusable context under
.codex/context/. - Add local skills under
.codex/skills/<skill-name>/SKILL.md. - Add project, system, and reference notes under
obsidian/. - Record repository locations in
obsidian/systems/codex/repositories.md.
Keep live source repositories outside this repository. Use the workspace as a routing and context layer, not as a monorepo for unrelated codebases.
- Keep credentials in the operating system keychain, a secret manager, or untracked environment variables.
- Never commit
.env, Codex authentication files, session history, databases, logs, caches, generated files, or shell snapshots. - Review staged changes before every push with
git diff --cached. - Run a secret scanner before making a repository public.
- Use a fresh Git history when converting an existing private workspace into a public template.
The included .gitignore excludes common Codex runtime state, but it is not a substitute for reviewing every committed file.
.
├── AGENTS.md
├── .codex/
│ ├── AGENTS.md
│ ├── config.toml
│ ├── context/
│ ├── obsidian/
│ ├── rules/
│ └── skills/
└── obsidian/
├── projects/
├── systems/
└── wiki/
MIT