My development setup for working with coding agents across the terminal, editor, and shell.
It brings together shared instructions, reusable skills, specialized agent roles, client configuration for Codex, Claude Code, and Grok, plus the shell and tool settings that support the workflow. Use the repository as a starting point: adopt the pieces that fit how you work and change the rest to suit your machine and preferences.
- Shared working principles across Codex, Claude Code, and Grok
- Specialized explorer, support worker, reviewer, and council agent roles
- Reusable skills for planning, implementation, review, documentation, and handoff
- Hooks that keep agent behavior consistent across a coding session
- Fish as the primary shell, with shared daily behavior mirrored into Zsh
- Terminal and editor configuration for a keyboard-driven workflow
- Small local utilities for project checks and agent-assisted development
| If you want to adapt… | Start with |
|---|---|
| The shared agent workflow | .codex/AGENTS.md |
| Codex | .codex/config.toml, agents, hook registration, and hook implementations |
| Claude Code | .claude/settings.json, instructions, and agents |
| Grok | .grok/config.toml, instructions, and hooks |
| Reusable agent skills | skill configuration and shared skill sources |
| Fish | .config/fish/config.fish |
| Zsh | .zshrc and .zsh/fish-mirror.zsh |
| Bash | .bashrc |
| Editors and terminal tools | .config/ |
| A new machine of yours | setup.sh |
The CONTEXT-*.md files are maps for the less obvious parts of the setup. They
explain which files own agent instructions, hooks, lifecycle behavior, and shared
shell behavior.
Run setup on both computers to install the yusing/mosh fork, then connect from the computer holding the image:
mosh user@hostIn Mekugi, press Ctrl+^ followed by i to attach a clipboard PNG over the
existing encrypted Mosh connection. Ctrl+^ followed by c cancels capture or
upload. Ordinary paste keys are unchanged. The client needs wl-paste on
Wayland or xclip on X11; macOS uses its built-in osascript. Both ends must
run the fork.
Images can be up to 64 MiB. Mosh shows progress, keeps typing and screen updates responsive, and delivers one bracketed image-path paste after upload succeeds. Mekugi recognizes that path as an attachment; other applications need equivalent image-path attachment support. An interrupted upload resumes while the same client and server remain alive, but does not survive restarting either process. Incomplete files are removed on cancellation, failure, or server exit. Completed private image files remain in remote temporary storage for pending drafts and follow the host's normal temporary-file cleanup policy.
Setup stops the old clip-watch, clip-recv, and clip-xvfb services and the
macOS watcher, and moves remaining legacy launch files and helpers into
~/.local/share/dotfiles-setup/retired-clipboard/. It leaves Tailscale operator and
linger settings unchanged because other tools may use them.
Review setup.json before running setup. It installs tools and
configures this home checkout. Run as a regular user. Setup installs a root-owned
helper and a per-user passwordless sudo rule for package and login-shell operations.
The first installation or a helper update may request authentication; subsequent
runs reuse the authorization. These files remain installed under /etc/.
Homebrew installation and upgrade confirmations are disabled.
Checkout collisions are backed up under ~/.local/share/dotfiles-setup/.
Copy selected files instead if you want to retain your own dotfiles.
bash setup.shFor a new machine that should become a checkout of this repository:
curl -fsSL https://raw.githubusercontent.com/yusing/agentic-dotfiles/main/setup.sh | bashLinux and macOS use native installation. After setup, upgrade managed tools with:
bash setup.sh --upgradeArch prefers Homebrew for standalone tools (including Go, Bun, Fish, rustup, rust-analyzer, sccache, Zsh plugins, PostgreSQL 18, and CLI utilities) and uses pacman only for packages depended on by other Arch system packages (such as Python, Node.js, LLVM/Clang, Git, Bash, Curl, OpenSSH, Docker, core build tools, and Chromium/WebKitGTK libraries). Other platforms retain their Homebrew sources. Formulae follow Brew's stable channel. Brew uses available prebuilt bottles; mcdu uses its upstream tap's checksummed prebuilt archives.
On Debian and Ubuntu, setup uses Homebrew LLVM, Binutils, and Make for
selected build groups instead of APT's build-essential. APT still supplies
the host C/C++ headers and runtime libraries needed to link native binaries.
npm packages retain their npm source through Mise, including agent-browser and markdownlint-cli. Bun performs npm installation. Mise also supplies tools without a compatible current Brew source, including gh-dash and go-swagger, plus pinned scriptc 0.4.10 and Lightpanda 1.0.0. The shells select Chrome as agent-browser's default engine.
Brew supplies rustup across platforms. Manage Rust toolchains and targets separately with rustup.
With the supplied shell configuration, Cargo keeps each workspace checkout's default build output
under ~/.cache/rust/targets/. New Git worktrees copy compatible registry and Git dependency libraries from the main
checkout's default target without taking its build lock. Workspace code, build scripts and procedural macros rebuild locally,
along with units that need their outputs. The compiler cache is shared at ~/.cache/rust/sccache.
Explicit Cargo target directories still take precedence.
Arch uses OpenBSD netcat and system Chromium/WebKitGTK 4.1 libraries.
Other Linux distributions retain GNU netcat and Brew browser libraries. WebKitGTK 6 and
Bazelisk are excluded. macOS uses its system netcat and WebKit framework.
PostgreSQL 18 comes from Homebrew with a separate Brew data directory. Setup
does not migrate or delete existing databases. Switching package sources
requires a separate database migration.
Mosh, Claude Code, Grok, Antigravity, and Devin CLI use their declared vendor installers.
Install Mekugi separately. Setup does not install standalone Codex.
Antigravity CLI installs as agy and prompts for Google sign-in on first run.
Devin CLI installs as devin; run devin auth login on first use.
Arch prefers Homebrew for standalone tools and uses pacman for system-depended packages, never both for the same tool. Other Linux distributions use Homebrew plus host bootstrap prerequisites; macOS needs Xcode Command Line Tools. Setup configures the host Fish shell and compiles managed helpers. Open a new terminal after installation.
bash setup.sh # install missing tools (default: --tools=full)
bash setup.sh --tools=dev # interactive workstation (shell + agents + main langs + browser)
bash setup.sh --tools=agent,rust # headless agent sandbox (core + agent-core + lint + Rust)
bash setup.sh --tools=go,rust # minimal core + Go and Rust toolchains only
bash setup.sh --upgrade # upgrade managed tools
bash setup.sh --upgrade git-agent # upgrade only a named Mise toolNormal setup retains installed versions. Use --tools=SPEC (or SETUP_TOOLS)
to select a profile (full, dev, agent, agents, core) or
comma-separated tool groups declared in setup.json. Specific
groups always include core (minimal non-interactive Git, search, and CLI
base). Use agent plus language groups (such as --tools=agent,rust or
--tools=agent,rust,browser) in headless agent sandboxes to install hooks,
skills-mgr, graphify, scriptc, and linters while skipping interactive
shells (shell), host clipboards (clipboard), mosh, and vendor agent CLIs
(agent-clis). The browser group installs agent-browser and Lightpanda,
not the Linux Chromium libraries. Add chromium for those libraries or
webkit for WebKitGTK. To provision local Chrome on x86-64 Ubuntu, run
agent-browser install --with-deps. Unselected native packages, Mise tools,
vendors, and Fish login shell setup are skipped. Helper compilation requires
both bun and scriptc. The tracked .config/mise/config.toml and
mise.lock keep their full inventory. Package managers still install
dependencies of selected tools. Full upgrades refresh declared Brew,
Mise, and vendor tools (or only the selected subset when combined with
--tools). Named upgrades accept a Mise identifier or command
name and skip Brew, vendors, helpers, and final verification.
Full setup configures the sbx_cloud SSH alias in your user SSH configuration
when Docker Sandboxes is managed. If you upgrade only sbx, rerun
sbx --cloud setup ssh to refresh the alias to use the new binary.
Full upgrades skip the Mosh source build when its installed commands identify
the fork's latest commit. Missing or unrecognized builds run the installer.
Setup leaves superseded packages and old image installations in place. Validate their native replacements before retiring old copies manually. Legacy clipboard push services and helpers follow the image-paste retirement described above.
Start with the instruction stack before copying client settings:
.codex/AGENTS.mddefines the shared working principles used by Codex, Claude Code, and Grok.AGENTS.mdis this checkout's repository-level agent file, not the shared client workflow..codex/MAIN.mdcovers coordination and delegation;.codex/FINISHING.mdcovers question-specific independent review;.codex/IMPLEMENTATION.mdcovers implementation craft,.codex/REFACTOR.mdcovers code hygiene and removal of superseded code,.codex/TESTING.mdcovers validation and regression evidence, and.codex/DOCS.mdcovers reader-document purpose and consistency..codex/hooks.jsonactivates lifecycle-specific policies implemented under.codex/hooks/.
The agent definitions divide work by responsibility:
- Explorers gather source-backed facts and caller traces; they do not audit, recommend, or decide what should change.
- Support workers author bounded test suites against a settled contract and a compiling, stable interface, plus reader documentation, fixtures, and other support artifacts. Production, configuration, and dependency changes stay with main.
- Reviewers inspect correctness without owning the implementation.
- Council members provide independent judgment for genuinely ambiguous decisions.
Skills under .skills-mgr/skills/ provide task-specific
workflows that can be shared by multiple agent clients. Begin with only the roles
and skills you need; the setup is intentionally modular.
Before using the client configurations, review their models, permissions, enabled features, hooks, plugins, and external integrations. Some settings assume broad filesystem and command access because they are designed for a trusted local development environment.
The registry selects shared, Codex-only, and remote skills. Start with the skills needed for your project; each skill owns its usage instructions and conditions. Local sources live under shared skills and Codex skills.
compile-agent-tools builds
skills-maintenance. It
requires Git, skills-mgr, and at least one configured agent backend: Codex
via Mekugi, Claude Code with a gemini-web profile at
~/.claude/gemini-web.settings.json, or Devin CLI (devin), plus the normal
commit-hook dependencies. It can launch paid model sessions with full local
repair and commit permissions. For hourly maintenance across multiple machines,
pin one leader host with --leader <host> in the user's cron schedule:
17 * * * * "$HOME/.local/bin/mise" exec -- "$HOME/.local/bin/skills-maintenance" --leader <host>Non-leader hosts exit without modifying the repository or starting agents. Run
mise exec -- skills-maintenance without --leader for an immediate local
cycle on any machine.
The worker uses skills-mgr's refresh runner and three-hour remote cache
lifetime, then synchronizes placeholders and checks every globally registered
remote patch, including conditionally enabled skills. Unavailable upstream
manifests and stale patches start serial headless sessions using the first
available backend in order (codex -> claude with gemini-web -> devin),
falling back to the next backend if a run fails without modifying repository
state. A repair agent verifies the cause, preserves local customizations and
activation conditions, validates its handling, and commits its authored
changes. Network and authentication failures remain unresolved.
When the managed OpenAI Docs override is installed, each cycle also checks its
directory in
openai/codex
using the GitHub CLI (gh). A changed upstream tree dispatches the same agent
fallback chain to merge the complete skill while retaining local-first guidance
and adapted references. The agent validates and commits the skill with its
upstream baseline. Uncommitted skill edits defer that update; upstream failures
leave independent remote maintenance running.
When the managed scriptc skill is installed, the same cycle checks npm for a new stable release. A newer release or a pin and skill mismatch dispatches maintenance of the compiler and the skill together. The agent reads the release notes, runs the named setup upgrade, and rebuilds the helpers before committing. Local edits to the pin, mise files or skill defer the upgrade. The worker checks the resulting pins, installed compiler and skill resources.
Repair authors maintain one local newest-first, 100-entry rolling log at
.skills-mgr/MAINTENANCE.md. The activity log stays outside the public projection.
Generated remote and managed skill placeholder changes are
committed separately without log entries. Manual placeholder edits are preserved when sync
would overwrite them; unrelated staged changes and staged placeholder edits stay outside
automatic placeholder commits. Concurrent maintenance invocations skip
while a cycle is running; errors go to the scheduler's normal output rather than new log files.
The agent-browser skill covers
browser automation. Load agent-browser skills get core for the installed CLI's
workflow; agent-browser skills list lists its specialized guides.
Fish is the main shell configuration. Zsh loads a native port of the daily Fish behavior, while Bash has a smaller independent setup.
Use scc-prod [paths...] [scc options] to count production-oriented source, for
example scc-prod src --by-file or scc-prod --format json. It requires scc
and the helper built by compile-agent-tools. The plain scc command is unchanged.
The helper excludes dependency/build directories, test and example filenames,
benchmarks, explicitly named generated/minified files, and files with recognized
generated headers in their leading comments. It preserves handwritten code that
merely quotes a generated marker or contains long lines. It uses two scc passes
and reports filtering progress on stderr; output formats, ignore files, and
output destinations remain scc-owned. Counts are file-based: inline tests and
generated code without a recognized name or header can still be counted.
Use git diffstat for per-file change counts and totals, including untracked files
without changing the real index. git diffstat-prod applies the same default
source extensions, path exclusions, and generated-header detection as scc-prod.
Both require the helper built by compile-agent-tools and accept Git diff
arguments, such as --cached, HEAD~2 HEAD, or -- src/. A single leading
revision, such as git diffstat-prod HEAD, shows that commit. Production filtering
inspects the compared version of each file, using its old version for deletions.
Fish and Zsh use the local Oh My Posh theme at
.config/oh-my-posh/catppuccin_macchiato.omp.json
so prompt initialization uses a local file. The first interactive Fish or Zsh
launch each local calendar day checks the
upstream theme
in the background. Changed themes replace the local file atomically. Offline or
failed checks keep the existing theme and retry on the next day. The daily check is shared by
both shells and requires the helper installed by compile-agent-tools.
This theme file is managed automatically, so updates replace local edits.
On Linux, tmp_clean --dry-run previews stale generated Go and agent/test
artifacts in both /tmp and /var/tmp; tmp_clean permanently deletes them.
It runs separately from disk-clean. Only owned, recognized
directories whose contents are at least two hours old are eligible. Repositories,
recent artifacts, mounted children, and paths referenced by your processes are
preserved. Stop build and test jobs first: process checks are a snapshot, not a lock
against new activity. If protected processes block inspection, rerun the preview
with sudo "$HOME/.local/bin/tmp_clean" --dry-run. Under sudo, the helper inspects
all processes but still cleans only the invoking user's fixtures.
The command requires the compiled helper installed by compile-agent-tools.
Do not replace your existing dotfiles wholesale. Compare each file with your current configuration and merge the parts you want. In particular, check:
- commands and plugins that may not be installed on your machine;
- Homebrew and other platform-specific paths;
- terminal capabilities, key bindings, and clipboard commands;
- editor, pager, history, prompt, and completion preferences;
- environment variables and local directory assumptions.
Keeping your existing configuration beside this repository makes it easier to adopt one layer at a time and roll back anything that does not fit.
On macOS, setup installs font-cascadia-code-nf, font-cascadia-mono-nf,
font-ibm-plex-sans, and font-jetbrains-mono-nerd-font. The tracked Kaku configuration
retains Kaku’s stock fonts and theme-dependent weights, adding JetBrainsMono Nerd
Font Mono only as an icon fallback on macOS. Linux font settings are unchanged. Only Kaku's Lua configuration is tracked, not its session or private state. Native upgrades include
declared Homebrew font casks as well as formulae.
The WezTerm configuration is a standalone port of Kaku's palettes, JetBrains Mono weights, layout, cursor, copy-on-select, and compatible Cmd shortcuts. Kaku Dark is forced regardless of the system appearance. It uses the login shell, line height 1.1, and JetBrainsMono Nerd Font Mono as an icon fallback (also on Linux). Install those two font families before use. The current display uses Kaku's 15-point baseline and 26px padding, with font size divided by 1.1³ (11.27 pt), equivalent to three Ctrl+- steps. Ctrl+0 resets to that smaller baseline. Display sizing is explicit rather than queried during startup, because that query can hang WezTerm. This replaces the previous Ghostty-style transparency, ligatures, and automatic maximization. Existing windows may need Ctrl+0 to clear an earlier zoom adjustment. Window decorations use the platform title bar and resizable frame, without Kaku's integrated buttons or custom border. Their appearance depends on the desktop/compositor. Kaku-specific AI/tool overlays, smart Tab/close handling, renderer color remapping, pane gaps, session/CWD persistence, and custom tab/native UI are not reproduced. Dark ANSI black stays dark for correct backgrounds, rather than Kaku's special light foreground treatment. WezTerm's native close confirmation and tab titles are used.
The Ghostty configuration uses the same forced Kaku Dark palette, 11.27-point Medium JetBrains Mono with Nerd Font fallback, upright text, Medium bold, font thickening enabled, disabled ligatures, opaque background, blinking bar cursor, and copy-on-select. Cell height is increased by 10%; 13-point side/top padding approximates WezTerm's 26px at 2x display scale. Font rasterization and DPI handling can differ between terminals, so equal point sizes are not a pixel-perfect guarantee. Native server-side decorations, Ghostty shortcuts, Fish/SSH integration, and unfocused command-finish notifications remain. Ghostty retains its own tab UI, cursor blink timing, and byte-limited scrollback rather than WezTerm's 10,000-line limit. Reload with Ctrl+Shift+, and use Ctrl+0 to reset any manual font zoom; open a new window for changed padding and initial dimensions. Ghostty's Ctrl+- changes the size by one point, not WezTerm's multiplicative step.
.
├── setup.sh # Bootstrap and tool installation
├── setup.json # Package and tool declarations
├── AGENTS.md # Repository-specific agent guidance
├── CONTEXT-*.md # Ownership maps for instructions, hooks, and shell
├── .codex/ # Codex settings, base instructions, agents, hooks, and skills
├── .claude/ # Claude Code settings, instructions, and agents
├── .grok/ # Grok settings and Codex-hook adapters
├── .skills-mgr/ # Skill registry and shared skill sources
├── .config/fish/ # Primary shell configuration
├── .zshrc # Zsh-specific configuration
├── .zsh/ # Shared behavior ported from Fish to Zsh
├── .bashrc # Bash-specific configuration
├── .config/ # Editors, terminal, and CLI settings
├── .local/bin/ # Small development utilities
└── .local/lib/ # Helper sources used by setup and hooks
Licensed under the MIT License. You are welcome to copy, modify, and adapt the setup for your own workflow.