490 Commits

Author SHA1 Message Date
187cda8188 Remove codex desktop from Lua branch 2026-04-28 16:14:25 -07:00
b64bb5874c Drop codex desktop local library patch 2026-04-28 15:56:05 -07:00
6c48073e36 Keep pending scratchpads on invoking workspace 2026-04-28 15:51:51 -07:00
ac7fe9de54 Deploy Hyprland config from Lua branch source 2026-04-28 15:51:03 -07:00
8268cced42 Hydrate minimized windows from hidden workspace 2026-04-28 15:44:06 -07:00
a14c5a9708 Make monocle directional focus deterministic 2026-04-28 15:40:44 -07:00
2f29f7e5ba Update hyprexpo Lua branch lock 2026-04-28 15:01:27 -07:00
8d82429025 Restore hyprexpo on Hyprland Lua branch 2026-04-28 14:53:28 -07:00
9983a94421 Implement Hyprland Lua migration 2026-04-28 12:31:42 -07:00
d5abefe15e Fix taffybar HLint hints 2026-04-28 11:39:09 -07:00
4dfaabc569 Add Claude usage widget to taffybar 2026-04-28 11:32:53 -07:00
86d32eb0c8 Fix taffybar display environment startup 2026-04-28 10:35:47 -07:00
119b250bcc fix(sni): avoid duplicate blueman applet unit 2026-04-28 10:23:51 -07:00
63e5d1636d chore(gitignore): ignore home-manager backups 2026-04-28 10:23:51 -07:00
ba9cc6b811 chore(codex): trust keepbook project 2026-04-28 10:23:51 -07:00
c448b1d106 feat(nix): add codex desktop launcher 2026-04-28 10:23:51 -07:00
8ca8492b3b Update flake lock 2026-04-28 10:16:49 -07:00
c62d5df036 Include ignored files in Projectile file search 2026-04-28 10:15:21 -07:00
2ae2f56889 Use stacked OpenAI usage widget 2026-04-27 14:37:02 -07:00
f4387182e6 Abstract WM status bar references 2026-04-27 13:54:25 -07:00
b8ece14ea0 Document tiling WM bindings 2026-04-27 13:49:44 -07:00
ba2b24d436 Add tiling WM experience spec v1 2026-04-27 13:14:43 -07:00
975c9701ce Fix Gmail tray OAuth at login 2026-04-27 12:53:33 -07:00
92637b30e4 Propagate taffybar OpenAI usage widget 2026-04-27 12:53:26 -07:00
4e9e2408b5 nix: refresh flake inputs after rebase 2026-04-27 11:24:37 -07:00
e799e7876a taffybar: update vendored checkout 2026-04-27 11:23:59 -07:00
dbaf9af3b6 nixos: patch nixified-ai comfyui overlay 2026-04-27 11:23:20 -07:00
89bfcba9fe nixos: adjust services for updated nixpkgs 2026-04-27 11:23:20 -07:00
3966f7acda nix: fix shared overlay package paths 2026-04-27 11:23:20 -07:00
31504d8e5f nixos: enable ai stack on ryzen-shine 2026-04-27 11:22:50 -07:00
c8941870e2 nix: add shared binary caches 2026-04-27 11:22:50 -07:00
3bcbb70494 taffybar: follow vendored flake inputs 2026-04-27 11:22:50 -07:00
1a09aa134f zsh: add safe ncdu helper 2026-04-27 11:22:50 -07:00
431b4da1d1 codex: trust ai celeb project 2026-04-27 11:22:50 -07:00
edc6e0309b Disable Hyprland idle lock 2026-04-27 11:22:50 -07:00
9c901f84a3 Switch keepbook flake input from local path to GitHub
The local path: input broke system.autoUpgrade since the path
doesn't exist when building from the GitHub flake URL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 11:10:42 -07:00
156d04a4a8 Add MPG341CX OLED autorandr profile 2026-04-27 09:47:22 -07:00
fe13ddd907 Remove Karabiner configuration 2026-04-27 09:04:24 -07:00
36a08c5c26 Add mac-demarco-mini syncthing config 2026-04-26 22:31:34 -07:00
f15aea9a9c Improve MPG341CX input toggle detection 2026-04-26 21:25:17 -07:00
c3c0d54da4 Move git-sync home config to shared module 2026-04-26 20:55:15 -07:00
9c2f244309 Add monitor input toggle keybindings 2026-04-26 18:42:07 -07:00
b596c38cb9 Enable Tailscale on macOS 2026-04-26 18:07:03 -07:00
cde795dcae Add MPG341CX input switcher 2026-04-26 17:39:31 -07:00
31fbcf73ac Configure macOS window tooling 2026-04-26 15:51:27 -07:00
1b8c54d722 Manage GTK CSS with Home Manager 2026-04-26 15:12:53 -07:00
0ed6b7f3e1 Add Qwen Rapid ComfyUI workflow 2026-04-26 13:51:30 -07:00
1a7dd966f9 Add monitor input toggle 2026-04-26 13:43:54 -07:00
5ca4d2745e Add zellij agent helpers 2026-04-26 13:43:54 -07:00
3a5aaa9351 Update keepbook NixOS input 2026-04-26 13:43:27 -07:00
7bec7d53d3 codex: disable vercel plugin 2026-04-26 11:54:01 -07:00
4f4c1b0a5c flakes: update git-sync-rs locks 2026-04-25 18:05:36 -07:00
bcee95fc23 darwin: install Emacs from Nix 2026-04-25 18:05:12 -07:00
1b7c6acf3f darwin: align Homebrew with cask tap 2026-04-25 18:04:53 -07:00
1a06382365 Fix Darwin switch after remote reconciliation 2026-04-25 17:34:58 -07:00
222228742f Fix Darwin dotfile symlink targets 2026-04-25 17:26:51 -07:00
d931e668da darwin: disable spotlight hotkeys 2026-04-25 16:49:20 -07:00
f6423481b8 nix: introduce shared nix modules 2026-04-25 16:49:20 -07:00
aac1dcc78a chore: ignore nix build results 2026-04-25 16:49:20 -07:00
aa035663e9 darwin: update codex and home setup 2026-04-25 16:49:19 -07:00
4b97e6c5f1 codex: manage generated skills with home-manager 2026-04-25 16:49:12 -07:00
5907395512 codex: keep skills under dotfiles symlink 2026-04-25 16:49:12 -07:00
1bc595dc13 codex: externalize generated system skills 2026-04-25 16:49:12 -07:00
2ac7faf884 Remove legacy zsh startup files 2026-04-25 16:49:06 -07:00
ab2f057dd2 Set up GPG key import on nix-darwin 2026-04-25 16:49:06 -07:00
06cde76b84 Remove Gmail MCP server from Codex startup 2026-04-25 16:49:06 -07:00
7a07c2b308 changes from mac-demarco-mini on Sat Apr 18 19:05:32 PDT 2026 2026-04-25 16:49:06 -07:00
6d9d5265b9 chore(flake): update keepbook input 2026-04-24 23:17:11 -07:00
5f6b81c6c1 fix(sni): refresh kanshi patch offsets 2026-04-24 23:06:43 -07:00
ea6a127fa5 chore(flake): update inputs 2026-04-24 23:06:43 -07:00
f9b51ae635 fix(strixi-minaj): stabilize kanshi tray behavior 2026-04-24 23:06:43 -07:00
efcc20c730 fix(nixos): avoid tzupdate catch-up at boot 2026-04-24 23:06:43 -07:00
ddb0a85c68 Add multiplexer title helper 2026-04-24 17:16:56 -07:00
0b1d058417 Add zellij alongside tmux 2026-04-24 15:08:19 -07:00
ac1c958256 Update flake lock 2026-04-24 11:33:52 -07:00
a8d2e3bf36 feat(nixos): enable tts on ryzen-shine 2026-04-23 10:22:44 -07:00
6d6176d354 chore(nix): update flake inputs 2026-04-23 10:21:44 -07:00
002d36cff7 chore(flake): refresh locked inputs 2026-04-20 13:07:49 -07:00
64f84cc946 chore(flake): use local keepbook checkout 2026-04-20 13:07:49 -07:00
fb9b526be4 fix(keepbook): make history menu limit optional 2026-04-20 13:07:49 -07:00
7f1f34732a feat(hyprland): add ultrawide-only dock profile 2026-04-20 13:07:49 -07:00
499c7a1c34 fix(emacs): preserve org checkout directory name 2026-04-20 13:07:49 -07:00
89f3220933 chore(codex): trust NIXOS_SD workspace 2026-04-20 13:07:49 -07:00
b09f4d6131 nix: install coqui-tts-streamer 2026-04-20 13:00:15 -07:00
425d97a844 Fix Emacs Elpaca bootstrap and startup 2026-04-18 19:03:11 -07:00
f420c442d8 Update nix-darwin codex flake and switch config 2026-04-18 11:33:40 -07:00
c8a0b2920c chore(ryzen-shine): disable nixified.ai temporarily 2026-04-17 13:15:28 -07:00
13becd22f7 feat(nixified-ai): configure comfyui cuda model support 2026-04-17 13:14:48 -07:00
bae205a553 chore(ryzen-shine): disable railbird k3s temporarily 2026-04-17 13:14:15 -07:00
3cc412cb6b fix(k3s): stop rebuilds waiting on cluster readiness 2026-04-17 13:13:25 -07:00
b98c160268 feat(hyprland): add optional lua-config package stack 2026-04-17 13:12:50 -07:00
fce5ff3ea4 feat(sni): improve kdeconnect tray behavior 2026-04-17 13:12:14 -07:00
aa2ccc3c02 chore(codex): trust local work directories 2026-04-17 13:11:33 -07:00
4b2479afc5 chore: remove gtk settings backup 2026-04-15 12:39:16 -07:00
429d8cc850 feat: add Hyprland screensaver helper 2026-04-15 12:39:16 -07:00
dfbe961e3c chore: migrate Gmail tooling docs to gws 2026-04-15 12:39:16 -07:00
d78393ec35 chore: stop tracking generated checkout caches 2026-04-15 12:39:16 -07:00
8f974d11f6 Use nth-last-child for end widget pills 2026-04-15 12:39:16 -07:00
a61792a5d9 Record local taffybar color fix state 2026-04-15 12:38:25 -07:00
9442aef530 Commit current dotfiles changes 2026-04-15 12:35:27 -07:00
bcf70f0183 chore: adjust flake input pins 2026-04-15 11:04:06 -07:00
3298e50089 config: trust coqui streamer project 2026-04-15 11:03:12 -07:00
851849c4ac fix: simplify org-mode package recipe 2026-04-15 11:03:02 -07:00
a1c0fa68a7 config: deprioritize tailscale tray item 2026-04-15 11:02:51 -07:00
25f182ab99 chore: add bubblewrap to essential packages 2026-04-15 11:01:59 -07:00
cc7c159ee4 fix: configure Strixi dGPU desk profile 2026-04-15 11:01:16 -07:00
934f41d9aa fix: keep Hyprland workspace focus local 2026-04-15 10:59:01 -07:00
f49946a3f5 fix: launch separate ghostty instances 2026-04-15 10:57:03 -07:00
546ea66941 fix: support POST requests in coqui-read 2026-04-15 10:55:44 -07:00
51b9868ae4 feat: add KEF speaker control command 2026-04-15 10:55:28 -07:00
7c30537caf chore: update taffybar submodule 2026-04-15 10:53:16 -07:00
34f30390a9 fix: patch kanshi-sni reconnect handling 2026-04-15 10:45:22 -07:00
5d6a289e42 dotfiles: add coqui-read helper 2026-04-14 00:45:26 -07:00
58e45bda3c nixos: enable local coqui tts 2026-04-14 00:44:44 -07:00
e0d053b0d9 nixos: vendor local package definitions 2026-04-14 00:41:08 -07:00
bd958027a9 taffybar: restore end-widget color wraparound 2026-04-14 00:21:54 -07:00
7de1b406b2 Disable Mullvad VPN on ryzen-shine 2026-04-13 13:13:15 -07:00
34b02c927a taffybar: restore single css entrypoint loading 2026-04-13 13:13:15 -07:00
337ee6872a Fix taffybar startup and restore pill colors 2026-04-12 15:23:20 -07:00
4107edcc55 Update local desktop and secrets configuration 2026-04-12 15:00:09 -07:00
f3fd6a7d95 Update vendored taffybar 2026-04-12 15:00:09 -07:00
26627e012f Fix taffybar host CSS composition 2026-04-12 15:00:09 -07:00
e10f8cd76c Fix Chrome remote debugging launchers 2026-04-12 15:00:09 -07:00
7e7ca69c37 Improve MIME defaults and Home Manager backups 2026-04-12 14:14:38 -07:00
c64045f2ee nixos: reduce ryzen-shine text scaling 2026-04-10 14:02:31 -07:00
76fd5fc86f hyprland: persist ryzen-shine kanshi display profile 2026-04-10 13:58:45 -07:00
34c3ad0ff8 taffybar: propagate config and flake updates 2026-04-10 13:40:30 -07:00
fa34081247 nixos: add railbird system user for k3s secrets 2026-04-10 13:03:56 -07:00
f49feaf378 Avoid package.el in org-wild-notifier async worker 2026-04-10 12:41:21 -07:00
d29b03c475 Tune ryzen-shine taffybar density 2026-04-10 12:28:46 -07:00
bbf1a99589 Tune ryzen-shine text scaling 2026-04-10 12:28:10 -07:00
9da5c5f345 revert: undo unintended submodule updates 2026-04-09 13:58:30 -07:00
7a17338936 chore(nixos): refresh flake inputs 2026-04-09 13:41:30 -07:00
5ad7ccf6bb chore(xmonad): bump submodule revisions 2026-04-09 13:41:27 -07:00
6cd3343614 chore(taffybar): remove split widget submodules 2026-04-09 13:41:22 -07:00
5db63a2bb0 nixos: update inputs and restore switch 2026-04-06 17:04:14 -07:00
2cd0febd2f docs: note picom debug log cleanup 2026-04-06 17:03:27 -07:00
dad13f5a19 chore(codex): lower default reasoning effort 2026-03-31 16:28:35 -07:00
0e0dba42ad chore(nixos): update t3code patch hash 2026-03-31 16:28:29 -07:00
e3c7c9d809 fix(nixos): normalize GPG key imports 2026-03-31 16:27:16 -07:00
c8650dd0ed feat(nixos): add Ghostty desktop entry 2026-03-31 16:26:44 -07:00
0fb27354a6 Add password reset skill 2026-03-31 12:15:14 -07:00
880d7047df hyprland: use builtin previous-workspace toggle 2026-03-31 11:24:50 -07:00
a55bc242a8 chore(taffybar): refresh pinned flake inputs 2026-03-30 12:40:07 -07:00
a127ae9522 fix(taffybar): make live checkout opt-in 2026-03-30 12:36:22 -07:00
313eb0db81 nixos: refresh flake inputs 2026-03-30 02:08:48 -07:00
72a035dd0c codex: update local config defaults 2026-03-30 02:08:10 -07:00
efe8993d26 codex: add imagegen and plugin-creator skills 2026-03-30 02:07:49 -07:00
f6d27a01c1 hyprland: cycle workspaces per monitor 2026-03-30 02:06:12 -07:00
f80d61cb74 Drop redundant vendored taffybar flake inputs 2026-03-30 01:58:27 -07:00
13f477f300 add t3code 2026-03-30 01:56:27 -07:00
16ae80b8a0 hyprland: serialize systemd session env import 2026-03-30 00:01:55 -07:00
3140b4f7c5 Set zlib library path in taffybar dev shell 2026-03-29 14:17:27 -07:00
ba1cc41e87 Fix taffybar dev shell tool resolution 2026-03-29 12:57:53 -07:00
a031d4d987 chore(taffybar): update submodule 2026-03-26 22:31:40 -07:00
48986b4892 docs(skills): add nixpkgs review guidance 2026-03-26 21:29:24 -07:00
ec39b3953f chore(flake): update pinned inputs 2026-03-26 21:28:48 -07:00
32c8508963 feat(home-manager): set GTK theme and git signing format 2026-03-26 21:28:00 -07:00
46e36d62b0 fix(nixos): patch quill ledger.did during build 2026-03-26 21:27:20 -07:00
9239eefff3 feat(desktop): improve launcher and window picker presentation 2026-03-26 21:26:19 -07:00
c1764fd0ee Fix Go mode eldoc setup 2026-03-25 13:06:24 -07:00
d9cbea9bcf fix org-agenda-api container startup 2026-03-25 11:45:55 -07:00
311f142d35 Update taffybar for bus-name churn dedupe fix 2026-03-23 22:24:58 -07:00
e5ae4da40d Add taffybar startup tray diagnostics 2026-03-22 07:27:12 -07:00
98ca024082 Update taffybar for stale tray rebuild fix 2026-03-21 13:09:16 -07:00
f9835c7cff Propagate taffybar tray startup fix through local flakes 2026-03-21 12:01:11 -07:00
8b8cd36ef1 Record taffybar tray startup fix commit 2026-03-20 00:27:01 -07:00
9972c16cf9 Update taffybar for tray startup fix 2026-03-20 00:26:42 -07:00
6e1db80e8a chore(users): drop explicit imalison uid 2026-03-19 13:49:56 -07:00
18fdda20e8 feat(nix): add git-blame-rank to essential packages 2026-03-19 13:47:45 -07:00
4823dc5e16 chore(nix): refresh flake inputs 2026-03-19 13:46:31 -07:00
23ae84e176 chore(taffybar): sync local overlay with vendored submodule 2026-03-19 13:44:09 -07:00
860e2b029c fix(git): use stable gh credential helper path 2026-03-19 13:19:58 -07:00
005545613e chore(codex): tune local assistant config 2026-03-19 13:19:44 -07:00
e51d2ec68f feat(skills): add OpenAI docs system skill 2026-03-19 13:19:06 -07:00
336c81178c chore(taffybar): bump vendored submodule 2026-03-15 14:15:23 -07:00
1f4bbbf92b chore(codex): trust local project directories 2026-03-15 14:13:13 -07:00
5d81e7c80c chore: update flake inputs 2026-03-14 10:44:41 -07:00
dd2c4fa8a4 chore: trust additional Codex projects 2026-03-14 10:44:18 -07:00
281e8b9a56 Improve Rust target cleanup skill 2026-03-12 13:25:53 -07:00
6a2f952fc3 feat(taffybar): build against local vendored packages 2026-03-10 14:12:36 -07:00
2d29056ed5 feat(hypridle): stop locking before dpms off 2026-03-10 14:11:37 -07:00
e2d7dcf0c2 chore(skills): prune bundled slides and spreadsheets docs 2026-03-10 14:11:27 -07:00
8bffa0c2b0 fix: restore just switch on current nixpkgs 2026-03-10 14:06:37 -07:00
77a71e0a10 Update taffybar and Emacs configuration 2026-03-09 00:46:12 -07:00
9d5f048f8c chore: update codex tooling and taffybar 2026-03-05 17:54:03 -08:00
a9a7546a1f chore(nixos): update flake lock inputs 2026-03-05 07:26:00 -08:00
5860600bd0 feat(nixos): add gws and fix switch blockers 2026-03-05 07:25:48 -08:00
b0ecf2a0d7 chore(taffybar): update input wiring and tray priorities 2026-03-05 07:24:58 -08:00
fb9a30b8a6 chore(agents): refresh metadata and skill creator loader 2026-03-05 07:24:26 -08:00
6e7a8f6f54 chore(git): scope org-agenda-api identity overrides 2026-03-05 07:24:08 -08:00
org-agenda-api
dc9c1d0de5 nixos: bump flake lock inputs 2026-03-03 11:52:00 -08:00
org-agenda-api
e2f69af4e5 taffybar: add CPU widget and advance local pin 2026-03-03 11:51:42 -08:00
org-agenda-api
988df4ba8d hyprland: add hypridle and hyprlock integration 2026-03-03 11:51:37 -08:00
org-agenda-api
42c7aeb9e3 gitconfig: add org-agenda-api identity and safe directories 2026-03-03 11:51:14 -08:00
org-agenda-api
8722cac7d0 docs(skill): expand disk-space cleanup playbook 2026-03-03 11:51:09 -08:00
org-agenda-api
965a2ff070 nixos: remove stale synergy patch override 2026-03-02 21:23:46 -08:00
37eb01bee2 Flake lock bump 2026-02-25 10:29:20 -08:00
728b71f484 Update flake locks for status-notifier-item KDE SNI fix
Update status-notifier-item to 0.3.2.10 which fixes KDE apps
(kdeconnect-indicator) not registering tray icons due to an overly
strict ownership check rejecting multi-connection SNI registration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 02:04:33 -08:00
dbcbf951f0 Prevent org from saving org-agenda-files to customize
org-agenda-files is managed programmatically. Override
org-store-new-agenda-file-list to use setq instead of
customize-save-variable, and reset org-agenda-files to nil
before building it so stale customize values are ignored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:01:46 -08:00
8fdd9433c8 Add recurring.org to org-agenda-files
Include ~/org/recurring.org in both Emacs and the org-agenda-api
container so recurring tasks appear in the agenda.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:23:22 -08:00
f5ac66ecb6 Add personal information to AGENTS.md 2026-02-23 11:34:11 -08:00
fc2eb80ee9 Update ACME/nginx org-agenda-api host config and stage taffybar repos 2026-02-23 01:02:14 -08:00
c76cd297c0 Fix org-agenda-api host 2026-02-22 23:54:56 -08:00
1826a77384 Another taffy bump 2026-02-21 19:30:44 -08:00
2d28a20948 taffybar bumps 2026-02-21 19:07:59 -08:00
3f5b126cbe Add disk space cleanup skill 2026-02-20 23:10:01 -08:00
f67638947a Update wallpaper source dir and fix README badge link 2026-02-20 08:08:11 -08:00
220f5b733c nixos: skip taffybar startup in KDE sessions 2026-02-20 06:07:00 -08:00
4f80e2d0bb Set taffybar position back to top 2026-02-20 06:05:51 -08:00
17a0b280cd gh-pages: make org export resilient in CI 2026-02-20 05:56:09 -08:00
899ec139e9 taffybar: refine tray icon priorities and icon lookup 2026-02-20 05:55:18 -08:00
68c92992a2 Update taffybar submodule (workspace fixes + v5.2.1) 2026-02-20 05:43:46 -08:00
89f6495c67 Track taffybar sni-priorities.yaml 2026-02-20 05:14:28 -08:00
272cfec5ee chore(taffybar): bump taffybar to 6cfc1f6 2026-02-20 05:04:02 -08:00
f4ce538df7 chore(taffybar): bump upstream input and refresh locks 2026-02-20 05:01:34 -08:00
8ea3adb49f chore(taffybar): bump upstream submodule to latest tray/workspace fixes 2026-02-20 04:22:31 -08:00
db1dd5e557 ignore(taffybar): ignore local SNI priority state files 2026-02-20 04:22:20 -08:00
85b9b2c8ad Use upstream prioritized collapsible SNI tray in local config 2026-02-20 03:57:58 -08:00
3a4fafc9d4 style(taffybar): align combined labels and keep clock centered 2026-02-20 02:43:15 -08:00
588087270f refactor(taffybar): unify workspace widgets across backends 2026-02-20 02:42:55 -08:00
3bf1d8dadb Fix a few imalison-taffybar issues 2026-02-20 01:50:57 -08:00
b432d758a4 chore(taffybar): align flake follows and refresh locks 2026-02-20 01:46:34 -08:00
77dcec7849 chore(nixos): simplify switch recipe aliases 2026-02-20 01:45:59 -08:00
2416f46a3c taffybar: Remove icons from date/time 2026-02-20 01:29:15 -08:00
3af98f96bc Disable railbird cache 2026-02-20 01:27:29 -08:00
6befc1c6ff Update taffybar submodule for wakeup debug widget 2026-02-20 01:15:14 -08:00
7ff9efe0f4 feat(sni): enable Flameshot grim adapter 2026-02-20 01:07:46 -08:00
97ac691f2c feat(config): use SSH git protocol with gh credential helper 2026-02-20 01:07:31 -08:00
a63f286bf2 feat(taffybar): add wakeup debug widget and safer hyprctl handling 2026-02-20 01:07:07 -08:00
5738a7b8ce Update taffybar submodule for wakeup manager fix 2026-02-20 00:52:51 -08:00
f1498ceb1e feat(clock): stack date above time 2026-02-20 00:52:07 -08:00
01d9d21a85 chore(nix): bump flake lock 2026-02-20 00:35:18 -08:00
e05832f5ca taffybar: add configurable persistent SNI tray priorities 2026-02-20 00:03:27 -08:00
5b1c0d972f docs(skill): define unsubscribe scan execution defaults 2026-02-20 00:00:00 -08:00
8db8c02304 feat(wm): add rofi wallpaper launcher and keybindings 2026-02-19 23:59:51 -08:00
adf320a414 nixos: bump keepbook and expose keepbook binaries 2026-02-19 23:08:23 -08:00
6c5d493561 nixos: drop invalid agenix.service ordering for tailscale autoconnect 2026-02-19 19:58:22 -08:00
aea078c17a Remove broken action-cache gitlink entries 2026-02-19 12:13:37 -08:00
196bf9155e Add emacs snippets and workspace stubs 2026-02-19 12:13:37 -08:00
6af998dfd8 Add Claude settings and cached GitHub actions 2026-02-19 12:13:37 -08:00
631c2cc09f Adjust NixOS config and tailscale setup 2026-02-19 12:13:37 -08:00
c01c96dde0 Update xmonad dev environment setup 2026-02-19 12:13:37 -08:00
a2eaa9c058 Update Tailscale auth key secret 2026-02-19 12:04:53 -08:00
32e594ab22 Clarify credential handling in AGENTS instructions 2026-02-18 22:08:18 -08:00
67f4381e06 Combine laptop battery/network and asus/disk widgets 2026-02-18 21:20:01 -08:00
89529e7f62 Sanitize MPRIS metadata newlines while keeping stacked label 2026-02-18 17:59:58 -08:00
6da3da52f8 nixos(keepbook): drop obsolete sync daemon patch 2026-02-18 12:53:33 -08:00
fc89fcee1a claude: skip dangerous mode permission prompt 2026-02-18 12:49:31 -08:00
06bbd5b7cd nixos/taffybar: pin status-notifier-item package 2026-02-18 12:49:25 -08:00
a7cab63fa7 nixos: add switch-local recipe 2026-02-18 12:48:13 -08:00
292ef25fcd nixos: bump keepbook flake input 2026-02-18 12:43:33 -08:00
8775e41cb3 Remove asciinema config from dotfiles 2026-02-18 12:31:28 -08:00
f314db999c Fix cachix-populate just recipe (shebang) 2026-02-18 11:54:03 -08:00
e3e23f9c7a railbird-sf: serve syncthing/docs via nginx 2026-02-18 11:46:28 -08:00
ee16ba6aa1 nixos: patch keepbook-sync-daemon for updated sync_all_if_stale 2026-02-18 10:59:20 -08:00
78e6dce5eb taffybar config: fix tray/battery order for packEnd 2026-02-18 10:54:55 -08:00
92c7774539 nixos: nix flake update 2026-02-18 10:36:21 -08:00
110bbda132 taffybar: fix parse error in laptop widget list 2026-02-18 10:34:33 -08:00
8b8d044290 Move sni tray back 2026-02-18 10:28:35 -08:00
0fde36b099 Fix cachix-populate just recipe 2026-02-18 10:11:58 -08:00
57a3e0ebe3 taffybar config: place battery after tray 2026-02-18 10:11:58 -08:00
0eb9a446b5 Add just commands to auth and populate Cachix 2026-02-18 10:07:00 -08:00
3c9ba043d0 taffybar config: drop barLevels; tray back on main row; restore sun/lock text 2026-02-18 09:56:45 -08:00
5b480040a0 CI: include taffybar Cachix substituter 2026-02-18 02:14:44 -08:00
9e2a978911 CI: free disk and pin substituters 2026-02-18 02:07:13 -08:00
9c1888f949 repo hygiene: move secrets to pass; add examples; misc updates 2026-02-18 01:37:46 -08:00
67c7290a43 Add Cachix cache and CI workflow 2026-02-18 01:17:30 -08:00
8bcb531e56 taffybar config: stack sun+lock widget 2026-02-18 01:17:30 -08:00
8eac8fb6f4 taffybar config: stacked RAM/SWAP, barLevels tray row, bump locks 2026-02-18 01:17:30 -08:00
67d1577ae8 chore(nixos): bump org-agenda-api (mova v5.20.3) 2026-02-17 18:51:43 -08:00
0a8d812ee8 chore(nixos): update playwright-cli override hash 2026-02-17 17:39:05 -08:00
5a9e3c4894 chore(nixos): point switch recipes at GitHub flake URL 2026-02-17 17:38:53 -08:00
0730e75088 feat(rumno): tune notification rules and timeout handling 2026-02-17 17:38:38 -08:00
df79ced549 feat(hyprland): patch hyprexpo with workspace numbers and bring mode 2026-02-17 17:38:17 -08:00
a50dbc60e8 nixos: remove retired user accounts and related config 2026-02-17 16:46:25 -08:00
5b12d0dc70 chore(secrets): rotate org-agenda-api auth password 2026-02-16 16:35:30 -08:00
c9884b2825 fix(org-agenda-api): import single-line secrets via flyctl 2026-02-16 16:35:19 -08:00
acb20132e3 feat(taffybar): split now-playing label and bump submodule 2026-02-16 16:35:03 -08:00
0ddc3b4a65 Update unsubscribe skill cleanup guidance 2026-02-16 12:23:17 -08:00
cd535b7b01 Rotate org-agenda-api prod auth password 2026-02-15 11:43:50 -08:00
4753901ef1 nixos: apply nixpkgs PR 490230 (playwright-cli) 2026-02-13 14:10:59 -08:00
8431dcc87d nixos: bump keepbook 2026-02-13 13:19:19 -08:00
5a5fda5cc0 nixos: add playwright-cli 2026-02-13 13:19:19 -08:00
2769eeb5a9 nixos: pin taffybar via github input (override locally when needed) 2026-02-13 11:50:26 -08:00
71736af86d nixos: bump git-sync-rs 2026-02-13 11:45:04 -08:00
d024712b78 nixos: lock taffybar flake input via git+file 2026-02-13 05:24:23 -08:00
f35e26aff1 nixos: update lock for taffybar path input 2026-02-13 05:19:02 -08:00
aee881dcd7 nixos: allow agenix to decrypt tailscale authkey via user ssh key 2026-02-13 04:38:14 -08:00
8dde61a230 nixos: tailscale auto-connect via agenix auth key 2026-02-13 04:35:47 -08:00
fa81dac17f nixos: bump kanshi-sni 2026-02-13 04:17:42 -08:00
87e10caa75 taffybar: collapse mpris when no visible children 2026-02-13 04:17:33 -08:00
808ad38753 nixos: fix oci-containers Restart conflict for org-agenda-api 2026-02-13 04:07:03 -08:00
2f3aa004f5 nixos: enable tailscale module 2026-02-13 03:57:41 -08:00
2162f058ff nixos(keepbook): remove removed keepbook-sync-daemon tray-icon arg 2026-02-13 03:51:57 -08:00
dbbbb7ff5a Enable flake nixConfig and add cache.railbird.ai substituter 2026-02-13 03:25:30 -08:00
5155c96195 chore(nixos): bump keepbook 2026-02-13 03:22:56 -08:00
bc64378bbc chore(nixos): bump git-sync-rs 2026-02-13 02:09:57 -08:00
26779e7011 nixquick: force-disable k3s 2026-02-13 01:28:49 -08:00
468b3b9ea9 Bump keepbook 2026-02-13 01:28:31 -08:00
e04ca29749 Add journaling skill 2026-02-13 01:12:52 -08:00
7499328179 Remove debug taffybar logging 2026-02-13 01:07:37 -08:00
50f167e5b2 nixos: update locks and rootless podman prune 2026-02-13 00:26:08 -08:00
1161cea530 hypr: treat rumno as overlay 2026-02-13 00:05:42 -08:00
43adf5a8fe taffybar: refresh lockfiles 2026-02-13 00:05:30 -08:00
4a6b178546 gitignore: ignore build artifacts and generated configs 2026-02-13 00:03:29 -08:00
93ddab4e9e nixos: quiet warn-dirty and scope nixified-ai import 2026-02-13 00:02:13 -08:00
25a07dd7b2 nixos: replace rcm with home-manager dotfile links 2026-02-12 23:45:49 -08:00
9dba5fbad3 Move taffybar back to top 2026-02-12 23:11:59 -08:00
867abf7cee taffybar: bottom bar + fix Hyprland workspace widget config 2026-02-12 22:57:15 -08:00
02abb5f8e4 chore(nixos): bump git-sync-rs to v0.7.0 2026-02-12 22:55:03 -08:00
b284ceb716 Add rofi launcher for tmux Codex and nixos agent notes 2026-02-12 22:33:14 -08:00
134009cebc nixos/taffybar: propagate status-notifier-item dbus fix from upstream master 2026-02-12 20:28:27 -08:00
1e28cb10ab Treat rbsf.tplinkdns.com as managed ssh host 2026-02-12 20:27:30 -08:00
eaba704fab flake bump 2026-02-12 20:25:38 -08:00
b1072f0528 chore: unify codex skills under agents 2026-02-12 20:23:16 -08:00
94172a65b7 feat: add logical-commits skill 2026-02-12 20:21:51 -08:00
a4e4ea3a94 Add agent project constellation guides and link policy 2026-02-12 20:21:37 -08:00
2479c98476 Propagate taffybar lock updates into nixos flakes 2026-02-12 20:09:14 -08:00
955216bff7 Propagate status-notifier-item update into imalison-taffybar 2026-02-12 20:09:10 -08:00
cca3383674 Enable all terminfo entries for system 2026-02-12 20:08:08 -08:00
3fe67188e3 gitignore: ignore local status-notifier-item checkout 2026-02-12 19:14:55 -08:00
f25d51c92d dotfiles: bump taffybar submodule 2026-02-12 19:14:48 -08:00
ee17a8756f nixos: refresh flake lock 2026-02-12 19:14:21 -08:00
18168dbc59 dotfiles: add rofi agentic skill launcher binding 2026-02-12 19:14:19 -08:00
d6cedef14d nixos: fix switch on strixi-minaj nvidia build 2026-02-12 19:10:40 -08:00
fe6d6fbcb8 nixos: disable status-notifier-item checks in taffybar overlay 2026-02-12 16:42:45 -08:00
93105993c6 nixos: add SSH TERM compatibility wrapper and ghostty terminfo 2026-02-12 16:42:45 -08:00
30c4d55407 emacs: guard org-mode yasnippet disable hook 2026-02-12 16:42:45 -08:00
b8da65b2fd hyprland: tune window animations and restart hyprscratch 2026-02-12 16:42:45 -08:00
5f2c84b645 codex: add hyprland trust and OpenAI docs MCP server 2026-02-12 16:42:45 -08:00
463c8ff36b flake: update inputs and lockfile sources 2026-02-12 16:30:03 -08:00
09ac9fa3d5 nixquick: disable railbird-k3s 2026-02-12 16:27:44 -08:00
6395685ae9 nixos: adjust desktop package selection 2026-02-12 16:27:44 -08:00
d7efe5b6a6 nixos: set NetworkManager rc-manager to symlink 2026-02-12 16:27:44 -08:00
c36d930eb5 nixos: bump keepbook flake input 2026-02-12 14:19:27 -08:00
616769fe60 nixos: remove taffybar ecosystem follows and fix bitwarden rename
Remove top-level gtk-sni-tray, gtk-strut, status-notifier-item,
dbus-menu, and dbus-hslogger inputs that only existed as follows
targets. Let taffybar and imalison-taffybar resolve their own
ecosystem deps, eliminating cascading lock update headaches.

Also rename bitwarden -> bitwarden-desktop in kat.nix (nixpkgs rename).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:04:50 -08:00
7d099a2be3 Add email unsubscribe skill 2026-02-12 12:52:29 -08:00
096d3f543a agents: Add worktrees instructions 2026-02-12 11:18:50 -08:00
266b142d34 Update SNI tray inputs
Bump flake.lock pins for gtk-sni-tray and status-notifier-item to pick up watcher-restart dedupe and nix-friendly test bus config.
2026-02-12 07:07:03 -08:00
97f65425dc nixos: enable keepbook sync 2026-02-12 01:26:15 -08:00
4f29a0d48d org-agenda-api: guard yas disable hook in container config 2026-02-11 19:05:13 -08:00
f9dbe7fb54 nixos: bump org-agenda-api input to v4.4.1 2026-02-11 18:53:15 -08:00
f0c8c61732 nixos: propagate status-notifier-item v0.3.2.3 2026-02-11 15:24:01 -08:00
63462694f5 taffybar: propagate status-notifier-item v0.3.2.3 2026-02-11 15:23:06 -08:00
da28a0bd05 flake: bump status-notifier-item to v0.3.2.2 2026-02-11 14:37:57 -08:00
52def9b43d nixos: update status-notifier-item input to v0.3.2.2 2026-02-11 14:33:55 -08:00
eea3683aa7 podman: Enable daily auto-prune with --all flag
Without --all, only dangling (untagged) images were pruned,
allowing tagged-but-unused CI images to accumulate (~223G).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 01:39:06 -08:00
a91f58bf82 Update tmux titling guidance in AGENTS 2026-02-11 00:32:16 -08:00
1c7b6437ce Ignore local .worktrees directory 2026-02-11 00:32:12 -08:00
66a01a7b39 Ignore generated hyprscratch.conf symlink 2026-02-10 23:58:51 -08:00
fa2af8f000 taffybar: Reorder widgets 2026-02-10 23:51:56 -08:00
d3ea72b08d nixos: fix switch space issues and set hourly upgrades 2026-02-10 23:46:07 -08:00
f93f2c5d3e Make railbird-sf update hourly 2026-02-10 22:57:36 -08:00
0228989600 Bump flake.lock 2026-02-10 22:56:59 -08:00
280cf5f7ff Don't save plans 2026-02-10 22:54:04 -08:00
b1de4e57eb docs: add hyprscratch migration plan 2026-02-10 22:43:00 -08:00
67708f4f7f codex: trust notifications-tray-icon project path 2026-02-10 22:42:56 -08:00
531a10e1d8 nixos: fix org icon path and disable conflicting power services 2026-02-10 22:42:53 -08:00
53ab4688da emacs: retangle org config when any generated file is stale 2026-02-10 22:42:50 -08:00
5ca733194a taffybar: refine tray behavior and add SNI menu debug tooling 2026-02-10 22:42:47 -08:00
f9a0a5c9c0 taffybar: align flake inputs and drop local overlay patch 2026-02-10 22:42:43 -08:00
2180c042de Tighten taffybar widget spacing 2026-02-10 22:34:01 -08:00
cf59eddef9 nixos/sni: add kanshi-sni tray service 2026-02-10 22:28:23 -08:00
d8ff8a939a feat: add hyprscratch scratchpad management with rule reapply fork
- Add hyprscratch from colonelpanic8/reapply-rules-on-toggle fork that
  reapplies size/position/float rules on every toggle (not just spawn)
- Configure 9 scratchpads: htop, volume, spotify, element, slack,
  transmission, dropdown, gmail, messages
- Use clean mode (hide on workspace change) and auto-dismiss (only
  dropdown persists)
- Fix pavucontrol class (org.pulseaudio.pavucontrol) and dropdown
  position (offset by taffybar height)
- Add kanshi-sni, dbus-menu, dbus-hslogger flake inputs and follows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:28:01 -08:00
8efd44f69e Make completion matching case-insensitive by default 2026-02-10 21:52:37 -08:00
7e397bd440 chore: bump git-sync-rs and notifications-tray-icon flake inputs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:09:30 -08:00
1b726532c1 refactor: split taffybar skill into ecosystem release and NixOS flake chain
Separate the taffybar ecosystem release workflow (Hackage publishing,
dependency graph, version bounds) from the NixOS flake chain integration
(three-layer flake.lock cascade, bottom-up update strategy). Each skill
cross-references the other.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:25:00 -08:00
ecbe245a6d feat: propagate module enables (hyprland/xmonad -> taffybar -> sni)
Move enable propagation into the modules themselves instead of
desktop.nix. Relax the assertion to only prevent both taffybar
and waybar from being enabled simultaneously.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:17:46 -08:00
3010260cd1 docs: note manual doc upload requirement for GTK-dependent packages
Hackage can't build docs for packages with GTK/GI system deps. This
affects taffybar, gtk-sni-tray, gtk-strut, and dbus-menu — docs must
be built locally and uploaded manually for those.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:16:28 -08:00
741a72ebd9 refactor: separate ecosystem release from NixOS config in taffybar skill
Split the skill into two clear concerns: the taffybar org package
release workflow (dependency graph, Hackage publishing, version bounds)
and the personal NixOS flake chain integration. The NixOS section
explains the three-layer flake.lock cascade and why bottom-up updates
matter, without being prescriptive about always doing all layers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:15:17 -08:00
f8a3273643 feat: remove katnivan git-sync, add per-repo tray icons
Remove katnivan repository from both imalison and kat git-sync configs.
Add per-repo tray icon support with icon mapping for org and password-store.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:49:29 -08:00
80926700c1 fix: remove muted color override on mpris label
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:46:11 -08:00
781b5297ad feat: reorganize skills with canonical agents/ locations and symlinks
- Symlink dotfiles/claude/CLAUDE.md -> ../agents/AGENTS.md
- Move global skills to dotfiles/agents/skills/ as canonical location
  (hackage-release, org-agenda-api-production, release)
- Add new taffybar-ecosystem-release skill documenting the taffybar
  package dependency graph and release propagation workflow
- ~/.claude/skills/ entries are now symlinks to canonical locations
- email-cleanup and weekly-scheduling moved to ~/org/agents/skills/
- Removed stale debug-video-processing symlink

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:40:52 -08:00
73c766e828 feat: rename passgen to xkcdpassgen, fix arg passing, add number and char class controls
Fix first-invocation failure by passing "$@" through to the function.
Add number to default password suffix and allow opt-out of each
character class (-U uppercase, -N number, -S symbol).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:25:13 -08:00
6f16b36faa feat: add wlsunset home-manager module for Wayland night light
Replace the manual wlsunset package + commented exec-once with a proper
home-manager services.wlsunset module tied to hyprland-session.target.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 18:38:03 -08:00
aa286e6855 agents: add credential retrieval instructions using pass
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 17:38:08 -08:00
59f7f35aa0 feat: add ASUS platform profile widget and fix flake deps
- Add ASUS widget to laptop bar showing profile icon, CPU freq, and temp
- Add dbus-menu and dbus-hslogger flake inputs to fix gtk-sni-tray build
- Simplify CSS color rules for end-widget pills
- Update taffybar submodule with ASUS Information/Widget modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 15:26:21 -08:00
55b9724b92 feat: add screenLock and wlsunset widgets to taffybar config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 01:43:56 -08:00
10019a13f2 taffybar: remove accidentally committed debug code
Remove debugPopupSNIMenuHook, withDebugServer, and associated debug
imports/deps that were accidentally included in 8d6664d8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 01:34:19 -08:00
5b69d613b8 justfile: add remote-switch recipe for remote NixOS rebuilds
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:15:50 -08:00
67b92178a6 flake: use direct commit URL for happy-coder patch
Moves the happy-coder patch from PR-based template to custom patches
using a stable commit URL instead of the PR number.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:15:49 -08:00
c5f3de9bd9 [NixOS] Disable k3s and enable autoUpgrade on jimi-hendnix 2026-02-09 21:10:58 -08:00
8d6664d83b nix flake update 2026-02-09 19:17:24 -08:00
655b0c6f2d nixquick: enable hourly auto-upgrade
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:15:39 -08:00
950149769d nix: wrap git-sync-rs with convenience symlinks
Adds git-sync and git-sync-on-inotify as symlinks to git-sync-rs binary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:15:36 -08:00
e97b838cda git-sync: remove config repository
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:15:33 -08:00
913767bec7 hyprland: add empty monitors and workspaces config files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:15:30 -08:00
d7a748177b taffybar CSS: remove inline menu/popover styling
The narrowed :not(menu):not(menuitem):not(popover):not(window) selectors
now prevent bar styles from bleeding into popup menus, making the
explicit menu overrides unnecessary. Menus inherit clean styling from
the GTK theme instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:42:01 -08:00
86d667c5e1 taffybar CSS: extract per-widget colors to nth-child rotation
Replace individual .outer-pad.audio, .outer-pad.network, etc. color
rules with a 5-color palette in end-widget-colors.css that cycles via
:nth-child(5n+N). Add workspace pill reset to prevent the rotation
from bleeding into workspace widgets. Move per-widget color variables
from theme.css into end-widget-colors.css (keep tray colors in theme
since the SNI tray is a center widget outside the rotation).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:41:33 -08:00
0fb5bc132a taffybar CSS: narrow selectors to prevent menu/popover color bleed
Use :not(menu):not(menuitem):not(popover):not(window) guards on all
wildcard selectors so bar typography and background-color rules don't
bleed into SNI popup menus and popovers attached via menuAttachToWidget.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:40:43 -08:00
67d5bd793b taffybar: reduce SNI tray overlay icon size (2/5 -> 1/3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:37:22 -08:00
0a6931cf77 flake.lock: update inputs and remove stale HLS-related locks
Update home-manager, NixOS-WSL, status-notifier-item, and
notifications-tray-icon. Remove lock entries for the old
haskell-language-server input and its transitive dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:49:23 -08:00
63b99e4d67 notifications-tray-icon: add dedicated module and update flake input
Add notifications-tray-icon.nix module with overlay and home-manager
service config. Update flake input to colonelpanic8 fork and remove
stale HLS input follows. Clean up xmonad.nix by removing the old
overlay reference and commented-out service definition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:49:18 -08:00
a8aefe3d5e hyprland: replace services.kanshi with package, add nwg-displays
services.kanshi is a Home Manager option, not a NixOS module option,
so the NixOS build was failing. Install kanshi as a package instead.
Also add nwg-displays for GUI monitor arrangement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:49:12 -08:00
01e84f24ba git-sync: enable tray indicator via GIT_SYNC_TRAY env var
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:33:31 -08:00
09b4ef28f8 Replace CLAUDE.md symlink with standalone file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:33:08 -08:00
4add566e8c flake: add git-sync-rs as top-level input and deduplicate
Move git-sync-rs from a nixpkgs PR patch to a direct flake input,
add overlay and package, and have org-agenda-api follow it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:33:05 -08:00
eb707d3168 taffybar: fix popup menu styling and submenu color bleed
Use :not(menu):not(menuitem):not(popover) selectors to prevent
forcing transparent backgrounds on popup menus attached via
menuAttachToWidget. Add dedicated .dbusmenu-submenu styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:33:00 -08:00
2615253a7a hyprland: add ghostty dropdown scratchpad and specialWorkspace animation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:32:54 -08:00
284ae929a7 Move dunst config from xmonad.nix to desktop.nix
Dunst works on both X11 and Wayland, so it belongs in the shared
desktop config rather than under the xmonad-specific module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:13:10 -08:00
c170442904 Add IMALISON_SESSION_TYPE=x11 condition to picom and autorandr
Both are X11-only services that shouldn't start in Wayland sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:12:25 -08:00
157741a93c Set IMALISON_SESSION_TYPE env var for reliable X11/Wayland detection
systemd user environment persists across login sessions, so
XDG_SESSION_TYPE can be stale. Proactively set a custom variable
on each session start so ConditionEnvironment checks are reliable.

Use it for xsettingsd and random-background (X11-only services).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 01:05:48 -08:00
e9545219b3 Enable daily auto-upgrade on strixi-minaj, railbird-sf, and ryzen-shine
Set the autoUpgrade flake reference globally in configuration.nix so
machines only need to opt in with system.autoUpgrade.enable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:41:59 -08:00
a1c31dcfc4 taffybar: fix SNI popup menu styling (white bg, black text, blue hover)
GTK's menuAttachToWidget makes popup menus CSS descendants of the tray
widget, so .outer-pad.sni-tray * (specificity 0,2,0) was bleeding light
tray text colors into menu items.  Fix by using the same parent selectors
with menu descendant types (.outer-pad.sni-tray menu menuitem *) for
specificity 0,2,2+ that definitively overrides the tray color rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:35:32 -08:00
4d014978d2 fix: disable use-package :ensure in container config
The tangled org-config now includes the org-window-habit use-package
block (added in efc50ec1) which uses elpaca-style :ensure recipes.
Standard use-package cannot parse these. Override the normalizer to
accept and ignore :ensure since all packages are provided via Nix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:29:17 -08:00
3123aa6c3f flake: deduplicate inputs with follows
Add follows declarations to reduce duplicate dependency copies:
- nixpkgs: 16 → 8 copies
- flake-utils: 9 → 1 copy
- systems: 12 → 2 copies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:16:17 -08:00
c12f56ff86 chore: bump org-agenda-api (mova 5.20.0)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:13:48 -08:00
7b52fb1f4b Update flake inputs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:58:45 -08:00
111afc60c0 Add happy-coder package
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:58:42 -08:00
df9b5e61c9 taffybar: add SNI menu, withLogLevels, and clean up deps
- Wrap network widget with withNmAppletMenu for click-to-open menu
- Use withLogLevels hook instead of manual enableLogger
- Remove unused aeson, directory, yaml dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:58:40 -08:00
bdcba389cc hyprland: switch htop scratchpad terminal to alacritty
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:58:35 -08:00
ba6baa8628 Fix deprecated xorg package references
Rename xorg.{libXdmcp,libXtst,xev,xwininfo} to their new top-level names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:38:27 -08:00
ddaf752a68 taffybar: change default log level from INFO to WARNING
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:16:16 -08:00
a8cb334938 taffybar: add yaml/aeson deps and log-levels config file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:16:11 -08:00
c7da4f35ce Bump taffybar submodule and update flake.lock
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:16:08 -08:00
9fc1ddc885 Update taffybar (ScalingImage refactor), add toggle keybinding
- Bump taffybar submodule with ScalingImage refactor replacing autoSizeImage
- Add hyper+slash keybinding for toggle_taffybar
- Simplify mprisWidget wrapper in taffybar.hs
- Update flake.locks for gtk-sni-tray
- Add codex trust for taffybar submodule
- Add waybar widget ideas notes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:19:00 -08:00
fc45f40b97 chore: bump taffybar submodule (gtk-sni-tray 0.1.11.2)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 11:04:11 -08:00
615a265def taffybar: bump gtk-sni-tray and update widget layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 00:38:02 -08:00
ede5ccf540 Fix tmclaude to avoid sandboxing 2026-02-08 00:00:43 -08:00
8b888f02a5 USe ghosttty 2026-02-08 00:00:28 -08:00
1e8a591b4f taffybar: accent-tinted active workspace, white border active window
Use accent color (#f1b2b2) tint for the active workspace pill instead of
a white outline, so it's visually distinct from the active window
highlight. Add white border and background to the active window icon
container within workspaces. Also add nerd font family to mpris icon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 23:50:28 -08:00
4c89d204d5 taffybar: add nerd font icon to mpris widget
Wrap the mpris grid in a box with a nerd font music note icon (U+F075A)
so it follows the same icon+label pattern as other widgets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 23:50:22 -08:00
bf2ec862a9 taffybar: bump font size to 11pt and add icon-label spacing
Increase global font size from 9pt to 11pt for better readability.
Add padding-right on icon-label icon elements to prevent nerd font
glyphs from overlapping adjacent text. Consolidate battery CSS
selectors to match the new single-widget structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 23:33:52 -08:00
f80340fee7 taffybar: use nerd font icon+label pairs for battery and disk widgets
Replace the separate batteryIconWidget + batteryTextWidget with a single
batteryWidget using batteryTextIconNew paired with textBatteryNew via
buildIconLabelBox. Switch diskUsageWidget from diskUsageLabelNew to
diskUsageNew which includes a nerd font disk icon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 23:33:48 -08:00
de89725abb chore: bump taffybar submodule (gtk-sni-tray 0.1.10.3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:11:04 -08:00
479bea8ca5 chore: bump taffybar submodule (gtk-sni-tray update)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:18:59 -08:00
6b1d25cdc6 chore: update user config to use new icon-label widget variants
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:04:40 -08:00
24fe3fbb6b taffybar: add comments explaining recent CSS additions
Document the @import url() requirement, per-widget color variables,
workspace label positioning via padding (not margin, which GTK
overlays ignore), asymmetric workspace padding, active workspace
outline targeting, and bar border-radius.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:49:32 -08:00
c7a0ddcc62 taffybar: add white outline to active workspace squircle
Target .workspaces .active .outer-pad with an inset box-shadow to
highlight the currently focused workspace pill.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:47:19 -08:00
89add17016 taffybar: lighter bar background and rounded corners
Reduce bar alpha from 0.55 to 0.35 for more transparency and add
6px border-radius to match widget squircles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:20:04 -08:00
6a388676df taffybar: reduce right-side padding on workspace pills
Asymmetric inner-pad padding (10px left, 3px right) so workspace
number labels have room on the left without extra space on the right.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:18:13 -08:00
319ae7ba6f taffybar: reduce widget squircle border-radius for squarer shape
outer-pad: 12px -> 6px, inner-pad: 9px -> 4px

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:16:48 -08:00
9fcb5c073c taffybar: position workspace number labels inside squircle pills
Use padding on the workspace-label (not margin on the overlay-box,
which GTK overlays ignore) to inset the number into the pill area.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 20:14:41 -08:00
8ae1b2d906 taffybar: add distinct colored squircle backgrounds per widget
Fix CSS import syntax (bare `import` -> `@import url()`) so
@define-color variables from theme.css are available. Define
per-widget background/foreground/border colors and add CSS rules
for clock, disk-usage, sni-tray, battery, and backlight widgets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 19:23:45 -08:00
781a64aa92 hyprland: add rofi icons to window go/bring/replace pickers
Add desktop-entry icon lookup to the rofi window picker scripts,
matching the XMonad setup's icon support. A shared helper script
(window-icon-map.sh) builds a class→icon mapping from .desktop files
and each picker uses rofi's dmenu icon protocol (\0icon\x1f).

Also replaces the X11-only "rofi -show window" with a native
Hyprland window picker using hyprctl clients.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 17:08:12 -08:00
f766fbc8dc Replace codex_tmux with generic trw, tmclaude, tmcodex helpers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:39:21 -08:00
986e414570 nixos: load module-dbus-protocol for PulseAudio DBus support
The taffybar audio widget requires PulseAudio's DBus interface
(module-dbus-protocol) to read volume/mute state. Without it the
widget shows "n/a".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:39:04 -08:00
e4cb9e4861 taffybar: use library detectBackend for wayland/hyprland discovery
Remove detectBackendRobust and discovery helpers from taffybar.hs now
that the equivalent logic lives in System.Taffybar.Context.Backend
(taffybar PR #625). Update submodule and flake.lock accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:14:20 -08:00
9b5d515acc nixos: update flake.lock
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:03:09 -08:00
151ee9b4c5 taffybar: update submodule and flake.lock
Bump taffybar submodule, gtk-sni-tray, status-notifier-item, xmonad,
and nixpkgs inputs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:03:05 -08:00
b8030e39e0 taffybar: add AGENTS.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:02:59 -08:00
8a6081e736 taffybar: add taffybar-crop-bar utility
Shell script that crops the top bar region from a screenshot using
ffmpeg, auto-detecting height from Hyprland's reserved area.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:02:55 -08:00
043d858289 taffybar: use button and overlay controllers for workspace widget
Wire up hyprlandBuildButtonController and
hyprlandBuildCustomOverlayController so workspace buttons are
clickable and the overlay layout is explicitly configured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:02:50 -08:00
72cd82be13 taffybar: robust Wayland/Hyprland environment discovery
Instead of relying solely on environment variables (which can be stale
from systemd --user), actively discover wayland sockets and Hyprland
instance signatures from XDG_RUNTIME_DIR.  Fix up the process
environment so taffybar's internal backend detection agrees, and also
correct XDG_SESSION_TYPE in both directions.  Add INFO-level logging
for backend selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:02:42 -08:00
8c8fbe774c taffybar: add theme.css and update CSS styling
Extract color variables into a dedicated theme.css and import it from
the main stylesheet.  Remove the bar gradient in favor of a flat
background, adjust workspace overlay-box margins, add SNI tray
double-padding fix, and clean up whitespace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:02:18 -08:00
ece1c8eac8 remove ivanm-dfinity-razer and uber-loaner host references
Both hosts are long dead. Removes their CSS files, taffybar host
config entries, and synergy aliases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 14:41:29 -08:00
eff7ff726f ci: fix gh-pages build by setting user-emacs-directory
The org-config macro reads preface/custom/config/bind .el files from
user-emacs-directory at macro-expansion time. In CI this defaulted to
~/.emacs.d/ where those files don't exist, causing the build to fail.
Point it at the repo's emacs.d directory instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 14:22:03 -08:00
482d0446d5 remove xremap from NixOS config
keyd handles all key remapping now, so xremap is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 14:21:31 -08:00
efc50ec104 emacs: add missing tangle directive for org-window-habit
The org-window-habit use-package block had no :tangle header, so it
was never written to org-config-config.el. This meant the mode was
never activated and the advice on org-habit-parse-todo was never
installed, causing errors for habits without a scheduled repeater.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:24:48 -08:00
d97026eb6c emacs: fix transient void-variable on pgtk builds
The pgtk Emacs build lacks HAVE_TEXT_CONVERSION so
overriding-text-conversion-style is void, but transient's .elc
compiled on X11 has static-if expanded to reference it directly.
Define the variable before transient loads when it's missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:24:43 -08:00
38e7b8c3eb hypr: improve minimize/unminimize workflow 2026-02-07 00:26:29 -08:00
b94c561c9f taffybar: restore SNI tray; name wayland widgets hyprland 2026-02-06 14:24:45 -08:00
42fa28f155 flakes: switch codex-cli-nix back to sadjow/main 2026-02-06 13:05:26 -08:00
558f2b9b0d agents: encourage nix run/shell for ad-hoc tools 2026-02-05 23:19:20 -08:00
1af5b5563b taffybar: fix Hyprland context deadlock 2026-02-05 22:22:28 -08:00
782ac9fbd0 nixos: unify wallpapers via syncthing
Start hyprpaper via a user service and set wallpaper via IPC on session start.\nPoint xmonad random-background at the same Syncthing wallpaper directory (X11 only).
2026-02-05 18:42:20 -08:00
ed752f37c5 nixos: add emacs-auto wrapper + desktop files 2026-02-05 18:42:20 -08:00
6d3d0c56d2 xmonad: bind Hyper keys via Ctrl+Alt+Super chord 2026-02-05 18:42:20 -08:00
fc887b5526 taffybar: avoid Wayland backend with stale systemd env
When taffybar is started via systemd --user, the manager environment can keep WAYLAND_DISPLAY/HYPRLAND_INSTANCE_SIGNATURE from an older Wayland session even when we're currently running an X11 xmonad session.

This causes taffybar's backend detection to select the Wayland backend, which prevents X11 struts from being applied and leads to incorrect placement.

Add a small wrapper backend detector that checks for an actual wayland socket and, if missing, sanitizes the env so taffybar's internal context uses the X11 backend.
2026-02-05 18:42:20 -08:00
76495da0b7 taffybar: menu css debugging tweaks 2026-02-05 18:42:20 -08:00
3a4aac3797 Update codex input and switch command 2026-02-05 14:42:02 -08:00
36d421876f flake: update inputs
Updated nixpkgs, home-manager, nix, and related inputs after running nix flake update.
2026-02-05 12:11:28 -08:00
9a8c158e03 strixi-minaj: stop managing waybar disks file
Avoid home-manager overwriting the repo-tracked waybar disks list when ~/.config is symlinked into this repo.
2026-02-05 12:11:18 -08:00
02595898e9 taffybar: bump submodule for new widgets
Track the local taffybar submodule commit that adds NetworkManager-backed widgets.
2026-02-05 12:04:14 -08:00
2f620dfff3 nixos: add chrome devtools desktop entry
- Add a google-chrome launcher with remote debugging enabled
- Add a tmux attach shell alias
2026-02-05 12:03:24 -08:00
5641d31580 hyprland: cap workspaces and add empty-workspace helpers
- Introduce HYPR_MAX_WORKSPACE (default 9) and enforce it in scripts
- Replace 'workspace empty' bindings with scripts that pick an empty id
- Add scroll-to-workspace helper for mouse wheel binds
2026-02-05 12:03:16 -08:00
bfdbaa7752 codex: bump default model
Switch to gpt-5.3-codex.
2026-02-05 12:01:33 -08:00
29f5f6baa4 taffybar: refresh config and add helpers
- Remove stack config in favor of cabal/flake
- Add helper scripts for running/restarting and screenshots
- Update bar CSS/HS config
2026-02-05 12:01:30 -08:00
b70800da59 waybar: add nowplaying module
- Add a playerctl-backed now playing widget
- Track a default disk list file instead of a home-manager symlink
2026-02-05 12:01:06 -08:00
3f9ac8edb9 nixos: change home-manager backup extension
Use 'hm-backup' globally and remove the per-user override.
2026-02-05 12:00:55 -08:00
a7e409f826 nixos: add quickshell/waybar/taffybar modules
- Switch taffybar input to the local submodule
- Add caelestia quickshell (home-manager module)
- Make waybar/taffybar mutually exclusive, defaulting based on xmonad
- Move tray ordering and status notifier watcher config into the right modules
2026-02-05 12:00:46 -08:00
c43fbe23d7 Hyprland: share workspace CSS helpers 2026-02-05 00:41:43 -08:00
a7e70c75e3 Hyprland: reuse workspace widgets 2026-02-05 00:34:57 -08:00
1a10851887 Hyprland: default special workspace filter 2026-02-05 00:27:10 -08:00
9e5e5f091c taffybar: use submodule and improve hyprland config 2026-02-05 00:12:51 -08:00
f476c6a97f hyprland: move cursor with moved window 2026-02-04 22:08:57 -08:00
e3e49d51f4 Fix gather-class to move all windows 2026-02-04 21:32:55 -08:00
b2a6695690 Add codex_tmux_resume helper 2026-02-04 17:15:51 -08:00
f731bb312a Manage mimeapps via home-manager 2026-02-04 17:15:27 -08:00
03bf952815 waybar: tweak sizing defaults 2026-02-04 16:37:45 -08:00
b1d16ea86d waybar: center widgets above bottom line 2026-02-04 16:23:55 -08:00
5d1b538579 Remove legacy XKB config 2026-02-04 16:12:20 -08:00
6d9cddbaeb nixos: split SNI tray services from xmonad 2026-02-04 16:12:20 -08:00
dfbd444649 nix-darwin: add claude-code and codex via dedicated flakes
Add flake inputs for codex-cli-nix and claude-code-nix with cachix
caching for pre-built binaries, matching the NixOS setup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:09:52 -08:00
e5b77ae168 railbird-sf: enable k3s-single-node module
Switch from the multi-node railbird-k3s agent setup to the new
single-node k3s module with integrated GPU/CDI support.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:57:02 -08:00
c307821b8d Add k3s-single-node module with GPU/CDI support
Provides a NixOS module for running a single-node k3s cluster with
NVIDIA GPU support via CDI (Container Device Interface). Includes
automatic deployment of the generic-cdi-plugin DaemonSet for GPU
resource allocation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:57:02 -08:00
d68a27bf88 Use custom waybar fork 2026-02-04 14:56:27 -08:00
47786404a2 keyd: add MoErgo hyper mapping 2026-02-04 13:20:34 -08:00
03d86c452a docs: note nixos flake + just switch 2026-02-04 13:15:15 -08:00
119 changed files with 5105 additions and 6500 deletions

3
.gitignore vendored
View File

@@ -21,6 +21,8 @@
gotools
/dotfiles/config/xmonad/result
/dotfiles/config/taffybar/result
/nix-darwin/result
/nixos/result
/dotfiles/emacs.d/*.sqlite
/dotfiles/config/gtk-3.0/colors.css
/dotfiles/config/gtk-3.0/settings.ini
@@ -38,6 +40,7 @@ gotools
/dotfiles/config/xmonad/dist-newstyle/
/dotfiles/config/hypr/hyprscratch.conf
/.worktrees/
/result
# Secrets and machine-local state (managed via agenix/pass instead of git)
/dotfiles/config/asciinema/config

View File

@@ -0,0 +1,218 @@
# Hyprland Lua Migration Checklist
This checklist tracks the migration described in `docs/tiling-wm-experience.md`.
Guiding rule for shelling out:
- Prefer Lua for compositor/window/workspace state changes.
- Avoid `hyprctl` for window manipulation unless there is no usable Lua API.
- `hyprctl` remains acceptable for non-window-control escape hatches such as
`hyprctl reload`.
- External utilities remain acceptable where they are the real tool being
launched, for example rofi, cliphist, grim/slurp/swappy, playerctl, hyprlock,
and systemd commands.
## 0. Version And Build Base
- [x] Update/confirm Hyprland Lua input at latest usable upstream target.
- [x] Keep stable Hyprland path intact until Lua path is proven.
- [x] Keep hy3 out of the Lua branch.
- [x] Keep hyprNStack following the Lua Hyprland input.
- [x] Rebuild hyprNStack against the Lua Hyprland branch.
- [x] Add a forked hyprexpo input for the Lua Hyprland branch.
- [x] Keep a cheap Lua check: parse config, execute against stub, reject
`hyprctl` in the Lua config's window/workspace manipulation path.
- [x] Add a real Hyprland Lua verifier check for the config parser path.
Current upstream note: latest Hyprland release observed during this migration is
`v0.54.3`; the Lua config input tracks PR 13817 and was already at the current
PR head `c35a8a5` dated 2026-04-26. The non-Lua fallback remains pinned to the older
hy3/hyprexpo-compatible stack; the Lua branch uses forked hyprexpo branch
`colonelpanic8/hyprland-plugins:hyprexpo-lua-hyprland`.
## 1. Core Layout
- [x] Primary layout is equal-width columns.
- [x] No scrolling layout.
- [x] No hy3 in Lua path.
- [x] Dynamic redistribution on open/close via Lua-managed nStack count.
- [x] Monocle/tabbed-style layout available.
- [x] Direct jump to columns layout.
- [x] Direct jump to monocle layout.
- [x] Directional focus cycles in monocle.
- [x] Visual indication of hidden monocle windows, currently notification.
- [x] Make layout state per workspace instead of one global current layout.
- [x] Preserve one-window smart gaps in the live config path.
- [x] Use a persistent monocle indicator instead of a transient notification.
Smart-gaps note: nStack uses `no_gaps_when_only = true`; Hyprland workspace
rules are still applied at runtime for broader parity, but skipped during
`--verify-config` because the current Lua PR segfaults when rule bindings run in
verifier mode.
## 2. Workspace Behavior
- [x] `Super+1..9` focuses bounded workspaces.
- [x] `Super+Shift+1..9` sends window without following.
- [x] `Super+Ctrl+1..9` sends and follows.
- [x] Previous workspace per monitor uses Lua-tracked history.
- [x] Implement next empty workspace focus in Lua.
- [x] Implement move focused window to next empty workspace without following.
- [x] Implement move focused window to next empty workspace and follow.
- [x] Implement bounded workspace cycling `1..9` in Lua, replacing
`workspace-scroll.sh`.
- [x] Implement workspace swap or decide whether native dispatcher is enough.
- [x] Track current monitor workspace history explicitly, with native
`previous_per_monitor` as fallback.
## 3. Directional Navigation
- [x] `Super+w/a/s/d` focuses windows.
- [x] `Super+Shift+w/a/s/d` swaps windows.
- [x] `Hyper+w/a/s/d` focuses monitors.
- [x] `Hyper+Shift+w/a/s/d` moves windows to monitors.
- [x] `Super+z` next monitor.
- [x] `Super+Shift+z` move to next monitor.
- [x] Replace any old cursor-follow/move scripts fully.
- [x] Add required `Super+Ctrl+w/a/s/d` move-to-monitor behavior preserving
useful focus.
- [x] Add "move to empty workspace on monitor in direction" without requiring
`Hyper+Ctrl`.
- [x] Route directional focus in monocle through deterministic Lua cycling.
- [ ] Live-verify directional focus in monocle behaves predictably.
## 4. Script Elimination Priority
- [x] Core layout switching no longer uses scripts.
- [x] Core column count logic no longer uses scripts or `hyprctl`.
- [x] Replace `find-empty-workspace.sh`.
- [x] Replace `workspace-goto-empty.sh`.
- [x] Replace `workspace-move-to-empty.sh`.
- [x] Replace `workspace-scroll.sh`.
- [x] Replace `cycle-layout.sh`.
- [x] Replace `movewindow-follow-cursor.sh`.
- [x] Replace `gather-class.sh`.
- [x] Replace `focus-next-class.sh`.
- [x] Replace `raise-or-run.sh`.
- [x] Replace minimize scripts if Lua can maintain hidden workspace state.
- [x] Replace `swap-workspaces.sh`.
- [x] Decide whether rofi-backed pickers remain scripts or become
Lua-generated command pipes. Rofi itself remains external.
## 5. Overview And Window Discovery
- [x] Restore visual hyprexpo for `Super+Tab` overview.
- [x] Restore visual hyprexpo `bring` mode for `Super+Shift+Tab`.
- [x] Keep first-pass Lua numbered window picker on secondary bindings.
- [x] Implement first-pass Lua-native go-to-window picker.
- [x] Implement first-pass Lua-native bring-window picker.
- [x] Implement first-pass Lua-native replace-window picker.
- [ ] Picker entries include icons.
- [x] Picker entries include title/workspace.
- [x] Hide scratchpad/minimized/internal windows from normal pickers.
- [x] Decide whether picker data generation can be Lua-native with rofi as only
external process.
Picker decision: current Lua API can query and manipulate windows directly, but
does not expose a synchronous way to run rofi and consume its selected output.
The first pass therefore uses Lua-native numbered submaps and notifications.
A final rofi/icon picker would need either a small IPC bridge or an upstream Lua
process-output/callback primitive.
Hyprexpo decision: hyprexpo is kept as the visual overview. The forked Lua
branch exposes `hl.plugin.hyprexpo.expo(...)`, so the Lua config can invoke
`toggle` and `bring` directly without shelling out to `hyprctl`.
## 6. Scratchpads
- [x] Preserve named scratchpads: element, gmail, htop, messages, slack,
spotify, transmission, volume.
- [x] Preserve dropdown terminal scratchpad.
- [x] Scratchpads near-fullscreen and centered.
- [x] Scratchpads hidden from normal listings/status bar.
- [x] Toggling scratchpad exits fullscreen/monocle state first.
- [x] Decide hyprscratch daemon is not needed in the Lua branch.
- [x] Replace `hyprscratch toggle` with Lua-managed scratchpad toggles.
- [x] Disable hyprscratch service on the Lua branch.
- [x] Handle delayed class/title assignment with window class/title event adoption.
- [x] Handle already-running app.
- [x] Handle minimized app.
- [x] Handle app on another workspace.
## 7. Minimization
- [x] Implement minimize active window.
- [x] Implement restore last minimized window.
- [x] Exclude minimized windows from layout.
- [x] Exclude minimized windows from normal go/bring lists.
- [x] Implement minimized picker.
- [x] Implement restore all minimized.
- [x] Implement minimize other windows of current workspace class.
- [x] Implement restore windows of focused class.
- [x] Decide hidden workspace naming/state model for minimized windows.
- [x] Hydrate minimized-window state from the hidden workspace on restore/picker
paths.
## 8. Class-Aware Workflows
- [x] Gather all windows of focused class onto current workspace.
- [x] Focus next window of different/same class as desired parity.
- [x] Browser raise-or-spawn.
- [x] Window info command exposes class/title/workspace/address/pid.
- [ ] Window menus expose real window icons.
- [x] Prefer Lua window queries over `hyprctl clients`.
## 9. Status Bar Contract
- [ ] Confirm taffybar can still list normal workspaces.
- [ ] Confirm special scratchpad/minimize workspaces are filtered.
- [ ] Confirm active workspace per monitor remains visible.
- [ ] Confirm class/title/active/minimized/urgent metadata is available.
- [x] Expose layout name/state if practical.
- [ ] Confirm workspace/window positioning remains enough for icon strips.
Layout state note: Lua writes `$XDG_RUNTIME_DIR/hyprland-layout-state` with the
active workspace, active layout, and per-workspace layout map. Taffybar still
needs a live readback check.
## 10. Session And Utilities
- [x] Terminal binding preserved.
- [x] Launcher/run menu preserved.
- [x] Media keys preserved.
- [x] Clipboard history binding preserved.
- [x] Screenshot binding preserved.
- [x] Lock binding preserved.
- [x] Session startup target integration preserved.
- [x] `hyprctl reload` may remain available as a non-window-manipulation escape
hatch.
- [x] Resolve `Hyper+w` conflict: monitor focus must win; wallpaper picker
needs another key.
- [x] Keep rofi utility commands as external commands unless there is a
meaningful Lua replacement.
- [x] Decide which shell utilities are acceptable because they are not Hyprland
control scripts.
## 11. Validation
- [x] Lua syntax check.
- [x] Lua stub execution check.
- [x] `hyprctl` rejection in Lua config for window/workspace manipulation.
- [x] Real `Hyprland --verify-config` check.
- [x] hyprNStack flake build check.
- [x] hyprexpo Lua-branch flake build check.
- [x] `ryzen-shine` system dry-run.
- [x] `just switch` activates successfully and deploys branch-owned
`~/.config/hypr/hyprland.lua`.
- [x] Re-run checks after Hyprland/Lua input confirmation.
- [ ] Try live compositor smoke test again after version bump.
- [x] Document `--verify-config` caveats for Lua rule/plugin-specific config.
- [x] Eventually run `just switch` only when the branch is coherent enough for a
live test.
Live-smoke note: this Hyprland binary exposes `--verify-config` but no
`--headless` CLI flag. `just switch` now installs the Lua branch binary and
deploys `hyprland.lua`, but the currently running compositor remains the old
0.53 process until the Hyprland session is restarted. A true compositor smoke
test still needs a session restart or a nested Wayland session that avoids
startup side effects.

View File

@@ -0,0 +1,368 @@
# Tiling WM Experience Spec
This document describes the tiling window manager experience I am targeting.
## Priority Levels
- Required: daily-driver behavior.
- Important: expected for parity, but a rough first version is acceptable.
- Nice: useful polish or compatibility.
## Modifier Terminology
- `Super` names the physical modifier key often labeled Windows, Command, GUI,
or OS depending on the keyboard.
- `Hyper` means a higher-order logical modifier layer used for monitor,
workspace, utility, and cross-context operations.
- Prefer implementing `Hyper` as its own virtual modifier or equivalent logical
mask when the environment supports that.
- If a dedicated virtual `Hyper` mask is not practical, `Ctrl+Alt+Super` is the
fallback chord.
- The fallback `Hyper` chord intentionally does not include `Shift`; portable
`Hyper` bindings only use the plain `Hyper` layer and the `Hyper+Shift`
layer.
- Do not require `Hyper+Ctrl`, `Hyper+Alt`, or `Hyper+Super` bindings. Those
modifiers may already be part of the fallback `Hyper` chord.
- Binding descriptions should use `Super` and `Hyper` rather than
hardware-vendor names.
## Workspaces and Monitors
Required behavior:
- Workspaces are a shared global set, not independent per-monitor namespaces.
- Focusing workspace `N` shows workspace `N` on the currently focused monitor.
- Moving a window to workspace `N` does not require caring which monitor
currently owns that workspace.
- Sending the focused window to workspace `N` without following it is a
first-class operation.
- Moving the focused window to workspace `N` and following it is a first-class
operation.
- Sending the focused window to the next empty workspace without following it is
a first-class operation.
- Moving the focused window to the next empty workspace and following it is a
first-class operation.
- Normal workspaces are bounded to `1..9`.
- Workspace history is tracked per monitor.
- Last-workspace toggle uses the current monitor's workspace history.
- Workspace cycling works on the current monitor within the bounded workspace
set.
Important behavior:
- Swapping the current workspace contents with another workspace is available.
- Moving a window to an empty workspace on another monitor is available.
- Moving the focused window to another monitor without following keeps keyboard
focus on the original monitor.
- Moving the focused window to another monitor and following it moves keyboard
focus to the destination monitor.
- Hidden/special workspaces exist for scratchpad state.
- Hidden/special workspaces exist for minimized state.
- Hidden/special workspaces are excluded from ordinary workspace cycling.
- Hidden/special workspaces are excluded from the status bar's normal workspace
list.
## Directional Navigation
Required behavior:
- Directional window focus is available.
- Directional window swapping or movement is available.
- Directional move-to-monitor is available while preserving useful focus.
- Directional monitor focus is available.
- Directional window movement between monitors is available.
- Moving the focused window to an empty workspace on the monitor in a direction
remains required behavior, but it should not require an extra `Hyper`
modifier beyond `Shift`.
- `Super+w/a/s/d` focuses windows directionally.
- `Super+Shift+w/a/s/d` swaps or moves the focused window directionally.
- `Super+Ctrl+w/a/s/d` moves the focused window to the monitor in that
direction while preserving useful focus.
- `Super+Ctrl+Shift+w/a/s/d` moves the focused window to an empty workspace on
the monitor in that direction.
- `Hyper+w/a/s/d` focuses monitors directionally.
- `Hyper+Shift+w/a/s/d` swaps or moves windows between monitors directionally.
- Directional focus in tabbed/fullscreen mode should cycle predictably through
windows even though their screen geometry overlaps.
Important behavior:
- Keyboard resize remains available, but it should not displace the directional
move-to-monitor binding.
## Layouts
Required behavior:
- Tiling is dynamic.
- Primary layout is equal-width vertical columns.
- Scrolling layouts are not acceptable.
- All ordinary splits are vertical.
- Adding windows dynamically redistributes all tiled windows evenly.
- Removing windows dynamically redistributes all tiled windows evenly.
- Ordinary use should not require manually managing a split tree.
- Tabbed/fullscreen-style monocle layout is available.
- Directional window navigation bindings continue to switch windows in
tabbed/fullscreen mode.
- The important layouts are columns and tabbed/fullscreen.
- Dialogs float.
- Dialogs are centered.
- There is a command to jump directly to the columns layout and one to jump
directly to the tabbed/fullscreen layout.
- Layout state is per workspace when the compositor supports it.
Important behavior:
- One-window workspaces should have no visible gaps or use smart gaps.
Nice behavior:
- Gaps can be toggled.
- Fullscreen can be toggled.
- Smart borders can be toggled.
- Layout-related modifiers remain available for experiments.
- Inactive windows are slightly dimmed when supported.
## Overview and Discovery
Required behavior:
- There is an expose-style way to inspect open windows or workspaces before
jumping.
- There is a rofi-style window picker.
- Window picker entries show icons.
- Window picker entries show titles.
- Window picker entries show workspace labels.
- Go-to-window focuses the selected window wherever it currently lives.
- Bring-window moves a selected non-visible window to the current workspace and
focuses it.
- Replace-window swaps the focused window with a selected window where feasible.
Important behavior:
- Overview supports both "go" and "bring" workflows.
- Window switchers hide scratchpad windows unless the user is explicitly using a
scratchpad picker.
- Window switchers hide minimized windows unless the user is explicitly using a
minimized picker.
- Window switchers hide internal windows.
- Go/bring actions unminimize selected windows when needed.
## Scratchpads
Required behavior:
- A named scratchpad exists for element.
- A named scratchpad exists for gmail.
- A named scratchpad exists for htop.
- A named scratchpad exists for messages.
- A named scratchpad exists for slack.
- A named scratchpad exists for spotify.
- A named scratchpad exists for transmission.
- A named scratchpad exists for volume.
- Scratchpads appear near-fullscreen and centered by default.
- Toggling a scratchpad deactivates fullscreen/tabbed state first.
- Scratchpads are hidden from normal workspace and window listings.
Important behavior:
- A dropdown terminal scratchpad exists.
- Scratchpad matching handles delayed class/title assignment.
- Scratchpad behavior is robust when the app is already running.
- Scratchpad behavior is robust when the app is minimized.
- Scratchpad behavior is robust when the app is on another workspace.
## Minimization
Required behavior:
- Focused window can be minimized.
- Last minimized window can be restored to the current workspace and focused.
- Minimized windows are excluded from normal layout.
- Minimized windows are excluded from ordinary go/bring lists.
Important behavior:
- A minimized picker mode exists.
- Restore-all-minimized exists.
- Other classes in the current workspace can be minimized.
- Windows of the focused class can be restored.
- All minimized windows can be restored.
## Class-Aware Workflows
Important behavior:
- Gather all windows of the focused class onto the current workspace.
- Raise-or-spawn exists for the browser.
- Window menus show class.
- Window menus show title.
- Window menus show workspace.
- Window menus show icon.
## Status Bar Contract
Required behavior:
- The status bar can list normal workspaces.
- The status bar can identify the active workspace per monitor.
- The status bar can list windows per workspace.
- The status bar can expose class hints for each listed window.
- The status bar can expose title for each listed window.
- The status bar can expose active state for each listed window.
- The status bar can expose minimized state when available.
- The status bar can expose urgency when available.
- The status bar can expose approximate window position when available.
- Scratchpad workspaces are marked as special or filtered out.
- Minimized workspaces are marked as special or filtered out.
- Internal workspaces are marked as special or filtered out.
Important behavior:
- Workspace labels are stable.
- Workspace icons are stable.
- Window positioning information is available enough for workspace icon strips
and future expose-like views.
- Layout information is available enough for workspace icon strips and future
expose-like views.
- Layout name is exposed if practical.
- Layout state is exposed if practical.
## Session and Utility Behavior
Important behavior:
- Terminal is `ghostty --gtk-single-instance=false`.
- Launcher is `rofi -show drun -show-icons`.
- Run menu is `rofi -show run`.
- Browser raise/spawn behavior exists.
- Border width is effectively zero.
- The status bar can be toggled per monitor.
- Session startup integrates with the normal graphical-session target.
- Session startup integrates with any required session-specific user target.
Nice behavior:
- Wallpaper behavior remains consistent.
- Wallpaper selection uses `Hyper+comma`; `Hyper+w/a/s/d` are reserved for
directional monitor focus.
- Idle behavior remains consistent.
- Lock behavior remains consistent.
- Clipboard history behavior remains consistent.
- Screenshot behavior remains consistent.
- Monitor DDC/input switching remains consistent.
- Rofi utility bindings remain consistent.
- Media keys remain consistent.
## Binding Appendix
Required behavior:
- `Hyper` bindings should remain available from a single physical key where
practical, even if that key emits the fallback chord internally.
- Extra modifiers on `Hyper` are limited to `Shift` for portable bindings.
Important behavior:
- `Hyper` utility bindings must not displace required directional monitor
bindings on `Hyper+w/a/s/d`.
### Core Bindings
Required behavior:
- `Super+p` opens the application launcher.
- `Super+Shift+p` opens the run menu.
- `Super+Shift+Return` opens a terminal.
- `Super+Tab` opens the overview.
- `Super+Shift+Tab` opens the overview in bring-window mode when supported.
- `Super+g` opens the go-to-window picker.
- `Super+b` opens the bring-window picker.
- `Super+Shift+b` opens the replace-window picker.
- `Super+\` toggles to the previous workspace on the current monitor.
- `Super+Shift+e` moves the focused window to the next empty workspace and
follows it. This is the target replacement for the older `Super+Shift+h`
binding.
- `Hyper+e` focuses the next empty workspace.
- `Hyper+5` swaps the current workspace with a selected workspace.
- `Hyper+g` gathers windows of the focused class onto the current workspace.
### Directional Navigation Bindings
Required behavior:
- `Super+w/a/s/d` focuses windows directionally.
- `Super+Shift+w/a/s/d` swaps or moves the focused window directionally.
- `Super+Ctrl+w/a/s/d` moves the focused window to the monitor in that
direction while preserving useful focus.
- `Hyper+w/a/s/d` focuses monitors directionally.
- `Hyper+Shift+w/a/s/d` swaps or moves windows between monitors directionally.
- Moving the focused window to an empty workspace on the monitor in a direction
remains required behavior, but it should not require a `Hyper+Ctrl` binding.
- `Super+z` focuses the next monitor.
- `Super+Shift+z` moves the focused window to the next monitor.
### Numbered Workspace Bindings
Required behavior:
- `Super+1..9` focuses workspace `1..9` on the current monitor.
- `Super+Shift+1..9` sends the focused window to workspace `1..9` without
following it.
- `Super+Ctrl+1..9` sends the focused window to workspace `1..9` and follows
it.
### Scratchpad Bindings
Required behavior:
- `Super+Alt+e` toggles the element scratchpad.
- `Super+Alt+g` toggles the gmail scratchpad.
- `Super+Alt+h` toggles the htop scratchpad.
- `Super+Alt+m` toggles the messages scratchpad.
- `Super+Alt+k` toggles the slack scratchpad.
- `Super+Alt+s` toggles the spotify scratchpad.
- `Super+Alt+t` toggles the transmission scratchpad.
- `Super+Alt+v` toggles the volume scratchpad.
Important behavior:
- `Super+Alt+grave` toggles the dropdown terminal scratchpad.
- `Super+Alt+c` raises or starts the browser.
- `Super+Alt+Return` enters the minimized-window picker or restores minimized
windows, depending on environment support.
- `Super+Alt` is reserved for app-specific raise/spawn, scratchpad, and
scratchpad-adjacent bindings.
### Utility Bindings
Required behavior:
- `Hyper+v` opens clipboard history with a rofi-backed clipboard command
such as `greenclip print` or `cliphist`.
- `Hyper+p` opens the password picker with `rofi-pass`.
- `Hyper+h` opens the screenshot tool with the compositor/session-appropriate
screenshot command.
- `Hyper+c` opens a shell command prompt with `shell_command.sh`.
- `Hyper+x` opens the command picker with `rofi_command.sh`.
- `Hyper+k` opens the process killer with `rofi_kill_process.sh`.
- `Hyper+Shift+k` opens the kill-all/process-tree killer with
`rofi_kill_all.sh`.
- `Hyper+r` opens the systemd/service menu with `rofi-systemd`.
- `Hyper+slash` toggles the status bar with the status-bar-appropriate command.
- `Hyper+backslash` toggles the monitor input with `mpg341cx_input toggle`.
- `Hyper+i` opens the audio input selector with `rofi_select_input.hs`.
- `Hyper+o` opens the audio output selector with `rofi_paswitch`.
- `Hyper+y` opens the agentic skill picker with `rofi_agentic_skill`.
- `Hyper+Shift+l` locks the session with the compositor/session-appropriate
locker.
Important behavior:
- Wallpaper selection is available under `Hyper` via `rofi_wallpaper.sh`, but
its exact key must avoid the required `Hyper+w/a/s/d` directional monitor
bindings.
- Expose-style overview remains available as a utility binding using the
compositor-appropriate implementation.
- Session-destructive operations use shifted or otherwise harder-to-hit
variants.

View File

@@ -1,8 +1,8 @@
# Agentic Session Preferences
## Tmux session titling
- Treat this chat as the controller for the current tmux session.
- Run the tmux rename one-liner eagerly without checking whether TMUX is set first.
## Multiplexer session titling
- If the `TMUX` or `ZELLIJ` environment variable is set, treat this chat as the controller for the current tmux or zellij session.
- Use `set_multiplexer_title '<project> - <task>'` to update the title. The command detects tmux vs. zellij internally, prefers tmux when both are present, and no-ops outside a multiplexer.
- Maintain a session/window/pane title that updates when the task focus changes substantially.
- Prefer automatic titling: infer a concise <task> from the current user request and context without asking.
- Title format: "<project> - <task>".
@@ -11,11 +11,7 @@
- <task> is a short, user-friendly description of what we are doing.
- Ask for a short descriptive <task> only when the task is ambiguous or you are not confident in an inferred title.
- When the task changes substantially, update the <task> automatically if clear; otherwise ask for an updated <task>.
- When a title is provided or updated, immediately run this one-liner:
tmux rename-session '<project> - <task>' \; rename-window '<project> - <task>' \; select-pane -T '<project> - <task>'
- Assume you are inside tmux, so do not use -t unless the user asks to target a specific session.
- When a title is provided or updated, immediately run `set_multiplexer_title '<project> - <task>'`; do not call raw tmux or zellij rename commands unless debugging the helper itself.
- For Claude Code sessions, a UserPromptSubmit hook will also update titles automatically based on the latest prompt.
## Pane usage

View File

@@ -1,25 +1,25 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ -z "${TMUX:-}" ]]; then
exit 0
fi
input=$(cat)
read -r cwd prompt <<'PY' < <(python3 - <<'PY'
mapfile -d '' -t parsed < <(PAYLOAD="$input" python3 - <<'PY'
import json, os, sys
try:
data = json.load(sys.stdin)
data = json.loads(os.environ.get("PAYLOAD", ""))
except Exception:
data = {}
cwd = data.get("cwd") or os.getcwd()
prompt = (data.get("prompt") or "").strip()
print(cwd)
print(prompt)
sys.stdout.write(cwd)
sys.stdout.write("\0")
sys.stdout.write(prompt)
sys.stdout.write("\0")
PY
)
cwd="${parsed[0]:-}"
prompt="${parsed[1]:-}"
if [[ -z "${cwd}" ]]; then
cwd="$PWD"
@@ -46,25 +46,16 @@ if [[ -z "$task" ]]; then
task="work"
fi
# Trim to a reasonable length for tmux status bars.
# Trim to a reasonable length for multiplexer UI labels.
if [[ ${#task} -gt 60 ]]; then
task="${task:0:57}..."
fi
title="$project - $task"
state_dir="${HOME}/.agents/state"
state_file="$state_dir/tmux-title"
mkdir -p "$state_dir"
if [[ -f "$state_file" ]]; then
last_title=$(cat "$state_file" 2>/dev/null || true)
if [[ "$last_title" == "$title" ]]; then
exit 0
fi
if command -v set_multiplexer_title >/dev/null 2>&1; then
set_multiplexer_title "$title"
else
hook_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
"$hook_dir/../../lib/functions/set_multiplexer_title" "$title"
fi
printf '%s' "$title" > "$state_file"
# Update session, window, and pane titles.
tmux rename-session "$title" \; rename-window "$title" \; select-pane -T "$title"

2
dotfiles/agents/skills/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.system/
codex-primary-runtime/

View File

@@ -1 +0,0 @@
79bd4e36950d6270

View File

@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf of
any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don\'t include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,279 +0,0 @@
---
name: "imagegen"
description: "Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas."
---
# Image Generation Skill
Generates or edits images for the current project (for example website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, or infographics).
## Top-level modes and rules
This skill has exactly two top-level modes:
- **Default built-in tool mode (preferred):** built-in `image_gen` tool for normal image generation and editing. Does not require `OPENAI_API_KEY`.
- **Fallback CLI mode (explicit-only):** `scripts/image_gen.py` CLI. Use only when the user explicitly asks for the CLI path. Requires `OPENAI_API_KEY`.
Within the explicit CLI fallback only, the CLI exposes three subcommands:
- `generate`
- `edit`
- `generate-batch`
Rules:
- Use the built-in `image_gen` tool by default for all normal image generation and editing requests.
- Never switch to CLI fallback automatically.
- If the built-in tool fails or is unavailable, tell the user the CLI fallback exists and that it requires `OPENAI_API_KEY`. Proceed only if the user explicitly asks for that fallback.
- If the user explicitly asks for CLI mode, use the bundled `scripts/image_gen.py` workflow. Do not create one-off SDK runners.
- Never modify `scripts/image_gen.py`. If something is missing, ask the user before doing anything else.
Built-in save-path policy:
- In built-in tool mode, Codex saves generated images under `$CODEX_HOME/*` by default.
- Do not describe or rely on OS temp as the default built-in destination.
- Do not describe or rely on a destination-path argument (if any) on the built-in `image_gen` tool. If a specific location is needed, generate first and then move or copy the selected output from `$CODEX_HOME/generated_images/...`.
- Save-path precedence in built-in mode:
1. If the user names a destination, move or copy the selected output there.
2. If the image is meant for the current project, move or copy the final selected image into the workspace before finishing.
3. If the image is only for preview or brainstorming, render it inline; the underlying file can remain at the default `$CODEX_HOME/*` path.
- Never leave a project-referenced asset only at the default `$CODEX_HOME/*` path.
- Do not overwrite an existing asset unless the user explicitly asked for replacement; otherwise create a sibling versioned filename such as `hero-v2.png` or `item-icon-edited.png`.
Shared prompt guidance for both modes lives in `references/prompting.md` and `references/sample-prompts.md`.
Fallback-only docs/resources for CLI mode:
- `references/cli.md`
- `references/image-api.md`
- `references/codex-network.md`
- `scripts/image_gen.py`
## When to use
- Generate a new image (concept art, product shot, cover, website hero)
- Generate a new image using one or more reference images for style, composition, or mood
- Edit an existing image (inpainting, lighting or weather transformations, background replacement, object removal, compositing, transparent background)
- Produce many assets or variants for one task
## When not to use
- Extending or matching an existing SVG/vector icon set, logo system, or illustration library inside the repo
- Creating simple shapes, diagrams, wireframes, or icons that are better produced directly in SVG, HTML/CSS, or canvas
- Making a small project-local asset edit when the source file already exists in an editable native format
- Any task where the user clearly wants deterministic code-native output instead of a generated bitmap
## Decision tree
Think about two separate questions:
1. **Intent:** is this a new image or an edit of an existing image?
2. **Execution strategy:** is this one asset or many assets/variants?
Intent:
- If the user wants to modify an existing image while preserving parts of it, treat the request as **edit**.
- If the user provides images only as references for style, composition, mood, or subject guidance, treat the request as **generate**.
- If the user provides no images, treat the request as **generate**.
Built-in edit semantics:
- Built-in edit mode is for images already visible in the conversation context, such as attached images or images generated earlier in the thread.
- If the user wants to edit a local image file with the built-in tool, first load it with built-in `view_image` tool so the image is visible in the conversation context, then proceed with the built-in edit flow.
- Do not promise arbitrary filesystem-path editing through the built-in tool.
- If a local file still needs direct file-path control, masks, or other explicit CLI-only parameters, use the explicit CLI fallback only when the user asks for it.
- For edits, preserve invariants aggressively and save non-destructively by default.
Execution strategy:
- In the built-in default path, produce many assets or variants by issuing one `image_gen` call per requested asset or variant.
- In the explicit CLI fallback path, use the CLI `generate-batch` subcommand only when the user explicitly chose CLI mode and needs many prompts/assets.
Assume the user wants a new image unless they clearly ask to change an existing one.
## Workflow
1. Decide the top-level mode: built-in by default, fallback CLI only if explicitly requested.
2. Decide the intent: `generate` or `edit`.
3. Decide whether the output is preview-only or meant to be consumed by the current project.
4. Decide the execution strategy: single asset vs repeated built-in calls vs CLI `generate-batch`.
5. Collect inputs up front: prompt(s), exact text (verbatim), constraints/avoid list, and any input images.
6. For every input image, label its role explicitly:
- reference image
- edit target
- supporting insert/style/compositing input
7. If the edit target is only on the local filesystem and you are staying on the built-in path, inspect it with `view_image` first so the image is available in conversation context.
8. If the user asked for a photo, illustration, sprite, product image, banner, or other explicitly raster-style asset, use `image_gen` rather than substituting SVG/HTML/CSS placeholders. If the request is for an icon, logo, or UI graphic that should match existing repo-native SVG/vector/code assets, prefer editing those directly instead.
9. Augment the prompt based on specificity:
- If the user's prompt is already specific and detailed, normalize it into a clear spec without adding creative requirements.
- If the user's prompt is generic, add tasteful augmentation only when it materially improves output quality.
10. Use the built-in `image_gen` tool by default.
11. If the user explicitly chooses the CLI fallback, then and only then use the fallback-only docs for quality, `input_fidelity`, masks, output format, output paths, and network setup.
12. Inspect outputs and validate: subject, style, composition, text accuracy, and invariants/avoid items.
13. Iterate with a single targeted change, then re-check.
14. For preview-only work, render the image inline; the underlying file may remain at the default `$CODEX_HOME/generated_images/...` path.
15. For project-bound work, move or copy the selected artifact into the workspace and update any consuming code or references. Never leave a project-referenced asset only at the default `$CODEX_HOME/generated_images/...` path.
16. For batches, persist only the selected finals in the workspace unless the user explicitly asked to keep discarded variants.
17. Always report the final saved path for any workspace-bound asset, plus the final prompt and whether the built-in tool or fallback CLI mode was used.
## Prompt augmentation
Reformat user prompts into a structured, production-oriented spec. Make the user's goal clearer and more actionable, but do not blindly add detail.
Treat this as prompt-shaping guidance, not a closed schema. Use only the lines that help, and add a short extra labeled line when it materially improves clarity.
### Specificity policy
Use the user's prompt specificity to decide how much augmentation is appropriate:
- If the prompt is already specific and detailed, preserve that specificity and only normalize/structure it.
- If the prompt is generic, you may add tasteful augmentation when it will materially improve the result.
Allowed augmentations:
- composition or framing hints
- polish level or intended-use hints
- practical layout guidance
- reasonable scene concreteness that supports the stated request
Not allowed augmentations:
- extra characters or objects that are not implied by the request
- brand names, slogans, palettes, or narrative beats that are not implied
- arbitrary side-specific placement unless the surrounding layout supports it
## Use-case taxonomy (exact slugs)
Classify each request into one of these buckets and keep the slug consistent across prompts and references.
Generate:
- photorealistic-natural — candid/editorial lifestyle scenes with real texture and natural lighting.
- product-mockup — product/packaging shots, catalog imagery, merch concepts.
- ui-mockup — app/web interface mockups and wireframes; specify the desired fidelity.
- infographic-diagram — diagrams/infographics with structured layout and text.
- logo-brand — logo/mark exploration, vector-friendly.
- illustration-story — comics, childrens book art, narrative scenes.
- stylized-concept — style-driven concept art, 3D/stylized renders.
- historical-scene — period-accurate/world-knowledge scenes.
Edit:
- text-localization — translate/replace in-image text, preserve layout.
- identity-preserve — try-on, person-in-scene; lock face/body/pose.
- precise-object-edit — remove/replace a specific element (including interior swaps).
- lighting-weather — time-of-day/season/atmosphere changes only.
- background-extraction — transparent background / clean cutout.
- style-transfer — apply reference style while changing subject/scene.
- compositing — multi-image insert/merge with matched lighting/perspective.
- sketch-to-render — drawing/line art to photoreal render.
## Shared prompt schema
Use the following labeled spec as shared prompt scaffolding for both top-level modes:
```text
Use case: <taxonomy slug>
Asset type: <where the asset will be used>
Primary request: <user's main prompt>
Input images: <Image 1: role; Image 2: role> (optional)
Scene/backdrop: <environment>
Subject: <main subject>
Style/medium: <photo/illustration/3D/etc>
Composition/framing: <wide/close/top-down; placement>
Lighting/mood: <lighting + mood>
Color palette: <palette notes>
Materials/textures: <surface details>
Text (verbatim): "<exact text>"
Constraints: <must keep/must avoid>
Avoid: <negative constraints>
```
Notes:
- `Asset type` and `Input images` are prompt scaffolding, not dedicated CLI flags.
- `Scene/backdrop` refers to the visual setting. It is not the same as the fallback CLI `background` parameter, which controls output transparency behavior.
- Fallback-only execution notes such as `Quality:`, `Input fidelity:`, masks, output format, and output paths belong in the explicit CLI path only. Do not treat them as built-in `image_gen` tool arguments.
Augmentation rules:
- Keep it short.
- Add only the details needed to improve the prompt materially.
- For edits, explicitly list invariants (`change only X; keep Y unchanged`).
- If any critical detail is missing and blocks success, ask a question; otherwise proceed.
## Examples
### Generation example (hero image)
```text
Use case: product-mockup
Asset type: landing page hero
Primary request: a minimal hero image of a ceramic coffee mug
Style/medium: clean product photography
Composition/framing: wide composition with usable negative space for page copy if needed
Lighting/mood: soft studio lighting
Constraints: no logos, no text, no watermark
```
### Edit example (invariants)
```text
Use case: precise-object-edit
Asset type: product photo background replacement
Primary request: replace only the background with a warm sunset gradient
Constraints: change only the background; keep the product and its edges unchanged; no text; no watermark
```
## Prompting best practices
- Structure prompt as scene/backdrop -> subject -> details -> constraints.
- Include intended use (ad, UI mock, infographic) to set the mode and polish level.
- Use camera/composition language for photorealism.
- Only use SVG/vector stand-ins when the user explicitly asked for vector output or a non-image placeholder.
- Quote exact text and specify typography + placement.
- For tricky words, spell them letter-by-letter and require verbatim rendering.
- For multi-image inputs, reference images by index and describe how they should be used.
- For edits, repeat invariants every iteration to reduce drift.
- Iterate with single-change follow-ups.
- If the prompt is generic, add only the extra detail that will materially help.
- If the prompt is already detailed, normalize it instead of expanding it.
- For explicit CLI fallback only, see `references/cli.md` and `references/image-api.md` for `quality`, `input_fidelity`, masks, output format, and output-path guidance.
More principles shared by both modes: `references/prompting.md`.
Copy/paste specs shared by both modes: `references/sample-prompts.md`.
## Guidance by asset type
Asset-type templates (website assets, game assets, wireframes, logo) are consolidated in `references/sample-prompts.md`.
## Fallback CLI mode only
### Temp and output conventions
These conventions apply only to the explicit CLI fallback. They do not describe built-in `image_gen` output behavior.
- Use `tmp/imagegen/` for intermediate files (for example JSONL batches); delete them when done.
- Write final artifacts under `output/imagegen/`.
- Use `--out` or `--out-dir` to control output paths; keep filenames stable and descriptive.
### Dependencies
Prefer `uv` for dependency management in this repo.
Required Python package:
```bash
uv pip install openai
```
Optional for downscaling only:
```bash
uv pip install pillow
```
Portability note:
- If you are using the installed skill outside this repo, install dependencies into that environment with its package manager.
- In uv-managed environments, `uv pip install ...` remains the preferred path.
### Environment
- `OPENAI_API_KEY` must be set for live API calls.
- Do not ask the user for `OPENAI_API_KEY` when using the built-in `image_gen` tool.
- Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.
If the key is missing, give the user these steps:
1. Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys
2. Set `OPENAI_API_KEY` as an environment variable in their system.
3. Offer to guide them through setting the environment variable for their OS/shell if needed.
If installation is not possible in this environment, tell the user which dependency is missing and how to install it into their active environment.
### Script-mode notes
- CLI commands + examples: `references/cli.md`
- API parameter quick reference: `references/image-api.md`
- Network approvals / sandbox settings for CLI mode: `references/codex-network.md`
## Reference map
- `references/prompting.md`: shared prompting principles for both modes.
- `references/sample-prompts.md`: shared copy/paste prompt recipes for both modes.
- `references/cli.md`: fallback-only CLI usage via `scripts/image_gen.py`.
- `references/image-api.md`: fallback-only API/CLI parameter reference.
- `references/codex-network.md`: fallback-only network/sandbox troubleshooting for CLI mode.
- `scripts/image_gen.py`: fallback-only CLI implementation. Do not load or use it unless the user explicitly chooses CLI mode.

View File

@@ -1,6 +0,0 @@
interface:
display_name: "Image Gen"
short_description: "Generate or edit images for websites, games, and more"
icon_small: "./assets/imagegen-small.svg"
icon_large: "./assets/imagegen.png"
default_prompt: "Generate or edit the visual assets for this task with the built-in `image_gen` tool by default. First confirm that the task actually calls for a raster image; if the project already has SVG/vector/code-native assets and the user wants to extend or match those, do not use this skill. If the task includes reference images, treat them as references unless the user clearly wants an existing image modified. For multi-asset requests, loop built-in calls rather than treating batch as a separate top-level mode. Only use the fallback CLI if the user explicitly asks for it, and keep CLI-only controls such as `generate-batch`, `quality`, `input_fidelity`, masks, and output paths on that fallback path."

View File

@@ -1,5 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill="currentColor" d="M7.51 6.827a1 1 0 1 1 .278 1.982 1 1 0 0 1-.278-1.982Z"/>
<path fill="currentColor" fill-rule="evenodd" d="M8.31 4.47c.368-.016.699.008 1.016.124l.186.075c.423.194.786.5 1.047.888l.067.107c.148.253.235.533.3.848.073.354.126.797.193 1.343l.277 2.25.088.745c.024.224.041.425.049.605.013.322-.004.615-.085.896l-.04.12a2.53 2.53 0 0 1-.802 1.115l-.16.118c-.281.189-.596.292-.956.366a9.46 9.46 0 0 1-.6.1l-.743.094-2.25.277c-.547.067-.99.121-1.35.136a2.765 2.765 0 0 1-.896-.085l-.12-.039a2.533 2.533 0 0 1-1.115-.802l-.118-.161c-.189-.28-.292-.596-.366-.956a9.42 9.42 0 0 1-.1-.599l-.094-.744-.276-2.25a17.884 17.884 0 0 1-.137-1.35c-.015-.367.009-.698.124-1.015l.076-.185c.193-.423.5-.787.887-1.048l.107-.067c.253-.148.534-.234.849-.3.354-.073.796-.126 1.343-.193l2.25-.277.744-.088c.224-.024.425-.041.606-.049Zm-2.905 5.978a1.47 1.47 0 0 0-.875.074c-.127.052-.267.146-.475.344-.212.204-.462.484-.822.889l-.314.351c.018.115.036.219.055.313.061.295.127.458.206.575l.07.094c.167.211.39.372.645.465l.109.032c.119.027.273.038.499.029.308-.013.7-.06 1.264-.13l2.25-.275.727-.093.198-.03-2.05-1.64a16.848 16.848 0 0 0-.96-.738c-.18-.121-.31-.19-.421-.23l-.106-.03Zm2.95-4.915c-.154.006-.33.021-.536.043l-.729.086-2.25.276c-.564.07-.956.118-1.257.18a1.937 1.937 0 0 0-.478.15l-.097.057a1.47 1.47 0 0 0-.515.608l-.044.107c-.048.133-.073.307-.06.608.012.307.06.7.129 1.264l.22 1.8.178-.197c.145-.159.278-.298.403-.418.255-.243.507-.437.809-.56l.181-.067a2.526 2.526 0 0 1 1.328-.06l.118.029c.27.079.517.215.772.387.287.194.619.46 1.03.789l2.52 2.016c.146-.148.26-.326.332-.524l.031-.109c.027-.119.039-.273.03-.499a8.311 8.311 0 0 0-.044-.536l-.086-.728-.276-2.25c-.07-.564-.118-.956-.18-1.258a1.935 1.935 0 0 0-.15-.477l-.057-.098a1.468 1.468 0 0 0-.608-.515l-.107-.043c-.133-.049-.306-.074-.607-.061Z" clip-rule="evenodd"/>
<path fill="currentColor" d="M7.783 1.272c.36.014.803.07 1.35.136l2.25.277.743.095c.224.03.423.062.6.099.36.074.675.177.955.366l.161.118c.364.29.642.675.802 1.115l.04.12c.081.28.098.574.085.896a9.42 9.42 0 0 1-.05.605l-.087.745-.277 2.25c-.067.547-.12.989-.193 1.343a2.765 2.765 0 0 1-.3.848l-.067.107a2.534 2.534 0 0 1-.415.474l-.086.064a.532.532 0 0 1-.622-.858l.13-.13c.04-.046.077-.094.111-.145l.057-.098c.055-.109.104-.256.15-.477.062-.302.11-.694.18-1.258l.276-2.25.086-.728c.022-.207.037-.382.043-.536.01-.226-.002-.38-.029-.5l-.032-.108a1.469 1.469 0 0 0-.464-.646l-.094-.069c-.118-.08-.28-.145-.575-.206a8.285 8.285 0 0 0-.53-.088l-.728-.092-2.25-.276c-.565-.07-.956-.117-1.264-.13a1.94 1.94 0 0 0-.5.029l-.108.032a1.469 1.469 0 0 0-.647.465l-.068.094c-.054.08-.102.18-.146.33l-.04.1a.533.533 0 0 1-.98-.403l.055-.166c.059-.162.133-.314.23-.457l.117-.16c.29-.365.675-.643 1.115-.803l.12-.04c.28-.08.574-.097.896-.084Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,160 +0,0 @@
# CLI reference (`scripts/image_gen.py`)
This file is for the fallback CLI mode only. Read it only after the user explicitly asks to use `scripts/image_gen.py` instead of the built-in `image_gen` tool.
`generate-batch` is a CLI subcommand in this fallback path. It is not a top-level mode of the skill.
## What this CLI does
- `generate`: generate a new image from a prompt
- `edit`: edit one or more existing images
- `generate-batch`: run many generation jobs from a JSONL file
Real API calls require **network access** + `OPENAI_API_KEY`. `--dry-run` does not.
## Quick start (works from any repo)
Set a stable path to the skill CLI (default `CODEX_HOME` is `~/.codex`):
```
export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export IMAGE_GEN="$CODEX_HOME/skills/imagegen/scripts/image_gen.py"
```
Install dependencies into that environment with its package manager. In uv-managed environments, `uv pip install ...` remains the preferred path.
## Quick start
Dry-run (no API call; no network required; does not require the `openai` package):
```bash
python "$IMAGE_GEN" generate \
--prompt "Test" \
--out output/imagegen/test.png \
--dry-run
```
Notes:
- One-off dry-runs print the API payload and the computed output path(s).
- Repo-local finals should live under `output/imagegen/`.
Generate (requires `OPENAI_API_KEY` + network):
```bash
python "$IMAGE_GEN" generate \
--prompt "A cozy alpine cabin at dawn" \
--size 1024x1024 \
--out output/imagegen/alpine-cabin.png
```
Edit:
```bash
python "$IMAGE_GEN" edit \
--image input.png \
--prompt "Replace only the background with a warm sunset" \
--out output/imagegen/sunset-edit.png
```
## Guardrails
- Use the bundled CLI directly (`python "$IMAGE_GEN" ...`) after activating the correct environment.
- Do **not** create one-off runners (for example `gen_images.py`) unless the user explicitly asks for a custom wrapper.
- **Never modify** `scripts/image_gen.py`. If something is missing, ask the user before doing anything else.
## Defaults
- Model: `gpt-image-1.5`
- Supported model family for this CLI: GPT Image models (`gpt-image-*`)
- Size: `1024x1024`
- Quality: `auto`
- Output format: `png`
- Default one-off output path: `output/imagegen/output.png`
- Background: unspecified unless `--background` is set
## Quality, input fidelity, and masks (CLI fallback only)
These are explicit CLI controls. They are not built-in `image_gen` tool arguments.
- `--quality` works for `generate`, `edit`, and `generate-batch`: `low|medium|high|auto`
- `--input-fidelity` is **edit-only** and validated as `low|high`
- `--mask` is **edit-only**
Example:
```bash
python "$IMAGE_GEN" edit \
--image input.png \
--prompt "Change only the background" \
--quality high \
--input-fidelity high \
--out output/imagegen/background-edit.png
```
Mask notes:
- For multi-image edits, pass repeated `--image` flags. Their order is meaningful, so describe each image by index and role in the prompt.
- The CLI accepts a single `--mask`.
- Use a PNG mask when possible; the script treats mask handling as best-effort and does not perform full preflight validation beyond file checks/warnings.
- In the edit prompt, repeat invariants (`change only the background; keep the subject unchanged`) to reduce drift.
## Output handling
- Use `tmp/imagegen/` for temporary JSONL inputs or scratch files.
- Use `output/imagegen/` for final outputs.
- Reruns fail if a target file already exists unless you pass `--force`.
- `--out-dir` changes one-off naming to `image_1.<ext>`, `image_2.<ext>`, and so on.
- Downscaled copies use the default suffix `-web` unless you override it.
## Common recipes
Generate with augmentation fields:
```bash
python "$IMAGE_GEN" generate \
--prompt "A minimal hero image of a ceramic coffee mug" \
--use-case "product-mockup" \
--style "clean product photography" \
--composition "wide product shot with usable negative space for page copy" \
--constraints "no logos, no text" \
--out output/imagegen/mug-hero.png
```
Generate + also write a downscaled copy for fast web loading:
```bash
python "$IMAGE_GEN" generate \
--prompt "A cozy alpine cabin at dawn" \
--size 1024x1024 \
--downscale-max-dim 1024 \
--out output/imagegen/alpine-cabin.png
```
Generate multiple prompts concurrently (async batch):
```bash
mkdir -p tmp/imagegen output/imagegen/batch
cat > tmp/imagegen/prompts.jsonl << 'EOF'
{"prompt":"Cavernous hangar interior with a compact shuttle parked near the center","use_case":"stylized-concept","composition":"wide-angle, low-angle","lighting":"volumetric light rays through drifting fog","constraints":"no logos or trademarks; no watermark","size":"1536x1024"}
{"prompt":"Gray wolf in profile in a snowy forest","use_case":"photorealistic-natural","composition":"eye-level","constraints":"no logos or trademarks; no watermark","size":"1024x1024"}
EOF
python "$IMAGE_GEN" generate-batch \
--input tmp/imagegen/prompts.jsonl \
--out-dir output/imagegen/batch \
--concurrency 5
rm -f tmp/imagegen/prompts.jsonl
```
Notes:
- `generate-batch` requires `--out-dir`.
- generate-batch requires --out-dir.
- Use `--concurrency` to control parallelism (default `5`).
- Per-job overrides are supported in JSONL (for example `size`, `quality`, `background`, `output_format`, `output_compression`, `moderation`, `n`, `model`, `out`, and prompt-augmentation fields).
- `--n` generates multiple variants for a single prompt; `generate-batch` is for many different prompts.
- In batch mode, per-job `out` is treated as a filename under `--out-dir`.
## CLI notes
- Supported sizes: `1024x1024`, `1536x1024`, `1024x1536`, or `auto`.
- Transparent backgrounds require `output_format` to be `png` or `webp`.
- `--prompt-file`, `--output-compression`, `--moderation`, `--max-attempts`, `--fail-fast`, `--force`, and `--no-augment` are supported.
- This CLI is intended for GPT Image models. Do not assume older non-GPT image-model behavior applies here.
## See also
- API parameter quick reference for fallback CLI mode: `references/image-api.md`
- Prompt examples shared across both top-level modes: `references/sample-prompts.md`
- Network/sandbox notes for fallback CLI mode: `references/codex-network.md`

View File

@@ -1,33 +0,0 @@
# Codex network approvals / sandbox notes
This file is for the fallback CLI mode only. Read it only after the user explicitly asks to use `scripts/image_gen.py`.
This guidance is intentionally isolated from `SKILL.md` because it can vary by environment and may become stale. Prefer the defaults in your environment when in doubt.
## Why am I asked to approve image generation calls?
The fallback CLI uses the OpenAI Image API, so it needs outbound network access. In many Codex setups, network access is disabled by default and/or the approval policy requires confirmation before networked commands run.
## Important note about approvals vs network
- `--ask-for-approval never` suppresses approval prompts.
- It does **not** by itself enable network access.
- In `workspace-write`, network access still depends on your Codex configuration (for example `[sandbox_workspace_write] network_access = true`).
## How do I reduce repeated approval prompts?
If you trust the repo and want fewer prompts, use a configuration or profile that both:
- enables network for the sandbox mode you plan to use
- sets an approval policy that matches your risk tolerance
Example `~/.codex/config.toml` pattern:
```toml
approval_policy = "on-request"
sandbox_mode = "workspace-write"
[sandbox_workspace_write]
network_access = true
```
If you want quieter automation after network is enabled, you can choose a stricter approval policy, but do that intentionally and with care.
## Safety note
Enabling network and reducing approvals lowers friction, but increases risk if you run untrusted code or work in an untrusted repository.

View File

@@ -1,49 +0,0 @@
# Image API quick reference
This file is for the fallback CLI mode only. Use it only after the user explicitly asks to use `scripts/image_gen.py` instead of the built-in `image_gen` tool.
These parameters describe the Image API and bundled CLI fallback surface. Do not assume they are normal arguments on the built-in `image_gen` tool.
## Scope
- This fallback CLI is intended for GPT Image models (`gpt-image-1.5`, `gpt-image-1`, and `gpt-image-1-mini`).
- The built-in `image_gen` tool and the fallback CLI do not expose the same controls.
## Endpoints
- Generate: `POST /v1/images/generations` (`client.images.generate(...)`)
- Edit: `POST /v1/images/edits` (`client.images.edit(...)`)
## Core parameters for GPT Image models
- `prompt`: text prompt
- `model`: image model
- `n`: number of images (1-10)
- `size`: `1024x1024`, `1536x1024`, `1024x1536`, or `auto`
- `quality`: `low`, `medium`, `high`, or `auto`
- `background`: output transparency behavior (`transparent`, `opaque`, or `auto`) for generated output; this is not the same thing as the prompt's visual scene/backdrop
- `output_format`: `png` (default), `jpeg`, `webp`
- `output_compression`: 0-100 (jpeg/webp only)
- `moderation`: `auto` (default) or `low`
## Edit-specific parameters
- `image`: one or more input images. For GPT Image models, you can provide up to 16 images.
- `mask`: optional mask image
- `input_fidelity`: `low` (default) or `high`
Model-specific note for `input_fidelity`:
- `gpt-image-1` and `gpt-image-1-mini` preserve all input images, but the first image gets richer textures and finer details.
- `gpt-image-1.5` preserves the first 5 input images with higher fidelity.
## Output
- `data[]` list with `b64_json` per image
- The bundled `scripts/image_gen.py` CLI decodes `b64_json` and writes output files for you.
## Limits and notes
- Input images and masks must be under 50MB.
- Use the edits endpoint when the user requests changes to an existing image.
- Masking is prompt-guided; exact shapes are not guaranteed.
- Large sizes and high quality increase latency and cost.
- High `input_fidelity` can materially increase input token usage.
- If a request fails because a specific option is unsupported by the selected GPT Image model, retry manually without that option.
## Important boundary
- `quality`, `input_fidelity`, explicit masks, `background`, `output_format`, and related parameters are fallback-only execution controls.
- Do not assume they are built-in `image_gen` tool arguments.

View File

@@ -1,98 +0,0 @@
# Prompting best practices
These prompting principles are shared by both top-level modes of the skill:
- built-in `image_gen` tool (default)
- explicit `scripts/image_gen.py` CLI fallback
This file is about prompt structure, specificity, and iteration. Fallback-only execution controls such as `quality`, `input_fidelity`, masks, output format, and output paths live in the fallback docs.
## Contents
- [Structure](#structure)
- [Specificity policy](#specificity-policy)
- [Allowed and disallowed augmentation](#allowed-and-disallowed-augmentation)
- [Composition and layout](#composition-and-layout)
- [Constraints and invariants](#constraints-and-invariants)
- [Text in images](#text-in-images)
- [Input images and references](#input-images-and-references)
- [Iterate deliberately](#iterate-deliberately)
- [Fallback-only execution controls](#fallback-only-execution-controls)
- [Use-case tips](#use-case-tips)
- [Where to find copy/paste recipes](#where-to-find-copypaste-recipes)
## Structure
- Use a consistent order: scene/backdrop -> subject -> key details -> constraints -> output intent.
- Include intended use (ad, UI mock, infographic) to set the level of polish.
- For complex requests, use short labeled lines instead of one long paragraph.
## Specificity policy
- If the user prompt is already specific and detailed, normalize it into a clean spec without adding creative requirements.
- If the prompt is generic, you may add tasteful detail when it materially improves the output.
- Treat examples in `sample-prompts.md` as fully-authored recipes, not as the default amount of augmentation to add to every request.
## Allowed and disallowed augmentation
Allowed augmentation for generic prompts:
- composition and framing cues
- intended-use or polish-level hints
- practical layout guidance
- reasonable scene concreteness that supports the request
Do not add:
- extra characters, props, or objects that are not implied
- brand palettes, slogans, or story beats that are not implied
- arbitrary side-specific placement unless the surrounding layout supports it
## Composition and layout
- Specify framing and viewpoint (close-up, wide, top-down) and placement only when it materially helps.
- Call out negative space if the asset clearly needs room for UI or copy.
- Avoid making left/right layout decisions unless the user or surrounding layout supports them.
## Constraints and invariants
- State what must not change (`keep background unchanged`).
- For edits, say `change only X; keep Y unchanged` and repeat invariants on every iteration to reduce drift.
## Text in images
- Put literal text in quotes or ALL CAPS and specify typography (font style, size, color, placement).
- Spell uncommon words letter-by-letter if accuracy matters.
- For in-image copy, require verbatim rendering and no extra characters.
## Input images and references
- Do not assume that every provided image is an edit target.
- Label each image by index and role (`Image 1: edit target`, `Image 2: style reference`).
- If the user provides images for style, composition, or mood guidance and does not ask to modify them, treat the request as generation with references.
- If the user asks to preserve an existing image while changing specific parts, treat the request as an edit.
- For compositing, describe how the images interact (`place the subject from Image 2 into Image 1`).
## Iterate deliberately
- Start with a clean base prompt, then make small single-change edits.
- Re-specify critical constraints when you iterate.
- Prefer one targeted follow-up at a time over rewriting the whole prompt.
## Fallback-only execution controls
- `quality`, `input_fidelity`, explicit masks, output format, and output paths are fallback-only execution controls.
- Do not assume they are built-in `image_gen` tool arguments.
- If the user explicitly chooses CLI fallback, see `references/cli.md` and `references/image-api.md` for those controls.
## Use-case tips
Generate:
- photorealistic-natural: Prompt as if a real photo is captured in the moment; use photography language (lens, lighting, framing); call for real texture; avoid over-stylized polish unless requested.
- product-mockup: Describe the product/packaging and materials; ensure clean silhouette and label clarity; if in-image text is needed, require verbatim rendering and specify typography.
- ui-mockup: Describe the target fidelity first (shippable mockup or low-fi wireframe), then focus on layout, hierarchy, and practical UI elements; avoid concept-art language.
- infographic-diagram: Define the audience and layout flow; label parts explicitly; require verbatim text.
- logo-brand: Keep it simple and scalable; ask for a strong silhouette and balanced negative space; avoid decorative flourishes unless requested.
- illustration-story: Define panels or scene beats; keep each action concrete.
- stylized-concept: Specify style cues, material finish, and rendering approach (3D, painterly, clay) without inventing new story elements.
- historical-scene: State the location/date and required period accuracy; constrain clothing, props, and environment to match the era.
Edit:
- text-localization: Change only the text; preserve layout, typography, spacing, and hierarchy; no extra words or reflow unless needed.
- identity-preserve: Lock identity (face, body, pose, hair, expression); change only the specified elements; match lighting and shadows.
- precise-object-edit: Specify exactly what to remove/replace; preserve surrounding texture and lighting; keep everything else unchanged.
- lighting-weather: Change only environmental conditions (light, shadows, atmosphere, precipitation); keep geometry, framing, and subject identity.
- background-extraction: Request a clean cutout; crisp silhouette; no halos; preserve label text exactly; no restyling.
- style-transfer: Specify style cues to preserve (palette, texture, brushwork) and what must change; add `no extra elements` to prevent drift.
- compositing: Reference inputs by index; specify what moves where; match lighting, perspective, and scale; keep the base framing unchanged.
- sketch-to-render: Preserve layout, proportions, and perspective; choose materials and lighting that support the supplied sketch without adding new elements.
## Where to find copy/paste recipes
For copy/paste prompt specs (examples only), see `references/sample-prompts.md`. This file focuses on principles, specificity, and iteration patterns.

View File

@@ -1,376 +0,0 @@
# Sample prompts (copy/paste)
These prompt recipes are shared across both top-level modes of the skill:
- built-in `image_gen` tool (default)
- explicit `scripts/image_gen.py` CLI fallback
Use these as starting points. They are intentionally complete prompt recipes, not the default amount of augmentation to add to every user request.
When adapting a user's prompt:
- keep user-provided requirements
- only add detail according to the specificity policy in `SKILL.md`
- do not treat every example below as permission to invent extra story elements
The labeled lines are prompt scaffolding, not a closed schema. `Asset type` and `Input images` are prompt-only scaffolding; the CLI does not expose them as dedicated flags.
Execution details such as explicit CLI flags, `quality`, `input_fidelity`, masks, output formats, and local output paths depend on mode. Use the built-in tool by default; only apply CLI-specific controls after the user explicitly opts into fallback mode.
For prompting principles (structure, specificity, invariants, iteration), see `references/prompting.md`.
## Generate
### photorealistic-natural
```
Use case: photorealistic-natural
Primary request: candid photo of an elderly sailor on a small fishing boat adjusting a net
Scene/backdrop: coastal water with soft haze
Subject: weathered skin with wrinkles and sun texture
Style/medium: photorealistic candid photo
Composition/framing: medium close-up, eye-level
Lighting/mood: soft coastal daylight, shallow depth of field, subtle film grain
Materials/textures: real skin texture, worn fabric, salt-worn wood
Constraints: natural color balance; no heavy retouching; no glamorization; no watermark
Avoid: studio polish; staged look
```
### product-mockup
```
Use case: product-mockup
Primary request: premium product photo of a matte black shampoo bottle with a minimal label
Scene/backdrop: clean studio gradient from light gray to white
Subject: single bottle centered with subtle reflection
Style/medium: premium product photography
Composition/framing: centered, slight three-quarter angle, generous padding
Lighting/mood: softbox lighting, clean highlights, controlled shadows
Materials/textures: matte plastic, crisp label printing
Constraints: no logos or trademarks; no watermark
```
### ui-mockup
```
Use case: ui-mockup
Primary request: mobile app home screen for a local farmers market with vendors and daily specials
Asset type: mobile app screen
Style/medium: realistic product UI, not concept art
Composition/framing: clean vertical mobile layout with clear hierarchy
Constraints: practical layout, clear typography, no logos or trademarks, no watermark
```
### infographic-diagram
```
Use case: infographic-diagram
Primary request: detailed infographic of an automatic coffee machine flow
Scene/backdrop: clean, light neutral background
Subject: bean hopper -> grinder -> brew group -> boiler -> water tank -> drip tray
Style/medium: clean vector-like infographic with clear callouts and arrows
Composition/framing: vertical poster layout, top-to-bottom flow
Text (verbatim): "Bean Hopper", "Grinder", "Brew Group", "Boiler", "Water Tank", "Drip Tray"
Constraints: clear labels, strong contrast, no logos or trademarks, no watermark
```
### logo-brand
```
Use case: logo-brand
Primary request: original logo for "Field & Flour", a local bakery
Style/medium: vector logo mark; flat colors; minimal
Composition/framing: single centered logo on a plain background with generous padding
Constraints: strong silhouette, balanced negative space; original design only; no gradients unless essential; no trademarks; no watermark
```
### illustration-story
```
Use case: illustration-story
Primary request: 4-panel comic about a pet left alone at home
Scene/backdrop: cozy living room across panels
Subject: pet reacting to the owner leaving, then relaxing, then returning to a composed pose
Style/medium: comic illustration with clear panels
Composition/framing: 4 equal-sized vertical panels, readable actions per panel
Constraints: no text; no logos or trademarks; no watermark
```
### stylized-concept
```
Use case: stylized-concept
Primary request: cavernous hangar interior with tall support beams and drifting fog
Scene/backdrop: industrial hangar interior, deep scale, light haze
Subject: compact shuttle parked near the center
Style/medium: cinematic concept art, industrial realism
Composition/framing: wide-angle, low-angle
Lighting/mood: volumetric light rays cutting through fog
Constraints: no logos or trademarks; no watermark
```
### historical-scene
```
Use case: historical-scene
Primary request: outdoor crowd scene in Bethel, New York on August 16, 1969
Scene/backdrop: open field with period-appropriate staging
Subject: crowd in period-accurate clothing, authentic environment
Style/medium: photorealistic photo
Composition/framing: wide shot, eye-level
Constraints: period-accurate details; no modern objects; no logos or trademarks; no watermark
```
## Asset type templates (taxonomy-aligned)
### Website assets template
```
Use case: <photorealistic-natural|stylized-concept|product-mockup|infographic-diagram|ui-mockup>
Asset type: <hero image / section illustration / blog header>
Primary request: <short description>
Scene/backdrop: <environment or abstract backdrop>
Subject: <main subject>
Style/medium: <photo/illustration/3D>
Composition/framing: <wide/centered; note usable negative space only if needed>
Lighting/mood: <soft/bright/neutral>
Color palette: <brand colors or neutral>
Constraints: <no text; no logos; no watermark; leave room for UI if needed>
```
### Website assets example: minimal hero background
```
Use case: stylized-concept
Asset type: landing page hero background
Primary request: minimal abstract background with a soft gradient and subtle texture
Style/medium: matte illustration / soft-rendered abstract background
Composition/framing: wide composition with usable negative space for page copy
Lighting/mood: gentle studio glow
Color palette: restrained neutral palette
Constraints: no text; no logos; no watermark
```
### Website assets example: feature section illustration
```
Use case: stylized-concept
Asset type: feature section illustration
Primary request: simple abstract shapes suggesting connection and flow
Scene/backdrop: subtle light-gray backdrop with faint texture
Style/medium: flat illustration; soft shadows; restrained contrast
Composition/framing: centered cluster; open margins for UI
Color palette: muted neutral palette
Constraints: no text; no logos; no watermark
```
### Website assets example: blog header image
```
Use case: photorealistic-natural
Asset type: blog header image
Primary request: overhead desk scene with notebook, pen, and coffee cup
Scene/backdrop: warm wooden tabletop
Style/medium: photorealistic photo
Composition/framing: wide crop with clean room for page copy
Lighting/mood: soft morning light
Constraints: no text; no logos; no watermark
```
### Game assets template
```
Use case: stylized-concept
Asset type: <game environment concept art / game character concept / game UI icon / tileable game texture>
Primary request: <biome/scene/character/icon/material>
Scene/backdrop: <location + set dressing> (if applicable)
Subject: <main focal element(s)>
Style/medium: <realistic/stylized>; <concept art / character render / UI icon / texture>
Composition/framing: <wide/establishing/top-down>; <camera angle>; <focal point placement>
Lighting/mood: <time of day>; <mood>; <volumetric/fog/etc>
Constraints: no logos or trademarks; no watermark
```
### Game assets example: environment concept art
```
Use case: stylized-concept
Asset type: game environment concept art
Primary request: cavernous hangar interior with tall support beams and drifting fog
Scene/backdrop: industrial hangar interior, deep scale, light haze
Subject: compact shuttle parked near the center
Style/medium: cinematic concept art, industrial realism
Composition/framing: wide-angle, low-angle
Lighting/mood: volumetric light rays cutting through fog
Constraints: no logos or trademarks; no watermark
```
### Game assets example: character concept
```
Use case: stylized-concept
Asset type: game character concept
Primary request: desert scout character with layered travel gear
Subject: long coat, satchel, practical travel clothing
Style/medium: character render; stylized realism
Composition/framing: neutral hero pose on a simple backdrop
Constraints: no logos or trademarks; no watermark
```
### Game assets example: UI icon
```
Use case: stylized-concept
Asset type: game UI icon
Primary request: round shield icon with a subtle rune pattern
Style/medium: painted game UI icon
Composition/framing: centered icon; generous padding; clear silhouette
Constraints: no text; no background scene elements; no logos or trademarks; no watermark
```
### Game assets example: tileable texture
```
Use case: stylized-concept
Asset type: tileable game texture
Primary request: worn sandstone blocks
Style/medium: seamless tileable texture; PBR-ish look
Scene/backdrop: neutral lighting reference only
Constraints: seamless edges; no obvious focal elements; no text; no logos or trademarks; no watermark
```
### Wireframe template
```
Use case: ui-mockup
Asset type: website wireframe
Primary request: <page or flow to sketch>
Style/medium: low-fi grayscale wireframe
Composition/framing: <landscape or portrait to match expected device>
Subject: <sections in order; grid/columns; key labels>
Constraints: no color; no logos; no real photos; no watermark
```
### Wireframe example: homepage (desktop)
```
Use case: ui-mockup
Asset type: website wireframe
Primary request: SaaS homepage layout with clear hierarchy
Style/medium: low-fi grayscale wireframe
Subject: top nav; hero with headline and CTA; three feature cards; testimonial strip; pricing preview; footer
Composition/framing: landscape desktop layout
Constraints: label major blocks; no color; no logos; no real photos; no watermark
```
### Wireframe example: pricing page
```
Use case: ui-mockup
Asset type: website wireframe
Primary request: pricing page layout with comparison table
Style/medium: low-fi grayscale wireframe
Subject: header; plan toggle; 3 pricing cards; comparison table; FAQ accordion; footer
Composition/framing: desktop or tablet layout
Constraints: label key areas; no color; no logos; no real photos; no watermark
```
### Wireframe example: mobile onboarding flow
```
Use case: ui-mockup
Asset type: mobile onboarding wireframe
Primary request: three-screen mobile onboarding flow
Style/medium: low-fi grayscale wireframe
Subject: screen 1 headline and CTA; screen 2 feature bullets; screen 3 form fields and CTA
Composition/framing: portrait mobile layout
Constraints: label screens and blocks; no color; no logos; no real photos; no watermark
```
### Logo template
```
Use case: logo-brand
Asset type: logo concept
Primary request: <brand idea or symbol concept>
Style/medium: vector logo mark; flat colors; minimal
Composition/framing: centered mark; clear silhouette; generous margin
Color palette: <1-2 colors; high contrast>
Text (verbatim): "<exact name>" (only if needed)
Constraints: no gradients; no mockups; no 3D; no watermark
```
### Logo example: abstract symbol mark
```
Use case: logo-brand
Asset type: logo concept
Primary request: geometric leaf symbol suggesting sustainability and growth
Style/medium: vector logo mark; flat colors; minimal
Composition/framing: centered mark; clear silhouette
Color palette: deep green and off-white
Constraints: no text unless requested; no gradients; no mockups; no 3D; no watermark
```
### Logo example: monogram mark
```
Use case: logo-brand
Asset type: logo concept
Primary request: interlocking monogram of the letters "AV"
Style/medium: vector logo mark; flat colors; minimal
Composition/framing: centered mark; balanced spacing
Color palette: black on white
Constraints: no gradients; no mockups; no 3D; no watermark
```
### Logo example: wordmark
```
Use case: logo-brand
Asset type: logo concept
Primary request: clean wordmark for a modern studio
Style/medium: vector wordmark; flat colors; minimal
Text (verbatim): "Studio North"
Composition/framing: centered text; even letter spacing
Constraints: no gradients; no mockups; no 3D; no watermark
```
## Edit
### text-localization
```
Use case: text-localization
Input images: Image 1: original infographic
Primary request: replace "Bean Hopper", "Grinder", "Brew Group", "Boiler", "Water Tank", and "Drip Tray" with "Tolva", "Molino", "Grupo de infusión", "Caldera", "Depósito de agua", and "Bandeja de goteo"
Constraints: change only the text; preserve layout, typography, spacing, and hierarchy; no extra words; do not alter logos or imagery
```
### identity-preserve
```
Use case: identity-preserve
Input images: Image 1: person photo; Image 2..N: clothing references
Primary request: replace only the clothing with the provided garments
Constraints: preserve face, body shape, pose, hair, expression, and identity; match lighting and shadows; keep the background unchanged; no accessories or text
```
### precise-object-edit
```
Use case: precise-object-edit
Input images: Image 1: room photo
Primary request: replace only the white chairs with wooden chairs
Constraints: preserve camera angle, room lighting, floor shadows, and surrounding objects; keep all other aspects unchanged
```
### lighting-weather
```
Use case: lighting-weather
Input images: Image 1: original photo
Primary request: make it look like a winter evening with gentle snowfall
Constraints: preserve subject identity, geometry, camera angle, and composition; change only lighting, atmosphere, and weather
```
### background-extraction
```
Use case: background-extraction
Input images: Image 1: product photo
Primary request: isolate the product on a clean transparent background
Constraints: crisp silhouette; no halos or fringing; preserve label text exactly; no restyling
```
### style-transfer
```
Use case: style-transfer
Input images: Image 1: style reference
Primary request: apply Image 1's visual style to a man riding a motorcycle on a plain white backdrop
Constraints: preserve palette, texture, and brushwork; no extra elements
```
### compositing
```
Use case: compositing
Input images: Image 1: base scene; Image 2: subject to insert
Primary request: place the subject from Image 2 next to the person in Image 1
Constraints: match lighting, perspective, and scale; keep the base framing unchanged; no extra elements
```
### sketch-to-render
```
Use case: sketch-to-render
Input images: Image 1: drawing
Primary request: turn the drawing into a photorealistic image
Constraints: preserve layout, proportions, and perspective; choose realistic materials and lighting; do not add new elements or text
```

View File

@@ -1,926 +0,0 @@
#!/usr/bin/env python3
"""Fallback CLI for explicit image generation or editing with GPT Image models.
Used only when the user explicitly opts into CLI fallback mode.
Defaults to gpt-image-1.5 and a structured prompt augmentation workflow.
"""
from __future__ import annotations
import argparse
import asyncio
import base64
import json
import os
from pathlib import Path
import re
import sys
import time
from typing import Any, Dict, Iterable, List, Optional, Tuple
from io import BytesIO
DEFAULT_MODEL = "gpt-image-1.5"
DEFAULT_SIZE = "1024x1024"
DEFAULT_QUALITY = "auto"
DEFAULT_OUTPUT_FORMAT = "png"
DEFAULT_CONCURRENCY = 5
DEFAULT_DOWNSCALE_SUFFIX = "-web"
DEFAULT_OUTPUT_PATH = "output/imagegen/output.png"
GPT_IMAGE_MODEL_PREFIX = "gpt-image-"
ALLOWED_SIZES = {"1024x1024", "1536x1024", "1024x1536", "auto"}
ALLOWED_QUALITIES = {"low", "medium", "high", "auto"}
ALLOWED_BACKGROUNDS = {"transparent", "opaque", "auto", None}
ALLOWED_INPUT_FIDELITIES = {"low", "high", None}
MAX_IMAGE_BYTES = 50 * 1024 * 1024
MAX_BATCH_JOBS = 500
def _die(message: str, code: int = 1) -> None:
print(f"Error: {message}", file=sys.stderr)
raise SystemExit(code)
def _warn(message: str) -> None:
print(f"Warning: {message}", file=sys.stderr)
def _dependency_hint(package: str, *, upgrade: bool = False) -> str:
command = f"uv pip install {'-U ' if upgrade else ''}{package}"
return (
"Activate the repo-selected environment first, then install it with "
f"`{command}`. If this repo uses a local virtualenv, start with "
"`source .venv/bin/activate`; otherwise use this repo's configured shared fallback "
"environment. If your project declares dependencies, prefer that project's normal "
"`uv sync` flow."
)
def _ensure_api_key(dry_run: bool) -> None:
if os.getenv("OPENAI_API_KEY"):
print("OPENAI_API_KEY is set.", file=sys.stderr)
return
if dry_run:
_warn("OPENAI_API_KEY is not set; dry-run only.")
return
_die("OPENAI_API_KEY is not set. Export it before running.")
def _read_prompt(prompt: Optional[str], prompt_file: Optional[str]) -> str:
if prompt and prompt_file:
_die("Use --prompt or --prompt-file, not both.")
if prompt_file:
path = Path(prompt_file)
if not path.exists():
_die(f"Prompt file not found: {path}")
return path.read_text(encoding="utf-8").strip()
if prompt:
return prompt.strip()
_die("Missing prompt. Use --prompt or --prompt-file.")
return "" # unreachable
def _check_image_paths(paths: Iterable[str]) -> List[Path]:
resolved: List[Path] = []
for raw in paths:
path = Path(raw)
if not path.exists():
_die(f"Image file not found: {path}")
if path.stat().st_size > MAX_IMAGE_BYTES:
_warn(f"Image exceeds 50MB limit: {path}")
resolved.append(path)
return resolved
def _normalize_output_format(fmt: Optional[str]) -> str:
if not fmt:
return DEFAULT_OUTPUT_FORMAT
fmt = fmt.lower()
if fmt not in {"png", "jpeg", "jpg", "webp"}:
_die("output-format must be png, jpeg, jpg, or webp.")
return "jpeg" if fmt == "jpg" else fmt
def _validate_size(size: str) -> None:
if size not in ALLOWED_SIZES:
_die(
"size must be one of 1024x1024, 1536x1024, 1024x1536, or auto for GPT image models."
)
def _validate_quality(quality: str) -> None:
if quality not in ALLOWED_QUALITIES:
_die("quality must be one of low, medium, high, or auto.")
def _validate_background(background: Optional[str]) -> None:
if background not in ALLOWED_BACKGROUNDS:
_die("background must be one of transparent, opaque, or auto.")
def _validate_input_fidelity(input_fidelity: Optional[str]) -> None:
if input_fidelity not in ALLOWED_INPUT_FIDELITIES:
_die("input-fidelity must be one of low or high.")
def _validate_model(model: str) -> None:
if not model.startswith(GPT_IMAGE_MODEL_PREFIX):
_die(
"model must be a GPT Image model (for example gpt-image-1.5, gpt-image-1, or gpt-image-1-mini)."
)
def _validate_transparency(background: Optional[str], output_format: str) -> None:
if background == "transparent" and output_format not in {"png", "webp"}:
_die("transparent background requires output-format png or webp.")
def _validate_generate_payload(payload: Dict[str, Any]) -> None:
_validate_model(str(payload.get("model", DEFAULT_MODEL)))
n = int(payload.get("n", 1))
if n < 1 or n > 10:
_die("n must be between 1 and 10")
size = str(payload.get("size", DEFAULT_SIZE))
quality = str(payload.get("quality", DEFAULT_QUALITY))
background = payload.get("background")
_validate_size(size)
_validate_quality(quality)
_validate_background(background)
oc = payload.get("output_compression")
if oc is not None and not (0 <= int(oc) <= 100):
_die("output_compression must be between 0 and 100")
def _build_output_paths(
out: str,
output_format: str,
count: int,
out_dir: Optional[str],
) -> List[Path]:
ext = "." + output_format
if out_dir:
out_base = Path(out_dir)
out_base.mkdir(parents=True, exist_ok=True)
return [out_base / f"image_{i}{ext}" for i in range(1, count + 1)]
out_path = Path(out)
if out_path.exists() and out_path.is_dir():
out_path.mkdir(parents=True, exist_ok=True)
return [out_path / f"image_{i}{ext}" for i in range(1, count + 1)]
if out_path.suffix == "":
out_path = out_path.with_suffix(ext)
elif output_format and out_path.suffix.lstrip(".").lower() != output_format:
_warn(
f"Output extension {out_path.suffix} does not match output-format {output_format}."
)
if count == 1:
return [out_path]
return [
out_path.with_name(f"{out_path.stem}-{i}{out_path.suffix}")
for i in range(1, count + 1)
]
def _augment_prompt(args: argparse.Namespace, prompt: str) -> str:
fields = _fields_from_args(args)
return _augment_prompt_fields(args.augment, prompt, fields)
def _augment_prompt_fields(augment: bool, prompt: str, fields: Dict[str, Optional[str]]) -> str:
if not augment:
return prompt
sections: List[str] = []
if fields.get("use_case"):
sections.append(f"Use case: {fields['use_case']}")
sections.append(f"Primary request: {prompt}")
if fields.get("scene"):
sections.append(f"Scene/background: {fields['scene']}")
if fields.get("subject"):
sections.append(f"Subject: {fields['subject']}")
if fields.get("style"):
sections.append(f"Style/medium: {fields['style']}")
if fields.get("composition"):
sections.append(f"Composition/framing: {fields['composition']}")
if fields.get("lighting"):
sections.append(f"Lighting/mood: {fields['lighting']}")
if fields.get("palette"):
sections.append(f"Color palette: {fields['palette']}")
if fields.get("materials"):
sections.append(f"Materials/textures: {fields['materials']}")
if fields.get("text"):
sections.append(f"Text (verbatim): \"{fields['text']}\"")
if fields.get("constraints"):
sections.append(f"Constraints: {fields['constraints']}")
if fields.get("negative"):
sections.append(f"Avoid: {fields['negative']}")
return "\n".join(sections)
def _fields_from_args(args: argparse.Namespace) -> Dict[str, Optional[str]]:
return {
"use_case": getattr(args, "use_case", None),
"scene": getattr(args, "scene", None),
"subject": getattr(args, "subject", None),
"style": getattr(args, "style", None),
"composition": getattr(args, "composition", None),
"lighting": getattr(args, "lighting", None),
"palette": getattr(args, "palette", None),
"materials": getattr(args, "materials", None),
"text": getattr(args, "text", None),
"constraints": getattr(args, "constraints", None),
"negative": getattr(args, "negative", None),
}
def _print_request(payload: dict) -> None:
print(json.dumps(payload, indent=2, sort_keys=True))
def _decode_and_write(images: List[str], outputs: List[Path], force: bool) -> None:
for idx, image_b64 in enumerate(images):
if idx >= len(outputs):
break
out_path = outputs[idx]
if out_path.exists() and not force:
_die(f"Output already exists: {out_path} (use --force to overwrite)")
out_path.parent.mkdir(parents=True, exist_ok=True)
out_path.write_bytes(base64.b64decode(image_b64))
print(f"Wrote {out_path}")
def _derive_downscale_path(path: Path, suffix: str) -> Path:
if suffix and not suffix.startswith("-") and not suffix.startswith("_"):
suffix = "-" + suffix
return path.with_name(f"{path.stem}{suffix}{path.suffix}")
def _downscale_image_bytes(image_bytes: bytes, *, max_dim: int, output_format: str) -> bytes:
try:
from PIL import Image
except Exception:
_die(f"Downscaling requires Pillow. {_dependency_hint('pillow')}")
if max_dim < 1:
_die("--downscale-max-dim must be >= 1")
with Image.open(BytesIO(image_bytes)) as img:
img.load()
w, h = img.size
scale = min(1.0, float(max_dim) / float(max(w, h)))
target = (max(1, int(round(w * scale))), max(1, int(round(h * scale))))
resized = img if target == (w, h) else img.resize(target, Image.Resampling.LANCZOS)
fmt = output_format.lower()
if fmt == "jpg":
fmt = "jpeg"
if fmt == "jpeg":
if resized.mode in ("RGBA", "LA") or ("transparency" in getattr(resized, "info", {})):
bg = Image.new("RGB", resized.size, (255, 255, 255))
bg.paste(resized.convert("RGBA"), mask=resized.convert("RGBA").split()[-1])
resized = bg
else:
resized = resized.convert("RGB")
out = BytesIO()
resized.save(out, format=fmt.upper())
return out.getvalue()
def _decode_write_and_downscale(
images: List[str],
outputs: List[Path],
*,
force: bool,
downscale_max_dim: Optional[int],
downscale_suffix: str,
output_format: str,
) -> None:
for idx, image_b64 in enumerate(images):
if idx >= len(outputs):
break
out_path = outputs[idx]
if out_path.exists() and not force:
_die(f"Output already exists: {out_path} (use --force to overwrite)")
out_path.parent.mkdir(parents=True, exist_ok=True)
raw = base64.b64decode(image_b64)
out_path.write_bytes(raw)
print(f"Wrote {out_path}")
if downscale_max_dim is None:
continue
derived = _derive_downscale_path(out_path, downscale_suffix)
if derived.exists() and not force:
_die(f"Output already exists: {derived} (use --force to overwrite)")
derived.parent.mkdir(parents=True, exist_ok=True)
resized = _downscale_image_bytes(raw, max_dim=downscale_max_dim, output_format=output_format)
derived.write_bytes(resized)
print(f"Wrote {derived}")
def _create_client():
try:
from openai import OpenAI
except ImportError:
_die(f"openai SDK not installed in the active environment. {_dependency_hint('openai')}")
return OpenAI()
def _create_async_client():
try:
from openai import AsyncOpenAI
except ImportError:
try:
import openai as _openai # noqa: F401
except ImportError:
_die(
f"openai SDK not installed in the active environment. {_dependency_hint('openai')}"
)
_die(
"AsyncOpenAI not available in this openai SDK version. "
f"{_dependency_hint('openai', upgrade=True)}"
)
return AsyncOpenAI()
def _slugify(value: str) -> str:
value = value.strip().lower()
value = re.sub(r"[^a-z0-9]+", "-", value)
value = re.sub(r"-{2,}", "-", value).strip("-")
return value[:60] if value else "job"
def _normalize_job(job: Any, idx: int) -> Dict[str, Any]:
if isinstance(job, str):
prompt = job.strip()
if not prompt:
_die(f"Empty prompt at job {idx}")
return {"prompt": prompt}
if isinstance(job, dict):
if "prompt" not in job or not str(job["prompt"]).strip():
_die(f"Missing prompt for job {idx}")
return job
_die(f"Invalid job at index {idx}: expected string or object.")
return {} # unreachable
def _read_jobs_jsonl(path: str) -> List[Dict[str, Any]]:
p = Path(path)
if not p.exists():
_die(f"Input file not found: {p}")
jobs: List[Dict[str, Any]] = []
for line_no, raw in enumerate(p.read_text(encoding="utf-8").splitlines(), start=1):
line = raw.strip()
if not line or line.startswith("#"):
continue
try:
item: Any
if line.startswith("{"):
item = json.loads(line)
else:
item = line
jobs.append(_normalize_job(item, idx=line_no))
except json.JSONDecodeError as exc:
_die(f"Invalid JSON on line {line_no}: {exc}")
if not jobs:
_die("No jobs found in input file.")
if len(jobs) > MAX_BATCH_JOBS:
_die(f"Too many jobs ({len(jobs)}). Max is {MAX_BATCH_JOBS}.")
return jobs
def _merge_non_null(dst: Dict[str, Any], src: Dict[str, Any]) -> Dict[str, Any]:
merged = dict(dst)
for k, v in src.items():
if v is not None:
merged[k] = v
return merged
def _job_output_paths(
*,
out_dir: Path,
output_format: str,
idx: int,
prompt: str,
n: int,
explicit_out: Optional[str],
) -> List[Path]:
out_dir.mkdir(parents=True, exist_ok=True)
ext = "." + output_format
if explicit_out:
base = Path(explicit_out)
if base.suffix == "":
base = base.with_suffix(ext)
elif base.suffix.lstrip(".").lower() != output_format:
_warn(
f"Job {idx}: output extension {base.suffix} does not match output-format {output_format}."
)
base = out_dir / base.name
else:
slug = _slugify(prompt[:80])
base = out_dir / f"{idx:03d}-{slug}{ext}"
if n == 1:
return [base]
return [
base.with_name(f"{base.stem}-{i}{base.suffix}")
for i in range(1, n + 1)
]
def _extract_retry_after_seconds(exc: Exception) -> Optional[float]:
# Best-effort: openai SDK errors vary by version. Prefer a conservative fallback.
for attr in ("retry_after", "retry_after_seconds"):
val = getattr(exc, attr, None)
if isinstance(val, (int, float)) and val >= 0:
return float(val)
msg = str(exc)
m = re.search(r"retry[- ]after[:= ]+([0-9]+(?:\\.[0-9]+)?)", msg, re.IGNORECASE)
if m:
try:
return float(m.group(1))
except Exception:
return None
return None
def _is_rate_limit_error(exc: Exception) -> bool:
name = exc.__class__.__name__.lower()
if "ratelimit" in name or "rate_limit" in name:
return True
msg = str(exc).lower()
return "429" in msg or "rate limit" in msg or "too many requests" in msg
def _is_transient_error(exc: Exception) -> bool:
if _is_rate_limit_error(exc):
return True
name = exc.__class__.__name__.lower()
if "timeout" in name or "timedout" in name or "tempor" in name:
return True
msg = str(exc).lower()
return "timeout" in msg or "timed out" in msg or "connection reset" in msg
async def _generate_one_with_retries(
client: Any,
payload: Dict[str, Any],
*,
attempts: int,
job_label: str,
) -> Any:
last_exc: Optional[Exception] = None
for attempt in range(1, attempts + 1):
try:
return await client.images.generate(**payload)
except Exception as exc:
last_exc = exc
if not _is_transient_error(exc):
raise
if attempt == attempts:
raise
sleep_s = _extract_retry_after_seconds(exc)
if sleep_s is None:
sleep_s = min(60.0, 2.0**attempt)
print(
f"{job_label} attempt {attempt}/{attempts} failed ({exc.__class__.__name__}); retrying in {sleep_s:.1f}s",
file=sys.stderr,
)
await asyncio.sleep(sleep_s)
raise last_exc or RuntimeError("unknown error")
async def _run_generate_batch(args: argparse.Namespace) -> int:
jobs = _read_jobs_jsonl(args.input)
out_dir = Path(args.out_dir)
base_fields = _fields_from_args(args)
base_payload = {
"model": args.model,
"n": args.n,
"size": args.size,
"quality": args.quality,
"background": args.background,
"output_format": args.output_format,
"output_compression": args.output_compression,
"moderation": args.moderation,
}
if args.dry_run:
for i, job in enumerate(jobs, start=1):
prompt = str(job["prompt"]).strip()
fields = _merge_non_null(base_fields, job.get("fields", {}))
# Allow flat job keys as well (use_case, scene, etc.)
fields = _merge_non_null(fields, {k: job.get(k) for k in base_fields.keys()})
augmented = _augment_prompt_fields(args.augment, prompt, fields)
job_payload = dict(base_payload)
job_payload["prompt"] = augmented
job_payload = _merge_non_null(job_payload, {k: job.get(k) for k in base_payload.keys()})
job_payload = {k: v for k, v in job_payload.items() if v is not None}
_validate_generate_payload(job_payload)
effective_output_format = _normalize_output_format(job_payload.get("output_format"))
_validate_transparency(job_payload.get("background"), effective_output_format)
job_payload["output_format"] = effective_output_format
n = int(job_payload.get("n", 1))
outputs = _job_output_paths(
out_dir=out_dir,
output_format=effective_output_format,
idx=i,
prompt=prompt,
n=n,
explicit_out=job.get("out"),
)
downscaled = None
if args.downscale_max_dim is not None:
downscaled = [
str(_derive_downscale_path(p, args.downscale_suffix)) for p in outputs
]
_print_request(
{
"endpoint": "/v1/images/generations",
"job": i,
"outputs": [str(p) for p in outputs],
"outputs_downscaled": downscaled,
**job_payload,
}
)
return 0
client = _create_async_client()
sem = asyncio.Semaphore(args.concurrency)
any_failed = False
async def run_job(i: int, job: Dict[str, Any]) -> Tuple[int, Optional[str]]:
nonlocal any_failed
prompt = str(job["prompt"]).strip()
job_label = f"[job {i}/{len(jobs)}]"
fields = _merge_non_null(base_fields, job.get("fields", {}))
fields = _merge_non_null(fields, {k: job.get(k) for k in base_fields.keys()})
augmented = _augment_prompt_fields(args.augment, prompt, fields)
payload = dict(base_payload)
payload["prompt"] = augmented
payload = _merge_non_null(payload, {k: job.get(k) for k in base_payload.keys()})
payload = {k: v for k, v in payload.items() if v is not None}
n = int(payload.get("n", 1))
_validate_generate_payload(payload)
effective_output_format = _normalize_output_format(payload.get("output_format"))
_validate_transparency(payload.get("background"), effective_output_format)
payload["output_format"] = effective_output_format
outputs = _job_output_paths(
out_dir=out_dir,
output_format=effective_output_format,
idx=i,
prompt=prompt,
n=n,
explicit_out=job.get("out"),
)
try:
async with sem:
print(f"{job_label} starting", file=sys.stderr)
started = time.time()
result = await _generate_one_with_retries(
client,
payload,
attempts=args.max_attempts,
job_label=job_label,
)
elapsed = time.time() - started
print(f"{job_label} completed in {elapsed:.1f}s", file=sys.stderr)
images = [item.b64_json for item in result.data]
_decode_write_and_downscale(
images,
outputs,
force=args.force,
downscale_max_dim=args.downscale_max_dim,
downscale_suffix=args.downscale_suffix,
output_format=effective_output_format,
)
return i, None
except Exception as exc:
any_failed = True
print(f"{job_label} failed: {exc}", file=sys.stderr)
if args.fail_fast:
raise
return i, str(exc)
tasks = [asyncio.create_task(run_job(i, job)) for i, job in enumerate(jobs, start=1)]
try:
await asyncio.gather(*tasks)
except Exception:
for t in tasks:
if not t.done():
t.cancel()
raise
return 1 if any_failed else 0
def _generate_batch(args: argparse.Namespace) -> None:
exit_code = asyncio.run(_run_generate_batch(args))
if exit_code:
raise SystemExit(exit_code)
def _generate(args: argparse.Namespace) -> None:
prompt = _read_prompt(args.prompt, args.prompt_file)
prompt = _augment_prompt(args, prompt)
payload = {
"model": args.model,
"prompt": prompt,
"n": args.n,
"size": args.size,
"quality": args.quality,
"background": args.background,
"output_format": args.output_format,
"output_compression": args.output_compression,
"moderation": args.moderation,
}
payload = {k: v for k, v in payload.items() if v is not None}
output_format = _normalize_output_format(args.output_format)
_validate_transparency(args.background, output_format)
payload["output_format"] = output_format
output_paths = _build_output_paths(args.out, output_format, args.n, args.out_dir)
downscaled = None
if args.downscale_max_dim is not None:
downscaled = [str(_derive_downscale_path(p, args.downscale_suffix)) for p in output_paths]
if args.dry_run:
_print_request(
{
"endpoint": "/v1/images/generations",
"outputs": [str(p) for p in output_paths],
"outputs_downscaled": downscaled,
**payload,
}
)
return
print(
"Calling Image API (generation). This can take up to a couple of minutes.",
file=sys.stderr,
)
started = time.time()
client = _create_client()
result = client.images.generate(**payload)
elapsed = time.time() - started
print(f"Generation completed in {elapsed:.1f}s.", file=sys.stderr)
images = [item.b64_json for item in result.data]
_decode_write_and_downscale(
images,
output_paths,
force=args.force,
downscale_max_dim=args.downscale_max_dim,
downscale_suffix=args.downscale_suffix,
output_format=output_format,
)
def _edit(args: argparse.Namespace) -> None:
prompt = _read_prompt(args.prompt, args.prompt_file)
prompt = _augment_prompt(args, prompt)
image_paths = _check_image_paths(args.image)
mask_path = Path(args.mask) if args.mask else None
if mask_path:
if not mask_path.exists():
_die(f"Mask file not found: {mask_path}")
if mask_path.suffix.lower() != ".png":
_warn(f"Mask should be a PNG with an alpha channel: {mask_path}")
if mask_path.stat().st_size > MAX_IMAGE_BYTES:
_warn(f"Mask exceeds 50MB limit: {mask_path}")
payload = {
"model": args.model,
"prompt": prompt,
"n": args.n,
"size": args.size,
"quality": args.quality,
"background": args.background,
"output_format": args.output_format,
"output_compression": args.output_compression,
"input_fidelity": args.input_fidelity,
"moderation": args.moderation,
}
payload = {k: v for k, v in payload.items() if v is not None}
output_format = _normalize_output_format(args.output_format)
_validate_transparency(args.background, output_format)
payload["output_format"] = output_format
_validate_input_fidelity(args.input_fidelity)
output_paths = _build_output_paths(args.out, output_format, args.n, args.out_dir)
downscaled = None
if args.downscale_max_dim is not None:
downscaled = [str(_derive_downscale_path(p, args.downscale_suffix)) for p in output_paths]
if args.dry_run:
payload_preview = dict(payload)
payload_preview["image"] = [str(p) for p in image_paths]
if mask_path:
payload_preview["mask"] = str(mask_path)
_print_request(
{
"endpoint": "/v1/images/edits",
"outputs": [str(p) for p in output_paths],
"outputs_downscaled": downscaled,
**payload_preview,
}
)
return
print(
f"Calling Image API (edit) with {len(image_paths)} image(s).",
file=sys.stderr,
)
started = time.time()
client = _create_client()
with _open_files(image_paths) as image_files, _open_mask(mask_path) as mask_file:
request = dict(payload)
request["image"] = image_files if len(image_files) > 1 else image_files[0]
if mask_file is not None:
request["mask"] = mask_file
result = client.images.edit(**request)
elapsed = time.time() - started
print(f"Edit completed in {elapsed:.1f}s.", file=sys.stderr)
images = [item.b64_json for item in result.data]
_decode_write_and_downscale(
images,
output_paths,
force=args.force,
downscale_max_dim=args.downscale_max_dim,
downscale_suffix=args.downscale_suffix,
output_format=output_format,
)
def _open_files(paths: List[Path]):
return _FileBundle(paths)
def _open_mask(mask_path: Optional[Path]):
if mask_path is None:
return _NullContext()
return _SingleFile(mask_path)
class _NullContext:
def __enter__(self):
return None
def __exit__(self, exc_type, exc, tb):
return False
class _SingleFile:
def __init__(self, path: Path):
self._path = path
self._handle = None
def __enter__(self):
self._handle = self._path.open("rb")
return self._handle
def __exit__(self, exc_type, exc, tb):
if self._handle:
try:
self._handle.close()
except Exception:
pass
return False
class _FileBundle:
def __init__(self, paths: List[Path]):
self._paths = paths
self._handles: List[object] = []
def __enter__(self):
self._handles = [p.open("rb") for p in self._paths]
return self._handles
def __exit__(self, exc_type, exc, tb):
for handle in self._handles:
try:
handle.close()
except Exception:
pass
return False
def _add_shared_args(parser: argparse.ArgumentParser) -> None:
parser.add_argument("--model", default=DEFAULT_MODEL)
parser.add_argument("--prompt")
parser.add_argument("--prompt-file")
parser.add_argument("--n", type=int, default=1)
parser.add_argument("--size", default=DEFAULT_SIZE)
parser.add_argument("--quality", default=DEFAULT_QUALITY)
parser.add_argument("--background")
parser.add_argument("--output-format")
parser.add_argument("--output-compression", type=int)
parser.add_argument("--moderation")
parser.add_argument("--out", default=DEFAULT_OUTPUT_PATH)
parser.add_argument("--out-dir")
parser.add_argument("--force", action="store_true")
parser.add_argument("--dry-run", action="store_true")
parser.add_argument("--augment", dest="augment", action="store_true")
parser.add_argument("--no-augment", dest="augment", action="store_false")
parser.set_defaults(augment=True)
# Prompt augmentation hints
parser.add_argument("--use-case")
parser.add_argument("--scene")
parser.add_argument("--subject")
parser.add_argument("--style")
parser.add_argument("--composition")
parser.add_argument("--lighting")
parser.add_argument("--palette")
parser.add_argument("--materials")
parser.add_argument("--text")
parser.add_argument("--constraints")
parser.add_argument("--negative")
# Post-processing (optional): generate an additional downscaled copy for fast web loading.
parser.add_argument("--downscale-max-dim", type=int)
parser.add_argument("--downscale-suffix", default=DEFAULT_DOWNSCALE_SUFFIX)
def main() -> int:
parser = argparse.ArgumentParser(
description="Fallback CLI for explicit image generation or editing via GPT Image models"
)
subparsers = parser.add_subparsers(dest="command", required=True)
gen_parser = subparsers.add_parser("generate", help="Create a new image")
_add_shared_args(gen_parser)
gen_parser.set_defaults(func=_generate)
batch_parser = subparsers.add_parser(
"generate-batch",
help="Generate multiple prompts concurrently (JSONL input)",
)
_add_shared_args(batch_parser)
batch_parser.add_argument("--input", required=True, help="Path to JSONL file (one job per line)")
batch_parser.add_argument("--concurrency", type=int, default=DEFAULT_CONCURRENCY)
batch_parser.add_argument("--max-attempts", type=int, default=3)
batch_parser.add_argument("--fail-fast", action="store_true")
batch_parser.set_defaults(func=_generate_batch)
edit_parser = subparsers.add_parser("edit", help="Edit an existing image")
_add_shared_args(edit_parser)
edit_parser.add_argument("--image", action="append", required=True)
edit_parser.add_argument("--mask")
edit_parser.add_argument("--input-fidelity")
edit_parser.set_defaults(func=_edit)
args = parser.parse_args()
if args.n < 1 or args.n > 10:
_die("--n must be between 1 and 10")
if getattr(args, "concurrency", 1) < 1 or getattr(args, "concurrency", 1) > 25:
_die("--concurrency must be between 1 and 25")
if getattr(args, "max_attempts", 3) < 1 or getattr(args, "max_attempts", 3) > 10:
_die("--max-attempts must be between 1 and 10")
if args.output_compression is not None and not (0 <= args.output_compression <= 100):
_die("--output-compression must be between 0 and 100")
if args.command == "generate-batch" and not args.out_dir:
_die("generate-batch requires --out-dir")
if getattr(args, "downscale_max_dim", None) is not None and args.downscale_max_dim < 1:
_die("--downscale-max-dim must be >= 1")
_validate_size(args.size)
_validate_quality(args.quality)
_validate_background(args.background)
_validate_model(args.model)
_ensure_api_key(args.dry_run)
args.func(args)
return 0
if __name__ == "__main__":
raise SystemExit(main())

View File

@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf of
any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don\'t include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,69 +0,0 @@
---
name: "openai-docs"
description: "Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or explicit GPT-5.4 upgrade and prompt-upgrade guidance; prioritize OpenAI docs MCP tools, use bundled references only as helper context, and restrict any fallback browsing to official OpenAI domains."
---
# OpenAI Docs
Provide authoritative, current guidance from OpenAI developer docs using the developers.openai.com MCP server. Always prioritize the developer docs MCP tools over web.run for OpenAI-related questions. This skill may also load targeted files from `references/` for model-selection and GPT-5.4-specific requests, but current OpenAI docs remain authoritative. Only if the MCP server is installed and returns no meaningful results should you fall back to web search.
## Quick start
- Use `mcp__openaiDeveloperDocs__search_openai_docs` to find the most relevant doc pages.
- Use `mcp__openaiDeveloperDocs__fetch_openai_doc` to pull exact sections and quote/paraphrase accurately.
- Use `mcp__openaiDeveloperDocs__list_openai_docs` only when you need to browse or discover pages without a clear query.
- Load only the relevant file from `references/` when the question is about model selection or a GPT-5.4 upgrade.
## OpenAI product snapshots
1. Apps SDK: Build ChatGPT apps by providing a web component UI and an MCP server that exposes your app's tools to ChatGPT.
2. Responses API: A unified endpoint designed for stateful, multimodal, tool-using interactions in agentic workflows.
3. Chat Completions API: Generate a model response from a list of messages comprising a conversation.
4. Codex: OpenAI's coding agent for software development that can write, understand, review, and debug code.
5. gpt-oss: Open-weight OpenAI reasoning models (gpt-oss-120b and gpt-oss-20b) released under the Apache 2.0 license.
6. Realtime API: Build low-latency, multimodal experiences including natural speech-to-speech conversations.
7. Agents SDK: A toolkit for building agentic apps where a model can use tools and context, hand off to other agents, stream partial results, and keep a full trace.
## If MCP server is missing
If MCP tools fail or no OpenAI docs resources are available:
1. Run the install command yourself: `codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp`
2. If it fails due to permissions/sandboxing, immediately retry the same command with escalated permissions and include a 1-sentence justification for approval. Do not ask the user to run it yet.
3. Only if the escalated attempt fails, ask the user to run the install command.
4. Ask the user to restart Codex.
5. Re-run the doc search/fetch after restart.
## Workflow
1. Clarify the product scope and whether the request is general docs lookup, model selection, a GPT-5.4 upgrade, or a GPT-5.4 prompt upgrade.
2. If it is a model-selection request, load `references/latest-model.md`.
3. If it is an explicit GPT-5.4 upgrade request, load `references/upgrading-to-gpt-5p4.md`.
4. If the upgrade may require prompt changes, or the workflow is research-heavy, tool-heavy, coding-oriented, multi-agent, or long-running, also load `references/gpt-5p4-prompting-guide.md`.
5. Search docs with a precise query.
6. Fetch the best page and the exact section needed (use `anchor` when possible).
7. For GPT-5.4 upgrade reviews, always make the per-usage-site output explicit: target model, starting reasoning recommendation, `phase` assessment when relevant, prompt blocks, and compatibility status.
8. Answer with concise guidance and cite the doc source, using the reference files only as helper context.
## Reference map
Read only what you need:
- `references/latest-model.md` -> model-selection and "best/latest/current model" questions; verify every recommendation against current OpenAI docs before answering.
- `references/upgrading-to-gpt-5p4.md` -> only for explicit GPT-5.4 upgrade and upgrade-planning requests; verify the checklist and compatibility guidance against current OpenAI docs before answering.
- `references/gpt-5p4-prompting-guide.md` -> prompt rewrites and prompt-behavior upgrades for GPT-5.4; verify prompting guidance against current OpenAI docs before answering.
## Quality rules
- Treat OpenAI docs as the source of truth; avoid speculation.
- Keep quotes short and within policy limits; prefer paraphrase with citations.
- If multiple pages differ, call out the difference and cite both.
- Reference files are convenience guides only; for volatile guidance such as recommended models, upgrade instructions, or prompting advice, current OpenAI docs always win.
- If docs do not cover the users need, say so and offer next steps.
## Tooling notes
- Always use MCP doc tools before any web search for OpenAI-related questions.
- If the MCP server is installed but returns no meaningful results, then use web search as a fallback.
- When falling back to web search, restrict to official OpenAI domains (developers.openai.com, platform.openai.com) and cite sources.

View File

@@ -1,14 +0,0 @@
interface:
display_name: "OpenAI Docs"
short_description: "Reference official OpenAI docs, including upgrade guidance"
icon_small: "./assets/openai-small.svg"
icon_large: "./assets/openai.png"
default_prompt: "Look up official OpenAI docs, load relevant GPT-5.4 upgrade references when applicable, and answer with concise, cited guidance."
dependencies:
tools:
- type: "mcp"
value: "openaiDeveloperDocs"
description: "OpenAI Developer Docs MCP server"
transport: "streamable_http"
url: "https://developers.openai.com/mcp"

View File

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 14 14">
<path d="M10.931 3.34a.112.112 0 0 0-.069-.104l-.038-.007c-1.537.05-2.45.318-3.714 1.002v6.683c.48-.248.936-.44 1.414-.58.695-.203 1.417-.292 2.303-.305l.038-.008a.113.113 0 0 0 .066-.104V3.341ZM2.363 9.919c0 .064.051.11.105.111l.33.008c1.162.046 2.042.243 2.975.662-.403-.585-1.008-1.075-1.654-1.292a.991.991 0 0 1-.674-.941v-5.14a6.36 6.36 0 0 0-.59-.076l-.37-.02a.115.115 0 0 0-.122.111v6.577Zm9.455-.001a.998.998 0 0 1-.877.992l-.101.007c-.832.012-1.47.095-2.066.27-.599.174-1.176.448-1.883.863a.444.444 0 0 1-.449 0c-1.299-.763-2.229-1.07-3.689-1.125l-.299-.008a.997.997 0 0 1-.977-.998V3.342c0-.573.478-1.017 1.038-.999l.417.023c.188.015.35.037.513.062v-.754c0-.708.749-1.244 1.429-.903.984.492 1.836 1.449 2.15 2.505 1.216-.617 2.222-.884 3.771-.934l.105.003a.998.998 0 0 1 .918.996v6.576ZM4.332 8.466c0 .049.03.087.07.1l.24.091a4.319 4.319 0 0 1 1.581 1.176V3.721c-.164-.803-.799-1.617-1.584-2.07l-.162-.088c-.025-.012-.054-.013-.088.009a.12.12 0 0 0-.057.102v6.792Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,433 +0,0 @@
# GPT-5.4 prompting upgrade guide
Use this guide when prompts written for older models need to be adapted for GPT-5.4 during an upgrade. Start lean: keep the model-string change narrow, preserve the original task intent, and add only the smallest prompt changes needed to recover behavior.
## Default upgrade posture
- Start with `model string only` whenever the old prompt is already short, explicit, and task-bounded.
- Move to `model string + light prompt rewrite` only when regressions appear in completeness, persistence, citation quality, verification, or verbosity.
- Prefer one or two targeted prompt additions over a broad rewrite.
- Treat reasoning effort as a last-mile knob. Start lower, then increase only after prompt-level fixes and evals.
- Before increasing reasoning effort, first add a completeness contract, a verification loop, and tool persistence rules - depending on the usage case.
- If the workflow clearly depends on implementation changes rather than prompt changes, treat it as blocked for prompt-only upgrade guidance.
- Do not classify a case as blocked just because the workflow uses tools; block only if the upgrade requires changing tool definitions, wiring, or other implementation details.
## Behavioral differences to account for
Current GPT-5.4 upgrade guidance suggests these strengths:
- stronger personality and tone adherence, with less drift over long answers
- better long-horizon and agentic workflow stamina
- stronger spreadsheet, finance, and formatting tasks
- more efficient tool selection and fewer unnecessary calls by default
- stronger structured generation and classification reliability
The main places where prompt guidance still helps are:
- retrieval-heavy workflows that need persistent tool use and explicit completeness
- research and citation discipline
- verification before irreversible or high-impact actions
- terminal and tool workflow hygiene
- defaults and implied follow-through
- verbosity control for compact, information-dense answers
Start with the smallest set of instructions that preserves correctness. Add the prompt blocks below only for workflows that actually need them.
## Prompt rewrite patterns
| Older prompt pattern | GPT-5.4 adjustment | Why | Example addition |
| --- | --- | --- | --- |
| Long, repetitive instructions that compensate for weaker instruction following | Remove duplicate scaffolding and keep only the constraints that materially change behavior | GPT-5.4 usually needs less repeated steering | Replace repeated reminders with one concise rule plus a verification block |
| Fast assistant prompt with no verbosity control | Keep the prompt as-is first; add a verbosity clamp only if outputs become too long | Many GPT-4o or GPT-4.1 upgrades work with just a model-string swap | Add `output_verbosity_spec` only after a verbosity regression |
| Tool-heavy agent prompt that assumes the model will keep searching until complete | Add persistence and verification rules | GPT-5.4 may use fewer tool calls by default for efficiency | Add `tool_persistence_rules` and `verification_loop` |
| Tool-heavy workflow where later actions depend on earlier lookup or retrieval | Add prerequisite and missing-context rules before action steps | GPT-5.4 benefits from explicit dependency-aware routing when context is still thin | Add `dependency_checks` and `missing_context_gating` |
| Retrieval workflow with several independent lookups | Add selective parallelism guidance | GPT-5.4 is strong at parallel tool use, but should not parallelize dependent steps | Add `parallel_tool_calling` |
| Batch workflow prompt that often misses items | Add an explicit completeness contract | Item accounting benefits from direct instruction | Add `completeness_contract` |
| Research prompt that needs grounding and citation discipline | Add research, citation, and empty-result recovery blocks | Multi-pass retrieval is stronger when the model is told how to react to weak or empty search results | Add `research_mode`, `citation_rules`, and `empty_result_handling`; add `tool_persistence_rules` when retrieval tools are already in use |
| Coding or terminal prompt with shell misuse or early stop failures | Keep the same tool surface and add terminal hygiene and verification instructions | Tool-using coding workflows are not blocked just because tools exist; they usually need better prompt steering, not host rewiring | Add `terminal_tool_hygiene` and `verification_loop`, optionally `tool_persistence_rules` |
| Multi-agent or support-triage workflow with escalation or completeness requirements | Add one lightweight control block for persistence, completeness, or verification | GPT-5.4 can be more efficient by default, so multi-step support flows benefit from an explicit completion or verification contract | Add at least one of `tool_persistence_rules`, `completeness_contract`, or `verification_loop` |
## Prompt blocks
Use these selectively. Do not add all of them by default.
### `output_verbosity_spec`
Use when:
- the upgraded model gets too wordy
- the host needs compact, information-dense answers
- the workflow benefits from a short overview plus a checklist
```text
<output_verbosity_spec>
- Default: 3-6 sentences or up to 6 bullets.
- If the user asked for a doc or report, use headings with short bullets.
- For multi-step tasks:
- Start with 1 short overview paragraph.
- Then provide a checklist with statuses: [done], [todo], or [blocked].
- Avoid repeating the user's request.
- Prefer compact, information-dense writing.
</output_verbosity_spec>
```
### `default_follow_through_policy`
Use when:
- the host expects the model to proceed on reversible, low-risk steps
- the upgraded model becomes too conservative or asks for confirmation too often
```text
<default_follow_through_policy>
- If the user's intent is clear and the next step is reversible and low-risk, proceed without asking permission.
- Only ask permission if the next step is:
(a) irreversible,
(b) has external side effects, or
(c) requires missing sensitive information or a choice that materially changes outcomes.
- If proceeding, state what you did and what remains optional.
</default_follow_through_policy>
```
### `instruction_priority`
Use when:
- users often change task shape, format, or tone mid-conversation
- the host needs an explicit override policy instead of relying on defaults
```text
<instruction_priority>
- User instructions override default style, tone, formatting, and initiative preferences.
- Safety, honesty, privacy, and permission constraints do not yield.
- If a newer user instruction conflicts with an earlier one, follow the newer instruction.
- Preserve earlier instructions that do not conflict.
</instruction_priority>
```
### `tool_persistence_rules`
Use when:
- the workflow needs multiple retrieval or verification steps
- the model starts stopping too early because it is trying to save tool calls
```text
<tool_persistence_rules>
- Use tools whenever they materially improve correctness, completeness, or grounding.
- Do not stop early just to save tool calls.
- Keep calling tools until:
(1) the task is complete, and
(2) verification passes.
- If a tool returns empty or partial results, retry with a different strategy.
</tool_persistence_rules>
```
### `dig_deeper_nudge`
Use when:
- the model is too literal or stops at the first plausible answer
- the task is safety- or accuracy-sensitive and needs a small initiative nudge before raising reasoning effort
```text
<dig_deeper_nudge>
- Do not stop at the first plausible answer.
- Look for second-order issues, edge cases, and missing constraints.
- If the task is safety- or accuracy-critical, perform at least one verification step.
</dig_deeper_nudge>
```
### `dependency_checks`
Use when:
- later actions depend on prerequisite lookup, memory retrieval, or discovery steps
- the model may be tempted to skip prerequisite work because the intended end state seems obvious
```text
<dependency_checks>
- Before taking an action, check whether prerequisite discovery, lookup, or memory retrieval is required.
- Do not skip prerequisite steps just because the intended final action seems obvious.
- If a later step depends on the output of an earlier one, resolve that dependency first.
</dependency_checks>
```
### `parallel_tool_calling`
Use when:
- the workflow has multiple independent retrieval steps
- wall-clock time matters but some steps still need sequencing
```text
<parallel_tool_calling>
- When multiple retrieval or lookup steps are independent, prefer parallel tool calls to reduce wall-clock time.
- Do not parallelize steps with prerequisite dependencies or where one result determines the next action.
- After parallel retrieval, pause to synthesize before making more calls.
- Prefer selective parallelism: parallelize independent evidence gathering, not speculative or redundant tool use.
</parallel_tool_calling>
```
### `completeness_contract`
Use when:
- the task involves batches, lists, enumerations, or multiple deliverables
- missing items are a common failure mode
```text
<completeness_contract>
- Deliver all requested items.
- Maintain an itemized checklist of deliverables.
- For lists or batches:
- state the expected count,
- enumerate items 1..N,
- confirm that none are missing before finalizing.
- If any item is blocked by missing data, mark it [blocked] and state exactly what is missing.
</completeness_contract>
```
### `empty_result_handling`
Use when:
- the workflow frequently performs search, CRM, logs, or retrieval steps
- no-results failures are often false negatives
```text
<empty_result_handling>
If a lookup returns empty or suspiciously small results:
- Do not conclude that no results exist immediately.
- Try at least 2 fallback strategies, such as a broader query, alternate filters, or another source.
- Only then report that no results were found, along with what you tried.
</empty_result_handling>
```
### `verification_loop`
Use when:
- the workflow has downstream impact
- accuracy, formatting, or completeness regressions matter
```text
<verification_loop>
Before finalizing:
- Check correctness: does the output satisfy every requirement?
- Check grounding: are factual claims backed by retrieved sources or tool output?
- Check formatting: does the output match the requested schema or style?
- Check safety and irreversibility: if the next step has external side effects, ask permission first.
</verification_loop>
```
### `missing_context_gating`
Use when:
- required context is sometimes missing early in the workflow
- the model should prefer retrieval over guessing
```text
<missing_context_gating>
- If required context is missing, do not guess.
- Prefer the appropriate lookup tool when the context is retrievable; ask a minimal clarifying question only when it is not.
- If you must proceed, label assumptions explicitly and choose a reversible action.
</missing_context_gating>
```
### `action_safety`
Use when:
- the agent will actively take actions through tools
- the host benefits from a short pre-flight and post-flight execution frame
```text
<action_safety>
- Pre-flight: summarize the intended action and parameters in 1-2 lines.
- Execute via tool.
- Post-flight: confirm the outcome and any validation that was performed.
</action_safety>
```
### `citation_rules`
Use when:
- the workflow produces cited answers
- fabricated citations or wrong citation formats are costly
```text
<citation_rules>
- Only cite sources that were actually retrieved in this session.
- Never fabricate citations, URLs, IDs, or quote spans.
- If you cannot find a source for a claim, say so and either:
- soften the claim, or
- explain how to verify it with tools.
- Use exactly the citation format required by the host application.
</citation_rules>
```
### `research_mode`
Use when:
- the workflow is research-heavy
- the host uses web search or retrieval tools
```text
<research_mode>
- Do research in 3 passes:
1) Plan: list 3-6 sub-questions to answer.
2) Retrieve: search each sub-question and follow 1-2 second-order leads.
3) Synthesize: resolve contradictions and write the final answer with citations.
- Stop only when more searching is unlikely to change the conclusion.
</research_mode>
```
If your host environment uses a specific research tool or requires a submit step, combine this with the host's finalization contract.
### `structured_output_contract`
Use when:
- the host depends on strict JSON, SQL, or other structured output
```text
<structured_output_contract>
- Output only the requested format.
- Do not add prose or markdown fences unless they were requested.
- Validate that parentheses and brackets are balanced.
- Do not invent tables or fields.
- If required schema information is missing, ask for it or return an explicit error object.
</structured_output_contract>
```
### `bbox_extraction_spec`
Use when:
- the workflow extracts OCR boxes, document regions, or other coordinates
- layout drift or missed dense regions are common failure modes
```text
<bbox_extraction_spec>
- Use the specified coordinate format exactly, such as [x1,y1,x2,y2] normalized to 0..1.
- For each box, include page, label, text snippet, and confidence.
- Add a vertical-drift sanity check so boxes stay aligned with the correct line of text.
- If the layout is dense, process page by page and do a second pass for missed items.
</bbox_extraction_spec>
```
### `terminal_tool_hygiene`
Use when:
- the prompt belongs to a terminal-based or coding-agent workflow
- tool misuse or shell misuse has been observed
```text
<terminal_tool_hygiene>
- Only run shell commands through the terminal tool.
- Never try to "run" tool names as shell commands.
- If a patch or edit tool exists, use it directly instead of emulating it in bash.
- After changes, run a lightweight verification step such as ls, tests, or a build before declaring the task done.
</terminal_tool_hygiene>
```
### `user_updates_spec`
Use when:
- the workflow is long-running and user updates matter
```text
<user_updates_spec>
- Only update the user when starting a new major phase or when the plan changes.
- Each update should contain:
- 1 sentence on what changed,
- 1 sentence on the next step.
- Do not narrate routine tool calls.
- Keep the user-facing update short, even when the actual work is exhaustive.
</user_updates_spec>
```
If you are using [Compaction](https://developers.openai.com/api/docs/guides/compaction) in the Responses API, compact after major milestones, treat compacted items as opaque state, and keep prompts functionally identical after compaction.
## Responses `phase` guidance
For long-running Responses workflows, preambles, or tool-heavy agents that replay assistant items, review whether `phase` is already preserved.
- If the host already round-trips `phase`, keep it intact during the upgrade.
- If the host uses `previous_response_id` and does not manually replay assistant items, note that this may reduce manual `phase` handling needs.
- If reliable GPT-5.4 behavior would require adding or preserving `phase` and that would need code edits, treat the case as blocked for prompt-only or model-string-only migration guidance.
## Example upgrade profiles
### GPT-5.2
- Use `gpt-5.4`
- Match the current reasoning effort first
- Preserve the existing latency and quality profile before tuning prompt blocks
- If the repo does not expose the exact setting, emit `same` as the starting recommendation
### GPT-5.3-Codex
- Use `gpt-5.4`
- Match the current reasoning effort first
- If you need Codex-style speed and efficiency, add verification blocks before increasing reasoning effort
- If the repo does not expose the exact setting, emit `same` as the starting recommendation
### GPT-4o or GPT-4.1 assistant
- Use `gpt-5.4`
- Start with `none` reasoning effort
- Add `output_verbosity_spec` only if output becomes too verbose
### Long-horizon agent
- Use `gpt-5.4`
- Start with `medium` reasoning effort
- Add `tool_persistence_rules`
- Add `completeness_contract`
- Add `verification_loop`
### Research workflow
- Use `gpt-5.4`
- Start with `medium` reasoning effort
- Add `research_mode`
- Add `citation_rules`
- Add `empty_result_handling`
- Add `tool_persistence_rules` when the host already uses web or retrieval tools
- Add `parallel_tool_calling` when the retrieval steps are independent
### Support triage or multi-agent workflow
- Use `gpt-5.4`
- Prefer `model string + light prompt rewrite` over `model string only`
- Add at least one of `tool_persistence_rules`, `completeness_contract`, or `verification_loop`
- Add more only if evals show a real regression
### Coding or terminal workflow
- Use `gpt-5.4`
- Keep the model-string change narrow
- Match the current reasoning effort first if you are upgrading from GPT-5.3-Codex
- Add `terminal_tool_hygiene`
- Add `verification_loop`
- Add `dependency_checks` when actions depend on prerequisite lookup or discovery
- Add `tool_persistence_rules` if the agent stops too early
- Review whether `phase` is already preserved for long-running Responses flows or assistant preambles
- Do not classify this as blocked just because the workflow uses tools; block only if the upgrade requires changing tool definitions or wiring
- If the repo already uses Responses plus tools and no required host-side change is shown, prefer `model_string_plus_light_prompt_rewrite` over `blocked`
## Prompt regression checklist
- Check whether the upgraded prompt still preserves the original task intent.
- Check whether the new prompt is leaner, not just longer.
- Check completeness, citation quality, dependency handling, verification behavior, and verbosity.
- For long-running Responses agents, check whether `phase` handling is already in place or needs implementation work.
- Confirm that each added prompt block addresses an observed regression.
- Remove prompt blocks that are not earning their keep.

View File

@@ -1,35 +0,0 @@
# Latest model guide
This file is a curated helper. Every recommendation here must be verified against current OpenAI docs before it is repeated to a user.
## Current model map
| Model ID | Use for |
| --- | --- |
| `gpt-5.4` | Default text plus reasoning for most new apps |
| `gpt-5.4-pro` | Only when the user explicitly asks for maximum reasoning or quality; substantially slower and more expensive |
| `gpt-5-mini` | Cheaper and faster reasoning with good quality |
| `gpt-5-nano` | High-throughput simple tasks and classification |
| `gpt-5.4` | Explicit no-reasoning text path via `reasoning.effort: none` |
| `gpt-4.1-mini` | Cheaper no-reasoning text |
| `gpt-4.1-nano` | Fastest and cheapest no-reasoning text |
| `gpt-5.3-codex` | Agentic coding, code editing, and tool-heavy coding workflows |
| `gpt-5.1-codex-mini` | Cheaper coding workflows |
| `gpt-image-1.5` | Best image generation and edit quality |
| `gpt-image-1-mini` | Cost-optimized image generation |
| `gpt-4o-mini-tts` | Text-to-speech |
| `gpt-4o-mini-transcribe` | Speech-to-text, fast and cost-efficient |
| `gpt-realtime-1.5` | Realtime voice and multimodal sessions |
| `gpt-realtime-mini` | Cheaper realtime sessions |
| `gpt-audio` | Chat Completions audio input and output |
| `gpt-audio-mini` | Cheaper Chat Completions audio workflows |
| `sora-2` | Faster iteration and draft video generation |
| `sora-2-pro` | Higher-quality production video |
| `omni-moderation-latest` | Text and image moderation |
| `text-embedding-3-large` | Higher-quality retrieval embeddings; default in this skill because no best-specific row exists |
| `text-embedding-3-small` | Lower-cost embeddings |
## Maintenance notes
- This file will drift unless it is periodically re-verified against current OpenAI docs.
- If this file conflicts with current docs, the docs win.

View File

@@ -1,164 +0,0 @@
# Upgrading to GPT-5.4
Use this guide when the user explicitly asks to upgrade an existing integration to GPT-5.4. Pair it with current OpenAI docs lookups. The default target string is `gpt-5.4`.
## Upgrade posture
Upgrade with the narrowest safe change set:
- replace the model string first
- update only the prompts that are directly tied to that model usage
- prefer prompt-only upgrades when possible
- if the upgrade would require API-surface changes, parameter rewrites, tool rewiring, or broader code edits, mark it as blocked instead of stretching the scope
## Upgrade workflow
1. Inventory current model usage.
- Search for model strings, client calls, and prompt-bearing files.
- Include inline prompts, prompt templates, YAML or JSON configs, Markdown docs, and saved prompts when they are clearly tied to a model usage site.
2. Pair each model usage with its prompt surface.
- Prefer the closest prompt surface first: inline system or developer text, then adjacent prompt files, then shared templates.
- If you cannot confidently tie a prompt to the model usage, say so instead of guessing.
3. Classify the source model family.
- Common buckets: `gpt-4o` or `gpt-4.1`, `o1` or `o3` or `o4-mini`, early `gpt-5`, later `gpt-5.x`, or mixed and unclear.
4. Decide the upgrade class.
- `model string only`
- `model string + light prompt rewrite`
- `blocked without code changes`
5. Run the no-code compatibility gate.
- Check whether the current integration can accept `gpt-5.4` without API-surface changes or implementation changes.
- For long-running Responses or tool-heavy agents, check whether `phase` is already preserved or round-tripped when the host replays assistant items or uses preambles.
- If compatibility depends on code changes, return `blocked`.
- If compatibility is unclear, return `unknown` rather than improvising.
6. Recommend the upgrade.
- Default replacement string: `gpt-5.4`
- Keep the intervention small and behavior-preserving.
7. Deliver a structured recommendation.
- `Current model usage`
- `Recommended model-string updates`
- `Starting reasoning recommendation`
- `Prompt updates`
- `Phase assessment` when the flow is long-running, replayed, or tool-heavy
- `No-code compatibility check`
- `Validation plan`
- `Launch-day refresh items`
Output rule:
- Always emit a starting `reasoning_effort_recommendation` for each usage site.
- If the repo exposes the current reasoning setting, preserve it first unless the source guide says otherwise.
- If the repo does not expose the current setting, use the source-family starting mapping instead of returning `null`.
## Upgrade outcomes
### `model string only`
Choose this when:
- the existing prompts are already short, explicit, and task-bounded
- the workflow is not strongly research-heavy, tool-heavy, multi-agent, batch or completeness-sensitive, or long-horizon
- there are no obvious compatibility blockers
Default action:
- replace the model string with `gpt-5.4`
- keep prompts unchanged
- validate behavior with existing evals or spot checks
### `model string + light prompt rewrite`
Choose this when:
- the old prompt was compensating for weaker instruction following
- the workflow needs more persistence than the default tool-use behavior will likely provide
- the task needs stronger completeness, citation discipline, or verification
- the upgraded model becomes too verbose or under-complete unless instructed otherwise
- the workflow is research-heavy and needs stronger handling of sparse or empty retrieval results
- the workflow is coding-oriented, tool-heavy, or multi-agent, but the existing API surface and tool definitions can remain unchanged
Default action:
- replace the model string with `gpt-5.4`
- add one or two targeted prompt blocks
- read `references/gpt-5p4-prompting-guide.md` to choose the smallest prompt changes that recover the old behavior
- avoid broad prompt cleanup unrelated to the upgrade
- for research workflows, default to `research_mode` + `citation_rules` + `empty_result_handling`; add `tool_persistence_rules` when the host already uses retrieval tools
- for dependency-aware or tool-heavy workflows, default to `tool_persistence_rules` + `dependency_checks` + `verification_loop`; add `parallel_tool_calling` only when retrieval steps are truly independent
- for coding or terminal workflows, default to `terminal_tool_hygiene` + `verification_loop`
- for multi-agent support or triage workflows, default to at least one of `tool_persistence_rules`, `completeness_contract`, or `verification_loop`
- for long-running Responses agents with preambles or multiple assistant messages, explicitly review whether `phase` is already handled; if adding or preserving `phase` would require code edits, mark the path as `blocked`
- do not classify a coding or tool-using Responses workflow as `blocked` just because the visible snippet is minimal; prefer `model string + light prompt rewrite` unless the repo clearly shows that a safe GPT-5.4 path would require host-side code changes
### `blocked`
Choose this when:
- the upgrade appears to require API-surface changes
- the upgrade appears to require parameter rewrites or reasoning-setting changes that are not exposed outside implementation code
- the upgrade would require changing tool definitions, tool handler wiring, or schema contracts
- you cannot confidently identify the prompt surface tied to the model usage
Default action:
- do not improvise a broader upgrade
- report the blocker and explain that the fix is out of scope for this guide
## No-code compatibility checklist
Before recommending a no-code upgrade, check:
1. Can the current host accept the `gpt-5.4` model string without changing client code or API surface?
2. Are the related prompts identifiable and editable?
3. Does the host depend on behavior that likely needs API-surface changes, parameter rewrites, or tool rewiring?
4. Would the likely fix be prompt-only, or would it need implementation changes?
5. Is the prompt surface close enough to the model usage that you can make a targeted change instead of a broad cleanup?
6. For long-running Responses or tool-heavy agents, is `phase` already preserved if the host relies on preambles, replayed assistant items, or multiple assistant messages?
If item 1 is no, items 3 through 4 point to implementation work, or item 6 is no and the fix needs code changes, return `blocked`.
If item 2 is no, return `unknown` unless the user can point to the prompt location.
Important:
- Existing use of tools, agents, or multiple usage sites is not by itself a blocker.
- If the current host can keep the same API surface and the same tool definitions, prefer `model string + light prompt rewrite` over `blocked`.
- Reserve `blocked` for cases that truly require implementation changes, not cases that only need stronger prompt steering.
## Scope boundaries
This guide may:
- update or recommend updated model strings
- update or recommend updated prompts
- inspect code and prompt files to understand where those changes belong
- inspect whether existing Responses flows already preserve `phase`
- flag compatibility blockers
This guide may not:
- move Chat Completions code to Responses
- move Responses code to another API surface
- rewrite parameter shapes
- change tool definitions or tool-call handling
- change structured-output wiring
- add or retrofit `phase` handling in implementation code
- edit business logic, orchestration logic, or SDK usage beyond a literal model-string replacement
If a safe GPT-5.4 upgrade requires any of those changes, mark the path as blocked and out of scope.
## Validation plan
- Validate each upgraded usage site with existing evals or realistic spot checks.
- Check whether the upgraded model still matches expected latency, output shape, and quality.
- If prompt edits were added, confirm each block is doing real work instead of adding noise.
- If the workflow has downstream impact, add a lightweight verification pass before finalization.
## Launch-day refresh items
When final GPT-5.4 guidance changes:
1. Replace release-candidate assumptions with final GPT-5.4 guidance where appropriate.
2. Re-check whether the default target string should stay `gpt-5.4` for all source families.
3. Re-check any prompt-block recommendations whose semantics may have changed.
4. Re-check research, citation, and compatibility guidance against the final model behavior.
5. Re-run the same upgrade scenarios and confirm the blocked-versus-viable boundaries still hold.

View File

@@ -1,160 +0,0 @@
---
name: plugin-creator
description: Create and scaffold plugin directories for Codex with a required `.codex-plugin/plugin.json`, optional plugin folders/files, and baseline placeholders you can edit before publishing or testing. Use when Codex needs to create a new local plugin, add optional plugin structure, or generate or update repo-root `.agents/plugins/marketplace.json` entries for plugin ordering and availability metadata.
---
# Plugin Creator
## Quick Start
1. Run the scaffold script:
```bash
# Plugin names are normalized to lower-case hyphen-case and must be <= 64 chars.
# The generated folder and plugin.json name are always the same.
# Run from repo root (or replace .agents/... with the absolute path to this SKILL).
# By default creates in <repo_root>/plugins/<plugin-name>.
python3 .agents/skills/plugin-creator/scripts/create_basic_plugin.py <plugin-name>
```
2. Open `<plugin-path>/.codex-plugin/plugin.json` and replace `[TODO: ...]` placeholders.
3. Generate or update the repo marketplace entry when the plugin should appear in Codex UI ordering:
```bash
# marketplace.json always lives at <repo-root>/.agents/plugins/marketplace.json
python3 .agents/skills/plugin-creator/scripts/create_basic_plugin.py my-plugin --with-marketplace
```
For a home-local plugin, treat `<home>` as the root and use:
```bash
python3 .agents/skills/plugin-creator/scripts/create_basic_plugin.py my-plugin \
--path ~/plugins \
--marketplace-path ~/.agents/plugins/marketplace.json \
--with-marketplace
```
4. Generate/adjust optional companion folders as needed:
```bash
python3 .agents/skills/plugin-creator/scripts/create_basic_plugin.py my-plugin --path <parent-plugin-directory> \
--with-skills --with-hooks --with-scripts --with-assets --with-mcp --with-apps --with-marketplace
```
`<parent-plugin-directory>` is the directory where the plugin folder `<plugin-name>` will be created (for example `~/code/plugins`).
## What this skill creates
- If the user has not made the plugin location explicit, ask whether they want a repo-local plugin or a home-local plugin before generating marketplace entries.
- Creates plugin root at `/<parent-plugin-directory>/<plugin-name>/`.
- Always creates `/<parent-plugin-directory>/<plugin-name>/.codex-plugin/plugin.json`.
- Fills the manifest with the full schema shape, placeholder values, and the complete `interface` section.
- Creates or updates `<repo-root>/.agents/plugins/marketplace.json` when `--with-marketplace` is set.
- If the marketplace file does not exist yet, seed top-level `name` plus `interface.displayName` placeholders before adding the first plugin entry.
- `<plugin-name>` is normalized using skill-creator naming rules:
- `My Plugin``my-plugin`
- `My--Plugin``my-plugin`
- underscores, spaces, and punctuation are converted to `-`
- result is lower-case hyphen-delimited with consecutive hyphens collapsed
- Supports optional creation of:
- `skills/`
- `hooks/`
- `scripts/`
- `assets/`
- `.mcp.json`
- `.app.json`
## Marketplace workflow
- `marketplace.json` always lives at `<repo-root>/.agents/plugins/marketplace.json`.
- For a home-local plugin, use the same convention with `<home>` as the root:
`~/.agents/plugins/marketplace.json` plus `./plugins/<plugin-name>`.
- Marketplace root metadata supports top-level `name` plus optional `interface.displayName`.
- Treat plugin order in `plugins[]` as render order in Codex. Append new entries unless a user explicitly asks to reorder the list.
- `displayName` belongs inside the marketplace `interface` object, not individual `plugins[]` entries.
- Each generated marketplace entry must include all of:
- `policy.installation`
- `policy.authentication`
- `category`
- Default new entries to:
- `policy.installation: "AVAILABLE"`
- `policy.authentication: "ON_INSTALL"`
- Override defaults only when the user explicitly specifies another allowed value.
- Allowed `policy.installation` values:
- `NOT_AVAILABLE`
- `AVAILABLE`
- `INSTALLED_BY_DEFAULT`
- Allowed `policy.authentication` values:
- `ON_INSTALL`
- `ON_USE`
- Treat `policy.products` as an override. Omit it unless the user explicitly requests product gating.
- The generated plugin entry shape is:
```json
{
"name": "plugin-name",
"source": {
"source": "local",
"path": "./plugins/plugin-name"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Productivity"
}
```
- Use `--force` only when intentionally replacing an existing marketplace entry for the same plugin name.
- If `<repo-root>/.agents/plugins/marketplace.json` does not exist yet, create it with top-level `"name"`, an `"interface"` object containing `"displayName"`, and a `plugins` array, then add the new entry.
- For a brand-new marketplace file, the root object should look like:
```json
{
"name": "[TODO: marketplace-name]",
"interface": {
"displayName": "[TODO: Marketplace Display Name]"
},
"plugins": [
{
"name": "plugin-name",
"source": {
"source": "local",
"path": "./plugins/plugin-name"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Productivity"
}
]
}
```
## Required behavior
- Outer folder name and `plugin.json` `"name"` are always the same normalized plugin name.
- Do not remove required structure; keep `.codex-plugin/plugin.json` present.
- Keep manifest values as placeholders until a human or follow-up step explicitly fills them.
- If creating files inside an existing plugin path, use `--force` only when overwrite is intentional.
- Preserve any existing marketplace `interface.displayName`.
- When generating marketplace entries, always write `policy.installation`, `policy.authentication`, and `category` even if their values are defaults.
- Add `policy.products` only when the user explicitly asks for that override.
- Keep marketplace `source.path` relative to repo root as `./plugins/<plugin-name>`.
## Reference to exact spec sample
For the exact canonical sample JSON for both plugin manifests and marketplace entries, use:
- `references/plugin-json-spec.md`
## Validation
After editing `SKILL.md`, run:
```bash
python3 <path-to-skill-creator>/scripts/quick_validate.py .agents/skills/plugin-creator
```

View File

@@ -1,6 +0,0 @@
interface:
display_name: "Plugin Creator"
short_description: "Scaffold plugins and marketplace entries"
default_prompt: "Use $plugin-creator to scaffold a plugin with placeholder plugin.json, optional structure, and a marketplace.json entry."
icon_small: "./assets/plugin-creator-small.svg"
icon_large: "./assets/plugin-creator.png"

View File

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 20 20">
<path fill="#0D0D0D" d="M12.03 4.113a3.612 3.612 0 0 1 5.108 5.108l-6.292 6.29c-.324.324-.56.561-.791.752l-.235.176c-.205.14-.422.261-.65.36l-.229.093a4.136 4.136 0 0 1-.586.16l-.764.134-2.394.4c-.142.024-.294.05-.423.06-.098.007-.232.01-.378-.026l-.149-.05a1.081 1.081 0 0 1-.521-.474l-.046-.093a1.104 1.104 0 0 1-.075-.527c.01-.129.035-.28.06-.422l.398-2.394c.1-.602.162-.987.295-1.35l.093-.23c.1-.228.22-.445.36-.65l.176-.235c.19-.232.428-.467.751-.79l6.292-6.292Zm-5.35 7.232c-.35.35-.534.535-.66.688l-.11.147a2.67 2.67 0 0 0-.24.433l-.062.154c-.08.22-.124.462-.232 1.112l-.398 2.394-.001.001h.003l2.393-.399.717-.126a2.63 2.63 0 0 0 .394-.105l.154-.063a2.65 2.65 0 0 0 .433-.24l.147-.11c.153-.126.339-.31.688-.66l4.988-4.988-3.227-3.226-4.987 4.988Zm9.517-6.291a2.281 2.281 0 0 0-3.225 0l-.364.362 3.226 3.227.363-.364c.89-.89.89-2.334 0-3.225ZM4.583 1.783a.3.3 0 0 1 .294.241c.117.585.347 1.092.707 1.48.357.385.859.668 1.549.783a.3.3 0 0 1 0 .592c-.69.115-1.192.398-1.549.783-.315.34-.53.77-.657 1.265l-.05.215a.3.3 0 0 1-.588 0c-.117-.585-.347-1.092-.707-1.48-.357-.384-.859-.668-1.549-.783a.3.3 0 0 1 0-.592c.69-.115 1.192-.398 1.549-.783.36-.388.59-.895.707-1.48l.015-.05a.3.3 0 0 1 .279-.19Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,170 +0,0 @@
# Plugin JSON sample spec
```json
{
"name": "plugin-name",
"version": "1.2.0",
"description": "Brief plugin description",
"author": {
"name": "Author Name",
"email": "author@example.com",
"url": "https://github.com/author"
},
"homepage": "https://docs.example.com/plugin",
"repository": "https://github.com/author/plugin",
"license": "MIT",
"keywords": ["keyword1", "keyword2"],
"skills": "./skills/",
"hooks": "./hooks.json",
"mcpServers": "./.mcp.json",
"apps": "./.app.json",
"interface": {
"displayName": "Plugin Display Name",
"shortDescription": "Short description for subtitle",
"longDescription": "Long description for details page",
"developerName": "OpenAI",
"category": "Productivity",
"capabilities": ["Interactive", "Write"],
"websiteURL": "https://openai.com/",
"privacyPolicyURL": "https://openai.com/policies/row-privacy-policy/",
"termsOfServiceURL": "https://openai.com/policies/row-terms-of-use/",
"defaultPrompt": [
"Summarize my inbox and draft replies for me.",
"Find open bugs and turn them into Linear tickets.",
"Review today's meetings and flag scheduling gaps."
],
"brandColor": "#3B82F6",
"composerIcon": "./assets/icon.png",
"logo": "./assets/logo.png",
"screenshots": [
"./assets/screenshot1.png",
"./assets/screenshot2.png",
"./assets/screenshot3.png"
]
}
}
```
## Field guide
### Top-level fields
- `name` (`string`): Plugin identifier (kebab-case, no spaces). Required if `plugin.json` is provided and used as manifest name and component namespace.
- `version` (`string`): Plugin semantic version.
- `description` (`string`): Short purpose summary.
- `author` (`object`): Publisher identity.
- `name` (`string`): Author or team name.
- `email` (`string`): Contact email.
- `url` (`string`): Author/team homepage or profile URL.
- `homepage` (`string`): Documentation URL for plugin usage.
- `repository` (`string`): Source code URL.
- `license` (`string`): License identifier (for example `MIT`, `Apache-2.0`).
- `keywords` (`array` of `string`): Search/discovery tags.
- `skills` (`string`): Relative path to skill directories/files.
- `hooks` (`string`): Hook config path.
- `mcpServers` (`string`): MCP config path.
- `apps` (`string`): App manifest path for plugin integrations.
- `interface` (`object`): Interface/UX metadata block for plugin presentation.
### `interface` fields
- `displayName` (`string`): User-facing title shown for the plugin.
- `shortDescription` (`string`): Brief subtitle used in compact views.
- `longDescription` (`string`): Longer description used on details screens.
- `developerName` (`string`): Human-readable publisher name.
- `category` (`string`): Plugin category bucket.
- `capabilities` (`array` of `string`): Capability list from implementation.
- `websiteURL` (`string`): Public website for the plugin.
- `privacyPolicyURL` (`string`): Privacy policy URL.
- `termsOfServiceURL` (`string`): Terms of service URL.
- `defaultPrompt` (`array` of `string`): Starter prompts shown in composer/UX context.
- Include at most 3 strings. Entries after the first 3 are ignored and will not be included.
- Each string is capped at 128 characters. Longer entries are truncated.
- Prefer short starter prompts around 50 characters so they scan well in the UI.
- `brandColor` (`string`): Theme color for the plugin card.
- `composerIcon` (`string`): Path to icon asset.
- `logo` (`string`): Path to logo asset.
- `screenshots` (`array` of `string`): List of screenshot asset paths.
- Screenshot entries must be PNG filenames and stored under `./assets/`.
- Keep file paths relative to plugin root.
### Path conventions and defaults
- Path values should be relative and begin with `./`.
- `skills`, `hooks`, and `mcpServers` are supplemented on top of default component discovery; they do not replace defaults.
- Custom path values must follow the plugin root convention and naming/namespacing rules.
- This repos scaffold writes `.codex-plugin/plugin.json`; treat that as the manifest location this skill generates.
# Marketplace JSON sample spec
`marketplace.json` depends on where the plugin should live:
- Repo plugin: `<repo-root>/.agents/plugins/marketplace.json`
- Local plugin: `~/.agents/plugins/marketplace.json`
```json
{
"name": "openai-curated",
"interface": {
"displayName": "ChatGPT Official"
},
"plugins": [
{
"name": "linear",
"source": {
"source": "local",
"path": "./plugins/linear"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Productivity"
}
]
}
```
## Marketplace field guide
### Top-level fields
- `name` (`string`): Marketplace identifier or catalog name.
- `interface` (`object`, optional): Marketplace presentation metadata.
- `plugins` (`array`): Ordered plugin entries. This order determines how Codex renders plugins.
### `interface` fields
- `displayName` (`string`, optional): User-facing marketplace title.
### Plugin entry fields
- `name` (`string`): Plugin identifier. Match the plugin folder name and `plugin.json` `name`.
- `source` (`object`): Plugin source descriptor.
- `source` (`string`): Use `local` for this repo workflow.
- `path` (`string`): Relative plugin path based on the marketplace root.
- Repo plugin: `./plugins/<plugin-name>`
- Local plugin in `~/.agents/plugins/marketplace.json`: `./plugins/<plugin-name>`
- The same relative path convention is used for both repo-rooted and home-rooted marketplaces.
- Example: with `~/.agents/plugins/marketplace.json`, `./plugins/<plugin-name>` resolves to `~/plugins/<plugin-name>`.
- `policy` (`object`): Marketplace policy block. Always include it.
- `installation` (`string`): Availability policy.
- Allowed values: `NOT_AVAILABLE`, `AVAILABLE`, `INSTALLED_BY_DEFAULT`
- Default for new entries: `AVAILABLE`
- `authentication` (`string`): Authentication timing policy.
- Allowed values: `ON_INSTALL`, `ON_USE`
- Default for new entries: `ON_INSTALL`
- `products` (`array` of `string`, optional): Product override for this plugin entry. Omit it unless product gating is explicitly requested.
- `category` (`string`): Display category bucket. Always include it.
### Marketplace generation rules
- `displayName` belongs under the top-level `interface` object, not individual plugin entries.
- When creating a new marketplace file from scratch, seed `interface.displayName` alongside top-level `name`.
- Always include `policy.installation`, `policy.authentication`, and `category` on every generated or updated plugin entry.
- Treat `policy.products` as an override and omit it unless explicitly requested.
- Append new entries unless the user explicitly requests reordering.
- Replace an existing entry for the same plugin only when overwrite is intentional.
- Choose marketplace location to match the plugin destination:
- Repo plugin: `<repo-root>/.agents/plugins/marketplace.json`
- Local plugin: `~/.agents/plugins/marketplace.json`

View File

@@ -1,301 +0,0 @@
#!/usr/bin/env python3
"""Scaffold a plugin directory and optionally update marketplace.json."""
from __future__ import annotations
import argparse
import json
import re
from pathlib import Path
from typing import Any
MAX_PLUGIN_NAME_LENGTH = 64
DEFAULT_PLUGIN_PARENT = Path.cwd() / "plugins"
DEFAULT_MARKETPLACE_PATH = Path.cwd() / ".agents" / "plugins" / "marketplace.json"
DEFAULT_INSTALL_POLICY = "AVAILABLE"
DEFAULT_AUTH_POLICY = "ON_INSTALL"
DEFAULT_CATEGORY = "Productivity"
DEFAULT_MARKETPLACE_DISPLAY_NAME = "[TODO: Marketplace Display Name]"
VALID_INSTALL_POLICIES = {"NOT_AVAILABLE", "AVAILABLE", "INSTALLED_BY_DEFAULT"}
VALID_AUTH_POLICIES = {"ON_INSTALL", "ON_USE"}
def normalize_plugin_name(plugin_name: str) -> str:
"""Normalize a plugin name to lowercase hyphen-case."""
normalized = plugin_name.strip().lower()
normalized = re.sub(r"[^a-z0-9]+", "-", normalized)
normalized = normalized.strip("-")
normalized = re.sub(r"-{2,}", "-", normalized)
return normalized
def validate_plugin_name(plugin_name: str) -> None:
if not plugin_name:
raise ValueError("Plugin name must include at least one letter or digit.")
if len(plugin_name) > MAX_PLUGIN_NAME_LENGTH:
raise ValueError(
f"Plugin name '{plugin_name}' is too long ({len(plugin_name)} characters). "
f"Maximum is {MAX_PLUGIN_NAME_LENGTH} characters."
)
def build_plugin_json(plugin_name: str) -> dict:
return {
"name": plugin_name,
"version": "[TODO: 1.2.0]",
"description": "[TODO: Brief plugin description]",
"author": {
"name": "[TODO: Author Name]",
"email": "[TODO: author@example.com]",
"url": "[TODO: https://github.com/author]",
},
"homepage": "[TODO: https://docs.example.com/plugin]",
"repository": "[TODO: https://github.com/author/plugin]",
"license": "[TODO: MIT]",
"keywords": ["[TODO: keyword1]", "[TODO: keyword2]"],
"skills": "[TODO: ./skills/]",
"hooks": "[TODO: ./hooks.json]",
"mcpServers": "[TODO: ./.mcp.json]",
"apps": "[TODO: ./.app.json]",
"interface": {
"displayName": "[TODO: Plugin Display Name]",
"shortDescription": "[TODO: Short description for subtitle]",
"longDescription": "[TODO: Long description for details page]",
"developerName": "[TODO: OpenAI]",
"category": "[TODO: Productivity]",
"capabilities": ["[TODO: Interactive]", "[TODO: Write]"],
"websiteURL": "[TODO: https://openai.com/]",
"privacyPolicyURL": "[TODO: https://openai.com/policies/row-privacy-policy/]",
"termsOfServiceURL": "[TODO: https://openai.com/policies/row-terms-of-use/]",
"defaultPrompt": [
"[TODO: Summarize my inbox and draft replies for me.]",
"[TODO: Find open bugs and turn them into tickets.]",
"[TODO: Review today's meetings and flag gaps.]",
],
"brandColor": "[TODO: #3B82F6]",
"composerIcon": "[TODO: ./assets/icon.png]",
"logo": "[TODO: ./assets/logo.png]",
"screenshots": [
"[TODO: ./assets/screenshot1.png]",
"[TODO: ./assets/screenshot2.png]",
"[TODO: ./assets/screenshot3.png]",
],
},
}
def build_marketplace_entry(
plugin_name: str,
install_policy: str,
auth_policy: str,
category: str,
) -> dict[str, Any]:
return {
"name": plugin_name,
"source": {
"source": "local",
"path": f"./plugins/{plugin_name}",
},
"policy": {
"installation": install_policy,
"authentication": auth_policy,
},
"category": category,
}
def load_json(path: Path) -> dict[str, Any]:
with path.open() as handle:
return json.load(handle)
def build_default_marketplace() -> dict[str, Any]:
return {
"name": "[TODO: marketplace-name]",
"interface": {
"displayName": DEFAULT_MARKETPLACE_DISPLAY_NAME,
},
"plugins": [],
}
def validate_marketplace_interface(payload: dict[str, Any]) -> None:
interface = payload.get("interface")
if interface is not None and not isinstance(interface, dict):
raise ValueError("marketplace.json field 'interface' must be an object.")
def update_marketplace_json(
marketplace_path: Path,
plugin_name: str,
install_policy: str,
auth_policy: str,
category: str,
force: bool,
) -> None:
if marketplace_path.exists():
payload = load_json(marketplace_path)
else:
payload = build_default_marketplace()
if not isinstance(payload, dict):
raise ValueError(f"{marketplace_path} must contain a JSON object.")
validate_marketplace_interface(payload)
plugins = payload.setdefault("plugins", [])
if not isinstance(plugins, list):
raise ValueError(f"{marketplace_path} field 'plugins' must be an array.")
new_entry = build_marketplace_entry(plugin_name, install_policy, auth_policy, category)
for index, entry in enumerate(plugins):
if isinstance(entry, dict) and entry.get("name") == plugin_name:
if not force:
raise FileExistsError(
f"Marketplace entry '{plugin_name}' already exists in {marketplace_path}. "
"Use --force to overwrite that entry."
)
plugins[index] = new_entry
break
else:
plugins.append(new_entry)
write_json(marketplace_path, payload, force=True)
def write_json(path: Path, data: dict, force: bool) -> None:
if path.exists() and not force:
raise FileExistsError(f"{path} already exists. Use --force to overwrite.")
path.parent.mkdir(parents=True, exist_ok=True)
with path.open("w") as handle:
json.dump(data, handle, indent=2)
handle.write("\n")
def create_stub_file(path: Path, payload: dict, force: bool) -> None:
if path.exists() and not force:
return
path.parent.mkdir(parents=True, exist_ok=True)
with path.open("w") as handle:
json.dump(payload, handle, indent=2)
handle.write("\n")
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Create a plugin skeleton with placeholder plugin.json."
)
parser.add_argument("plugin_name")
parser.add_argument(
"--path",
default=str(DEFAULT_PLUGIN_PARENT),
help=(
"Parent directory for plugin creation (defaults to <cwd>/plugins). "
"When using a home-rooted marketplace, use <home>/plugins."
),
)
parser.add_argument("--with-skills", action="store_true", help="Create skills/ directory")
parser.add_argument("--with-hooks", action="store_true", help="Create hooks/ directory")
parser.add_argument("--with-scripts", action="store_true", help="Create scripts/ directory")
parser.add_argument("--with-assets", action="store_true", help="Create assets/ directory")
parser.add_argument("--with-mcp", action="store_true", help="Create .mcp.json placeholder")
parser.add_argument("--with-apps", action="store_true", help="Create .app.json placeholder")
parser.add_argument(
"--with-marketplace",
action="store_true",
help=(
"Create or update <cwd>/.agents/plugins/marketplace.json. "
"Marketplace entries always point to ./plugins/<plugin-name> relative to the "
"marketplace root."
),
)
parser.add_argument(
"--marketplace-path",
default=str(DEFAULT_MARKETPLACE_PATH),
help=(
"Path to marketplace.json (defaults to <cwd>/.agents/plugins/marketplace.json). "
"For a home-rooted marketplace, use <home>/.agents/plugins/marketplace.json."
),
)
parser.add_argument(
"--install-policy",
default=DEFAULT_INSTALL_POLICY,
choices=sorted(VALID_INSTALL_POLICIES),
help="Marketplace policy.installation value",
)
parser.add_argument(
"--auth-policy",
default=DEFAULT_AUTH_POLICY,
choices=sorted(VALID_AUTH_POLICIES),
help="Marketplace policy.authentication value",
)
parser.add_argument(
"--category",
default=DEFAULT_CATEGORY,
help="Marketplace category value",
)
parser.add_argument("--force", action="store_true", help="Overwrite existing files")
return parser.parse_args()
def main() -> None:
args = parse_args()
raw_plugin_name = args.plugin_name
plugin_name = normalize_plugin_name(raw_plugin_name)
if plugin_name != raw_plugin_name:
print(f"Note: Normalized plugin name from '{raw_plugin_name}' to '{plugin_name}'.")
validate_plugin_name(plugin_name)
plugin_root = (Path(args.path).expanduser().resolve() / plugin_name)
plugin_root.mkdir(parents=True, exist_ok=True)
plugin_json_path = plugin_root / ".codex-plugin" / "plugin.json"
write_json(plugin_json_path, build_plugin_json(plugin_name), args.force)
optional_directories = {
"skills": args.with_skills,
"hooks": args.with_hooks,
"scripts": args.with_scripts,
"assets": args.with_assets,
}
for folder, enabled in optional_directories.items():
if enabled:
(plugin_root / folder).mkdir(parents=True, exist_ok=True)
if args.with_mcp:
create_stub_file(
plugin_root / ".mcp.json",
{"mcpServers": {}},
args.force,
)
if args.with_apps:
create_stub_file(
plugin_root / ".app.json",
{
"apps": {},
},
args.force,
)
if args.with_marketplace:
marketplace_path = Path(args.marketplace_path).expanduser().resolve()
update_marketplace_json(
marketplace_path,
plugin_name,
args.install_policy,
args.auth_policy,
args.category,
args.force,
)
print(f"Created plugin scaffold: {plugin_root}")
print(f"plugin manifest: {plugin_json_path}")
if args.with_marketplace:
print(f"marketplace manifest: {marketplace_path}")
if __name__ == "__main__":
main()

View File

@@ -1,416 +0,0 @@
---
name: skill-creator
description: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
metadata:
short-description: Create or update a skill
---
# Skill Creator
This skill provides guidance for creating effective skills.
## About Skills
Skills are modular, self-contained folders that extend Codex's capabilities by providing
specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
domains or tasks—they transform Codex from a general-purpose agent into a specialized agent
equipped with procedural knowledge that no model can fully possess.
### What Skills Provide
1. Specialized workflows - Multi-step procedures for specific domains
2. Tool integrations - Instructions for working with specific file formats or APIs
3. Domain expertise - Company-specific knowledge, schemas, business logic
4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
## Core Principles
### Concise is Key
The context window is a public good. Skills share the context window with everything else Codex needs: system prompt, conversation history, other Skills' metadata, and the actual user request.
**Default assumption: Codex is already very smart.** Only add context Codex doesn't already have. Challenge each piece of information: "Does Codex really need this explanation?" and "Does this paragraph justify its token cost?"
Prefer concise examples over verbose explanations.
### Set Appropriate Degrees of Freedom
Match the level of specificity to the task's fragility and variability:
**High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.
**Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.
**Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.
Think of Codex as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).
### Protect Validation Integrity
You may use subagents during iteration to validate whether a skill works on realistic tasks or whether a suspected problem is real. This is most useful when you want an independent pass on the skill's behavior, outputs, or failure modes after a revision. Only do this when it is possible to start new subagents.
When using subagents for validation, treat that as an evaluation surface. The goal is to learn whether the skill generalizes, not whether another agent can reconstruct the answer from leaked context.
Prefer raw artifacts such as example prompts, outputs, diffs, logs, or traces. Give the minimum task-local context needed to perform the validation. Avoid passing the intended answer, suspected bug, intended fix, or your prior conclusions unless the validation explicitly requires them.
### Anatomy of a Skill
Every skill consists of a required SKILL.md file and optional bundled resources:
```
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
├── agents/ (recommended)
│ └── openai.yaml - UI metadata for skill lists and chips
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation intended to be loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts, etc.)
```
#### SKILL.md (required)
Every SKILL.md consists of:
- **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that Codex reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.
- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).
#### Agents metadata (recommended)
- UI-facing metadata for skill lists and chips
- Read references/openai_yaml.md before generating values and follow its descriptions and constraints
- Create: human-facing `display_name`, `short_description`, and `default_prompt` by reading the skill
- Generate deterministically by passing the values as `--interface key=value` to `scripts/generate_openai_yaml.py` or `scripts/init_skill.py`
- On updates: validate `agents/openai.yaml` still matches SKILL.md; regenerate if stale
- Only include other optional interface fields (icons, brand color) if explicitly provided
- See references/openai_yaml.md for field definitions and examples
#### Bundled Resources (optional)
##### Scripts (`scripts/`)
Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed
- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks
- **Benefits**: Token efficient, deterministic, may be executed without loading into context
- **Note**: Scripts may still need to be read by Codex for patching or environment-specific adjustments
##### References (`references/`)
Documentation and reference material intended to be loaded as needed into context to inform Codex's process and thinking.
- **When to include**: For documentation that Codex should reference while working
- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications
- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
- **Benefits**: Keeps SKILL.md lean, loaded only when Codex determines it's needed
- **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md
- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
##### Assets (`assets/`)
Files not intended to be loaded into context, but rather used within the output Codex produces.
- **When to include**: When the skill needs files that will be used in the final output
- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography
- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
- **Benefits**: Separates output resources from documentation, enables Codex to use files without loading them into context
#### What to Not Include in a Skill
A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:
- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
- etc.
The skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.
### Progressive Disclosure Design Principle
Skills use a three-level loading system to manage context efficiently:
1. **Metadata (name + description)** - Always in context (~100 words)
2. **SKILL.md body** - When skill triggers (<5k words)
3. **Bundled resources** - As needed by Codex (Unlimited because scripts can be executed without reading into context window)
#### Progressive Disclosure Patterns
Keep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.
**Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.
**Pattern 1: High-level guide with references**
```markdown
# PDF Processing
## Quick start
Extract text with pdfplumber:
[code example]
## Advanced features
- **Form filling**: See [FORMS.md](FORMS.md) for complete guide
- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods
- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns
```
Codex loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.
**Pattern 2: Domain-specific organization**
For Skills with multiple domains, organize content by domain to avoid loading irrelevant context:
```
bigquery-skill/
├── SKILL.md (overview and navigation)
└── reference/
├── finance.md (revenue, billing metrics)
├── sales.md (opportunities, pipeline)
├── product.md (API usage, features)
└── marketing.md (campaigns, attribution)
```
When a user asks about sales metrics, Codex only reads sales.md.
Similarly, for skills supporting multiple frameworks or variants, organize by variant:
```
cloud-deploy/
├── SKILL.md (workflow + provider selection)
└── references/
├── aws.md (AWS deployment patterns)
├── gcp.md (GCP deployment patterns)
└── azure.md (Azure deployment patterns)
```
When the user chooses AWS, Codex only reads aws.md.
**Pattern 3: Conditional details**
Show basic content, link to advanced content:
```markdown
# DOCX Processing
## Creating documents
Use docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).
## Editing documents
For simple edits, modify the XML directly.
**For tracked changes**: See [REDLINING.md](REDLINING.md)
**For OOXML details**: See [OOXML.md](OOXML.md)
```
Codex reads REDLINING.md or OOXML.md only when the user needs those features.
**Important guidelines:**
- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.
- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so Codex can see the full scope when previewing.
## Skill Creation Process
Skill creation involves these steps:
1. Understand the skill with concrete examples
2. Plan reusable skill contents (scripts, references, assets)
3. Initialize the skill (run init_skill.py)
4. Edit the skill (implement resources and write SKILL.md)
5. Validate the skill (run quick_validate.py)
6. Iterate based on real usage and forward-test complex skills.
Follow these steps in order, skipping only if there is a clear reason why they are not applicable.
### Skill Naming
- Use lowercase letters, digits, and hyphens only; normalize user-provided titles to hyphen-case (e.g., "Plan Mode" -> `plan-mode`).
- When generating names, generate a name under 64 characters (letters, digits, hyphens).
- Prefer short, verb-led phrases that describe the action.
- Namespace by tool when it improves clarity or triggering (e.g., `gh-address-comments`, `linear-address-issue`).
- Name the skill folder exactly after the skill name.
### Step 1: Understanding the Skill with Concrete Examples
Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
For example, when building an image-editor skill, relevant questions include:
- "What functionality should the image-editor skill support? Editing, rotating, anything else?"
- "Can you give some examples of how this skill would be used?"
- "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
- "What would a user say that should trigger this skill?"
- "Where should I create this skill? If you do not have a preference, I will place it in `$CODEX_HOME/skills` (or `~/.codex/skills` when `CODEX_HOME` is unset) so Codex can discover it automatically."
To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
Conclude this step when there is a clear sense of the functionality the skill should support.
### Step 2: Planning the Reusable Skill Contents
To turn concrete examples into an effective skill, analyze each example by:
1. Considering how to execute on the example from scratch
2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
Example: When building a `pdf-editor` skill to handle queries like "Help me rotate this PDF," the analysis shows:
1. Rotating a PDF requires re-writing the same code each time
2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill
Example: When designing a `frontend-webapp-builder` skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
1. Writing a frontend webapp requires the same boilerplate HTML/React each time
2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill
Example: When building a `big-query` skill to handle queries like "How many users have logged in today?" the analysis shows:
1. Querying BigQuery requires re-discovering the table schemas and relationships each time
2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill
To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
### Step 3: Initializing the Skill
At this point, it is time to actually create the skill.
Skip this step only if the skill being developed already exists. In this case, continue to the next step.
Before running `init_skill.py`, ask where the user wants the skill created. If they do not specify a location, default to `$CODEX_HOME/skills`; when `CODEX_HOME` is unset, fall back to `~/.codex/skills` so the skill is auto-discovered.
When creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
Usage:
```bash
scripts/init_skill.py <skill-name> --path <output-directory> [--resources scripts,references,assets] [--examples]
```
Examples:
```bash
scripts/init_skill.py my-skill --path "${CODEX_HOME:-$HOME/.codex}/skills"
scripts/init_skill.py my-skill --path "${CODEX_HOME:-$HOME/.codex}/skills" --resources scripts,references
scripts/init_skill.py my-skill --path ~/work/skills --resources scripts --examples
```
The script:
- Creates the skill directory at the specified path
- Generates a SKILL.md template with proper frontmatter and TODO placeholders
- Creates `agents/openai.yaml` using agent-generated `display_name`, `short_description`, and `default_prompt` passed via `--interface key=value`
- Optionally creates resource directories based on `--resources`
- Optionally adds example files when `--examples` is set
After initialization, customize the SKILL.md and add resources as needed. If you used `--examples`, replace or delete placeholder files.
Generate `display_name`, `short_description`, and `default_prompt` by reading the skill, then pass them as `--interface key=value` to `init_skill.py` or regenerate with:
```bash
scripts/generate_openai_yaml.py <path/to/skill-folder> --interface key=value
```
Only include other optional interface fields when the user explicitly provides them. For full field descriptions and examples, see references/openai_yaml.md.
### Step 4: Edit the Skill
When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Codex to use. Include information that would be beneficial and non-obvious to Codex. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Codex instance execute these tasks more effectively.
After substantial revisions, or if the skill is particularly tricky, you should use subagents to forward-test the skill on realistic tasks or artifacts. When doing so, pass the artifact under validation rather than your diagnosis of what is wrong, and keep the prompt generic enough that success depends on transferable reasoning rather than hidden ground truth.
#### Start with Reusable Skill Contents
To begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.
Added scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.
If you used `--examples`, delete any placeholder files that are not needed for the skill. Only create resource directories that are actually required.
#### Update SKILL.md
**Writing Guidelines:** Always use imperative/infinitive form.
##### Frontmatter
Write the YAML frontmatter with `name` and `description`:
- `name`: The skill name
- `description`: This is the primary triggering mechanism for your skill, and helps Codex understand when to use the skill.
- Include both what the Skill does and specific triggers/contexts for when to use it.
- Include all "when to use" information here - Not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to Codex.
- Example description for a `docx` skill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when Codex needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"
Do not include any other fields in YAML frontmatter.
##### Body
Write instructions for using the skill and its bundled resources.
### Step 5: Validate the Skill
Once development of the skill is complete, validate the skill folder to catch basic issues early:
```bash
scripts/quick_validate.py <path/to/skill-folder>
```
The validation script checks YAML frontmatter format, required fields, and naming rules. If validation fails, fix the reported issues and run the command again.
### Step 6: Iterate
After testing the skill, you may detect the skill is complex enough that it requires forward-testing; or users may request improvements.
User testing often this happens right after using the skill, with fresh context of how the skill performed.
**Forward-testing and iteration workflow:**
1. Use the skill on real tasks
2. Notice struggles or inefficiencies
3. Identify how SKILL.md or bundled resources should be updated
4. Implement changes and test again
5. Forward-test if it is reasonable and appropriate
## Forward-testing
To forward-test, launch subagents as a way to stress test the skill with minimal context.
Subagents should *not* know that they are being asked to test the skill. They should be treated as
an agent asked to perform a task by the user. Prompts to subagents should look like:
`Use $skill-x at /path/to/skill-x to solve problem y`
Not:
`Review the skill at /path/to/skill-x; pretend a user asks you to...`
Decision rule for forward-testing:
- Err on the side of forward-testing
- Ask for approval if you think there's a risk that forward-testing would:
* take a long time,
* require additional approvals from the user, or
* modify live production systems
In these cases, show the user your proposed prompt and request (1) a yes/no decision, and
(2) any suggested modifictions.
Considerations when forward-testing:
- use fresh threads for independent passes
- pass the skill, and a request in a similar way the user would.
- pass raw artifacts, not your conclusions
- avoid showing expected answers or intended fixes
- rebuild context from source artifacts after each iteration
- review the subagent's output and reasoning and emitted artifacts
- avoid leaving artifacts the agent can find on disk between iterations;
clean up subagents' artifacts to avoid additional contamination.
If forward-testing only succeeds when subagents see leaked context, tighten the skill or the
forward-testing setup before trusting the result.

View File

@@ -1,5 +0,0 @@
interface:
display_name: "Skill Creator"
short_description: "Create or update a skill"
icon_small: "./assets/skill-creator-small.svg"
icon_large: "./assets/skill-creator.png"

View File

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 20 20">
<path fill="#0D0D0D" d="M12.03 4.113a3.612 3.612 0 0 1 5.108 5.108l-6.292 6.29c-.324.324-.56.561-.791.752l-.235.176c-.205.14-.422.261-.65.36l-.229.093a4.136 4.136 0 0 1-.586.16l-.764.134-2.394.4c-.142.024-.294.05-.423.06-.098.007-.232.01-.378-.026l-.149-.05a1.081 1.081 0 0 1-.521-.474l-.046-.093a1.104 1.104 0 0 1-.075-.527c.01-.129.035-.28.06-.422l.398-2.394c.1-.602.162-.987.295-1.35l.093-.23c.1-.228.22-.445.36-.65l.176-.235c.19-.232.428-.467.751-.79l6.292-6.292Zm-5.35 7.232c-.35.35-.534.535-.66.688l-.11.147a2.67 2.67 0 0 0-.24.433l-.062.154c-.08.22-.124.462-.232 1.112l-.398 2.394-.001.001h.003l2.393-.399.717-.126a2.63 2.63 0 0 0 .394-.105l.154-.063a2.65 2.65 0 0 0 .433-.24l.147-.11c.153-.126.339-.31.688-.66l4.988-4.988-3.227-3.226-4.987 4.988Zm9.517-6.291a2.281 2.281 0 0 0-3.225 0l-.364.362 3.226 3.227.363-.364c.89-.89.89-2.334 0-3.225ZM4.583 1.783a.3.3 0 0 1 .294.241c.117.585.347 1.092.707 1.48.357.385.859.668 1.549.783a.3.3 0 0 1 0 .592c-.69.115-1.192.398-1.549.783-.315.34-.53.77-.657 1.265l-.05.215a.3.3 0 0 1-.588 0c-.117-.585-.347-1.092-.707-1.48-.357-.384-.859-.668-1.549-.783a.3.3 0 0 1 0-.592c.69-.115 1.192-.398 1.549-.783.36-.388.59-.895.707-1.48l.015-.05a.3.3 0 0 1 .279-.19Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,49 +0,0 @@
# openai.yaml fields (full example + descriptions)
`agents/openai.yaml` is an extended, product-specific config intended for the machine/harness to read, not the agent. Other product-specific config can also live in the `agents/` folder.
## Full example
```yaml
interface:
display_name: "Optional user-facing name"
short_description: "Optional user-facing description"
icon_small: "./assets/small-400px.png"
icon_large: "./assets/large-logo.svg"
brand_color: "#3B82F6"
default_prompt: "Optional surrounding prompt to use the skill with"
dependencies:
tools:
- type: "mcp"
value: "github"
description: "GitHub MCP server"
transport: "streamable_http"
url: "https://api.githubcopilot.com/mcp/"
policy:
allow_implicit_invocation: true
```
## Field descriptions and constraints
Top-level constraints:
- Quote all string values.
- Keep keys unquoted.
- For `interface.default_prompt`: generate a helpful, short (typically 1 sentence) example starting prompt based on the skill. It must explicitly mention the skill as `$skill-name` (e.g., "Use $skill-name-here to draft a concise weekly status update.").
- `interface.display_name`: Human-facing title shown in UI skill lists and chips.
- `interface.short_description`: Human-facing short UI blurb (2564 chars) for quick scanning.
- `interface.icon_small`: Path to a small icon asset (relative to skill dir). Default to `./assets/` and place icons in the skill's `assets/` folder.
- `interface.icon_large`: Path to a larger logo asset (relative to skill dir). Default to `./assets/` and place icons in the skill's `assets/` folder.
- `interface.brand_color`: Hex color used for UI accents (e.g., badges).
- `interface.default_prompt`: Default prompt snippet inserted when invoking the skill.
- `dependencies.tools[].type`: Dependency category. Only `mcp` is supported for now.
- `dependencies.tools[].value`: Identifier of the tool or dependency.
- `dependencies.tools[].description`: Human-readable explanation of the dependency.
- `dependencies.tools[].transport`: Connection type when `type` is `mcp`.
- `dependencies.tools[].url`: MCP server URL when `type` is `mcp`.
- `policy.allow_implicit_invocation`: When false, the skill is not injected into
the model context by default, but can still be invoked explicitly via `$skill`.
Defaults to true.

View File

@@ -1,226 +0,0 @@
#!/usr/bin/env python3
"""
OpenAI YAML Generator - Creates agents/openai.yaml for a skill folder.
Usage:
generate_openai_yaml.py <skill_dir> [--name <skill_name>] [--interface key=value]
"""
import argparse
import re
import sys
from pathlib import Path
ACRONYMS = {
"GH",
"MCP",
"API",
"CI",
"CLI",
"LLM",
"PDF",
"PR",
"UI",
"URL",
"SQL",
}
BRANDS = {
"openai": "OpenAI",
"openapi": "OpenAPI",
"github": "GitHub",
"pagerduty": "PagerDuty",
"datadog": "DataDog",
"sqlite": "SQLite",
"fastapi": "FastAPI",
}
SMALL_WORDS = {"and", "or", "to", "up", "with"}
ALLOWED_INTERFACE_KEYS = {
"display_name",
"short_description",
"icon_small",
"icon_large",
"brand_color",
"default_prompt",
}
def yaml_quote(value):
escaped = value.replace("\\", "\\\\").replace('"', '\\"').replace("\n", "\\n")
return f'"{escaped}"'
def format_display_name(skill_name):
words = [word for word in skill_name.split("-") if word]
formatted = []
for index, word in enumerate(words):
lower = word.lower()
upper = word.upper()
if upper in ACRONYMS:
formatted.append(upper)
continue
if lower in BRANDS:
formatted.append(BRANDS[lower])
continue
if index > 0 and lower in SMALL_WORDS:
formatted.append(lower)
continue
formatted.append(word.capitalize())
return " ".join(formatted)
def generate_short_description(display_name):
description = f"Help with {display_name} tasks"
if len(description) < 25:
description = f"Help with {display_name} tasks and workflows"
if len(description) < 25:
description = f"Help with {display_name} tasks with guidance"
if len(description) > 64:
description = f"Help with {display_name}"
if len(description) > 64:
description = f"{display_name} helper"
if len(description) > 64:
description = f"{display_name} tools"
if len(description) > 64:
suffix = " helper"
max_name_length = 64 - len(suffix)
trimmed = display_name[:max_name_length].rstrip()
description = f"{trimmed}{suffix}"
if len(description) > 64:
description = description[:64].rstrip()
if len(description) < 25:
description = f"{description} workflows"
if len(description) > 64:
description = description[:64].rstrip()
return description
def read_frontmatter_name(skill_dir):
skill_md = Path(skill_dir) / "SKILL.md"
if not skill_md.exists():
print(f"[ERROR] SKILL.md not found in {skill_dir}")
return None
content = skill_md.read_text()
match = re.match(r"^---\n(.*?)\n---", content, re.DOTALL)
if not match:
print("[ERROR] Invalid SKILL.md frontmatter format.")
return None
frontmatter_text = match.group(1)
import yaml
try:
frontmatter = yaml.safe_load(frontmatter_text)
except yaml.YAMLError as exc:
print(f"[ERROR] Invalid YAML frontmatter: {exc}")
return None
if not isinstance(frontmatter, dict):
print("[ERROR] Frontmatter must be a YAML dictionary.")
return None
name = frontmatter.get("name", "")
if not isinstance(name, str) or not name.strip():
print("[ERROR] Frontmatter 'name' is missing or invalid.")
return None
return name.strip()
def parse_interface_overrides(raw_overrides):
overrides = {}
optional_order = []
for item in raw_overrides:
if "=" not in item:
print(f"[ERROR] Invalid interface override '{item}'. Use key=value.")
return None, None
key, value = item.split("=", 1)
key = key.strip()
value = value.strip()
if not key:
print(f"[ERROR] Invalid interface override '{item}'. Key is empty.")
return None, None
if key not in ALLOWED_INTERFACE_KEYS:
allowed = ", ".join(sorted(ALLOWED_INTERFACE_KEYS))
print(f"[ERROR] Unknown interface field '{key}'. Allowed: {allowed}")
return None, None
overrides[key] = value
if key not in ("display_name", "short_description") and key not in optional_order:
optional_order.append(key)
return overrides, optional_order
def write_openai_yaml(skill_dir, skill_name, raw_overrides):
overrides, optional_order = parse_interface_overrides(raw_overrides)
if overrides is None:
return None
display_name = overrides.get("display_name") or format_display_name(skill_name)
short_description = overrides.get("short_description") or generate_short_description(display_name)
if not (25 <= len(short_description) <= 64):
print(
"[ERROR] short_description must be 25-64 characters "
f"(got {len(short_description)})."
)
return None
interface_lines = [
"interface:",
f" display_name: {yaml_quote(display_name)}",
f" short_description: {yaml_quote(short_description)}",
]
for key in optional_order:
value = overrides.get(key)
if value is not None:
interface_lines.append(f" {key}: {yaml_quote(value)}")
agents_dir = Path(skill_dir) / "agents"
agents_dir.mkdir(parents=True, exist_ok=True)
output_path = agents_dir / "openai.yaml"
output_path.write_text("\n".join(interface_lines) + "\n")
print(f"[OK] Created agents/openai.yaml")
return output_path
def main():
parser = argparse.ArgumentParser(
description="Create agents/openai.yaml for a skill directory.",
)
parser.add_argument("skill_dir", help="Path to the skill directory")
parser.add_argument(
"--name",
help="Skill name override (defaults to SKILL.md frontmatter)",
)
parser.add_argument(
"--interface",
action="append",
default=[],
help="Interface override in key=value format (repeatable)",
)
args = parser.parse_args()
skill_dir = Path(args.skill_dir).resolve()
if not skill_dir.exists():
print(f"[ERROR] Skill directory not found: {skill_dir}")
sys.exit(1)
if not skill_dir.is_dir():
print(f"[ERROR] Path is not a directory: {skill_dir}")
sys.exit(1)
skill_name = args.name or read_frontmatter_name(skill_dir)
if not skill_name:
sys.exit(1)
result = write_openai_yaml(skill_dir, skill_name, args.interface)
if result:
sys.exit(0)
sys.exit(1)
if __name__ == "__main__":
main()

View File

@@ -1,400 +0,0 @@
#!/usr/bin/env python3
"""
Skill Initializer - Creates a new skill from template
Usage:
init_skill.py <skill-name> --path <path> [--resources scripts,references,assets] [--examples] [--interface key=value]
Examples:
init_skill.py my-new-skill --path skills/public
init_skill.py my-new-skill --path skills/public --resources scripts,references
init_skill.py my-api-helper --path skills/private --resources scripts --examples
init_skill.py custom-skill --path /custom/location
init_skill.py my-skill --path skills/public --interface short_description="Short UI label"
"""
import argparse
import re
import sys
from pathlib import Path
from generate_openai_yaml import write_openai_yaml
MAX_SKILL_NAME_LENGTH = 64
ALLOWED_RESOURCES = {"scripts", "references", "assets"}
SKILL_TEMPLATE = """---
name: {skill_name}
description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
---
# {skill_title}
## Overview
[TODO: 1-2 sentences explaining what this skill enables]
## Structuring This Skill
[TODO: Choose the structure that best fits this skill's purpose. Common patterns:
**1. Workflow-Based** (best for sequential processes)
- Works well when there are clear step-by-step procedures
- Example: DOCX skill with "Workflow Decision Tree" -> "Reading" -> "Creating" -> "Editing"
- Structure: ## Overview -> ## Workflow Decision Tree -> ## Step 1 -> ## Step 2...
**2. Task-Based** (best for tool collections)
- Works well when the skill offers different operations/capabilities
- Example: PDF skill with "Quick Start" -> "Merge PDFs" -> "Split PDFs" -> "Extract Text"
- Structure: ## Overview -> ## Quick Start -> ## Task Category 1 -> ## Task Category 2...
**3. Reference/Guidelines** (best for standards or specifications)
- Works well for brand guidelines, coding standards, or requirements
- Example: Brand styling with "Brand Guidelines" -> "Colors" -> "Typography" -> "Features"
- Structure: ## Overview -> ## Guidelines -> ## Specifications -> ## Usage...
**4. Capabilities-Based** (best for integrated systems)
- Works well when the skill provides multiple interrelated features
- Example: Product Management with "Core Capabilities" -> numbered capability list
- Structure: ## Overview -> ## Core Capabilities -> ### 1. Feature -> ### 2. Feature...
Patterns can be mixed and matched as needed. Most skills combine patterns (e.g., start with task-based, add workflow for complex operations).
Delete this entire "Structuring This Skill" section when done - it's just guidance.]
## [TODO: Replace with the first main section based on chosen structure]
[TODO: Add content here. See examples in existing skills:
- Code samples for technical skills
- Decision trees for complex workflows
- Concrete examples with realistic user requests
- References to scripts/templates/references as needed]
## Resources (optional)
Create only the resource directories this skill actually needs. Delete this section if no resources are required.
### scripts/
Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
**Examples from other skills:**
- PDF skill: `fill_fillable_fields.py`, `extract_form_field_info.py` - utilities for PDF manipulation
- DOCX skill: `document.py`, `utilities.py` - Python modules for document processing
**Appropriate for:** Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
**Note:** Scripts may be executed without loading into context, but can still be read by Codex for patching or environment adjustments.
### references/
Documentation and reference material intended to be loaded into context to inform Codex's process and thinking.
**Examples from other skills:**
- Product management: `communication.md`, `context_building.md` - detailed workflow guides
- BigQuery: API reference documentation and query examples
- Finance: Schema documentation, company policies
**Appropriate for:** In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Codex should reference while working.
### assets/
Files not intended to be loaded into context, but rather used within the output Codex produces.
**Examples from other skills:**
- Brand styling: PowerPoint template files (.pptx), logo files
- Frontend builder: HTML/React boilerplate project directories
- Typography: Font files (.ttf, .woff2)
**Appropriate for:** Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
---
**Not every skill requires all three types of resources.**
"""
EXAMPLE_SCRIPT = '''#!/usr/bin/env python3
"""
Example helper script for {skill_name}
This is a placeholder script that can be executed directly.
Replace with actual implementation or delete if not needed.
Example real scripts from other skills:
- pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
- pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
"""
def main():
print("This is an example script for {skill_name}")
# TODO: Add actual script logic here
# This could be data processing, file conversion, API calls, etc.
if __name__ == "__main__":
main()
'''
EXAMPLE_REFERENCE = """# Reference Documentation for {skill_title}
This is a placeholder for detailed reference documentation.
Replace with actual reference content or delete if not needed.
Example real reference docs from other skills:
- product-management/references/communication.md - Comprehensive guide for status updates
- product-management/references/context_building.md - Deep-dive on gathering context
- bigquery/references/ - API references and query examples
## When Reference Docs Are Useful
Reference docs are ideal for:
- Comprehensive API documentation
- Detailed workflow guides
- Complex multi-step processes
- Information too lengthy for main SKILL.md
- Content that's only needed for specific use cases
## Structure Suggestions
### API Reference Example
- Overview
- Authentication
- Endpoints with examples
- Error codes
- Rate limits
### Workflow Guide Example
- Prerequisites
- Step-by-step instructions
- Common patterns
- Troubleshooting
- Best practices
"""
EXAMPLE_ASSET = """# Example Asset File
This placeholder represents where asset files would be stored.
Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
Asset files are NOT intended to be loaded into context, but rather used within
the output Codex produces.
Example asset files from other skills:
- Brand guidelines: logo.png, slides_template.pptx
- Frontend builder: hello-world/ directory with HTML/React boilerplate
- Typography: custom-font.ttf, font-family.woff2
- Data: sample_data.csv, test_dataset.json
## Common Asset Types
- Templates: .pptx, .docx, boilerplate directories
- Images: .png, .jpg, .svg, .gif
- Fonts: .ttf, .otf, .woff, .woff2
- Boilerplate code: Project directories, starter files
- Icons: .ico, .svg
- Data files: .csv, .json, .xml, .yaml
Note: This is a text placeholder. Actual assets can be any file type.
"""
def normalize_skill_name(skill_name):
"""Normalize a skill name to lowercase hyphen-case."""
normalized = skill_name.strip().lower()
normalized = re.sub(r"[^a-z0-9]+", "-", normalized)
normalized = normalized.strip("-")
normalized = re.sub(r"-{2,}", "-", normalized)
return normalized
def title_case_skill_name(skill_name):
"""Convert hyphenated skill name to Title Case for display."""
return " ".join(word.capitalize() for word in skill_name.split("-"))
def parse_resources(raw_resources):
if not raw_resources:
return []
resources = [item.strip() for item in raw_resources.split(",") if item.strip()]
invalid = sorted({item for item in resources if item not in ALLOWED_RESOURCES})
if invalid:
allowed = ", ".join(sorted(ALLOWED_RESOURCES))
print(f"[ERROR] Unknown resource type(s): {', '.join(invalid)}")
print(f" Allowed: {allowed}")
sys.exit(1)
deduped = []
seen = set()
for resource in resources:
if resource not in seen:
deduped.append(resource)
seen.add(resource)
return deduped
def create_resource_dirs(skill_dir, skill_name, skill_title, resources, include_examples):
for resource in resources:
resource_dir = skill_dir / resource
resource_dir.mkdir(exist_ok=True)
if resource == "scripts":
if include_examples:
example_script = resource_dir / "example.py"
example_script.write_text(EXAMPLE_SCRIPT.format(skill_name=skill_name))
example_script.chmod(0o755)
print("[OK] Created scripts/example.py")
else:
print("[OK] Created scripts/")
elif resource == "references":
if include_examples:
example_reference = resource_dir / "api_reference.md"
example_reference.write_text(EXAMPLE_REFERENCE.format(skill_title=skill_title))
print("[OK] Created references/api_reference.md")
else:
print("[OK] Created references/")
elif resource == "assets":
if include_examples:
example_asset = resource_dir / "example_asset.txt"
example_asset.write_text(EXAMPLE_ASSET)
print("[OK] Created assets/example_asset.txt")
else:
print("[OK] Created assets/")
def init_skill(skill_name, path, resources, include_examples, interface_overrides):
"""
Initialize a new skill directory with template SKILL.md.
Args:
skill_name: Name of the skill
path: Path where the skill directory should be created
resources: Resource directories to create
include_examples: Whether to create example files in resource directories
Returns:
Path to created skill directory, or None if error
"""
# Determine skill directory path
skill_dir = Path(path).resolve() / skill_name
# Check if directory already exists
if skill_dir.exists():
print(f"[ERROR] Skill directory already exists: {skill_dir}")
return None
# Create skill directory
try:
skill_dir.mkdir(parents=True, exist_ok=False)
print(f"[OK] Created skill directory: {skill_dir}")
except Exception as e:
print(f"[ERROR] Error creating directory: {e}")
return None
# Create SKILL.md from template
skill_title = title_case_skill_name(skill_name)
skill_content = SKILL_TEMPLATE.format(skill_name=skill_name, skill_title=skill_title)
skill_md_path = skill_dir / "SKILL.md"
try:
skill_md_path.write_text(skill_content)
print("[OK] Created SKILL.md")
except Exception as e:
print(f"[ERROR] Error creating SKILL.md: {e}")
return None
# Create agents/openai.yaml
try:
result = write_openai_yaml(skill_dir, skill_name, interface_overrides)
if not result:
return None
except Exception as e:
print(f"[ERROR] Error creating agents/openai.yaml: {e}")
return None
# Create resource directories if requested
if resources:
try:
create_resource_dirs(skill_dir, skill_name, skill_title, resources, include_examples)
except Exception as e:
print(f"[ERROR] Error creating resource directories: {e}")
return None
# Print next steps
print(f"\n[OK] Skill '{skill_name}' initialized successfully at {skill_dir}")
print("\nNext steps:")
print("1. Edit SKILL.md to complete the TODO items and update the description")
if resources:
if include_examples:
print("2. Customize or delete the example files in scripts/, references/, and assets/")
else:
print("2. Add resources to scripts/, references/, and assets/ as needed")
else:
print("2. Create resource directories only if needed (scripts/, references/, assets/)")
print("3. Update agents/openai.yaml if the UI metadata should differ")
print("4. Run the validator when ready to check the skill structure")
print(
"5. Forward-test complex skills with realistic user requests to ensure they work as intended"
)
return skill_dir
def main():
parser = argparse.ArgumentParser(
description="Create a new skill directory with a SKILL.md template.",
)
parser.add_argument("skill_name", help="Skill name (normalized to hyphen-case)")
parser.add_argument("--path", required=True, help="Output directory for the skill")
parser.add_argument(
"--resources",
default="",
help="Comma-separated list: scripts,references,assets",
)
parser.add_argument(
"--examples",
action="store_true",
help="Create example files inside the selected resource directories",
)
parser.add_argument(
"--interface",
action="append",
default=[],
help="Interface override in key=value format (repeatable)",
)
args = parser.parse_args()
raw_skill_name = args.skill_name
skill_name = normalize_skill_name(raw_skill_name)
if not skill_name:
print("[ERROR] Skill name must include at least one letter or digit.")
sys.exit(1)
if len(skill_name) > MAX_SKILL_NAME_LENGTH:
print(
f"[ERROR] Skill name '{skill_name}' is too long ({len(skill_name)} characters). "
f"Maximum is {MAX_SKILL_NAME_LENGTH} characters."
)
sys.exit(1)
if skill_name != raw_skill_name:
print(f"Note: Normalized skill name from '{raw_skill_name}' to '{skill_name}'.")
resources = parse_resources(args.resources)
if args.examples and not resources:
print("[ERROR] --examples requires --resources to be set.")
sys.exit(1)
path = args.path
print(f"Initializing skill: {skill_name}")
print(f" Location: {path}")
if resources:
print(f" Resources: {', '.join(resources)}")
if args.examples:
print(" Examples: enabled")
else:
print(" Resources: none (create as needed)")
print()
result = init_skill(skill_name, path, resources, args.examples, args.interface)
if result:
sys.exit(0)
else:
sys.exit(1)
if __name__ == "__main__":
main()

View File

@@ -1,101 +0,0 @@
#!/usr/bin/env python3
"""
Quick validation script for skills - minimal version
"""
import re
import sys
from pathlib import Path
import yaml
MAX_SKILL_NAME_LENGTH = 64
def validate_skill(skill_path):
"""Basic validation of a skill"""
skill_path = Path(skill_path)
skill_md = skill_path / "SKILL.md"
if not skill_md.exists():
return False, "SKILL.md not found"
content = skill_md.read_text()
if not content.startswith("---"):
return False, "No YAML frontmatter found"
match = re.match(r"^---\n(.*?)\n---", content, re.DOTALL)
if not match:
return False, "Invalid frontmatter format"
frontmatter_text = match.group(1)
try:
frontmatter = yaml.safe_load(frontmatter_text)
if not isinstance(frontmatter, dict):
return False, "Frontmatter must be a YAML dictionary"
except yaml.YAMLError as e:
return False, f"Invalid YAML in frontmatter: {e}"
allowed_properties = {"name", "description", "license", "allowed-tools", "metadata"}
unexpected_keys = set(frontmatter.keys()) - allowed_properties
if unexpected_keys:
allowed = ", ".join(sorted(allowed_properties))
unexpected = ", ".join(sorted(unexpected_keys))
return (
False,
f"Unexpected key(s) in SKILL.md frontmatter: {unexpected}. Allowed properties are: {allowed}",
)
if "name" not in frontmatter:
return False, "Missing 'name' in frontmatter"
if "description" not in frontmatter:
return False, "Missing 'description' in frontmatter"
name = frontmatter.get("name", "")
if not isinstance(name, str):
return False, f"Name must be a string, got {type(name).__name__}"
name = name.strip()
if name:
if not re.match(r"^[a-z0-9-]+$", name):
return (
False,
f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)",
)
if name.startswith("-") or name.endswith("-") or "--" in name:
return (
False,
f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens",
)
if len(name) > MAX_SKILL_NAME_LENGTH:
return (
False,
f"Name is too long ({len(name)} characters). "
f"Maximum is {MAX_SKILL_NAME_LENGTH} characters.",
)
description = frontmatter.get("description", "")
if not isinstance(description, str):
return False, f"Description must be a string, got {type(description).__name__}"
description = description.strip()
if description:
if "<" in description or ">" in description:
return False, "Description cannot contain angle brackets (< or >)"
if len(description) > 1024:
return (
False,
f"Description is too long ({len(description)} characters). Maximum is 1024 characters.",
)
return True, "Skill is valid!"
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python quick_validate.py <skill_directory>")
sys.exit(1)
valid, message = validate_skill(sys.argv[1])
print(message)
sys.exit(0 if valid else 1)

View File

@@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,58 +0,0 @@
---
name: skill-installer
description: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
metadata:
short-description: Install curated skills from openai/skills or other repos
---
# Skill Installer
Helps install skills. By default these are from https://github.com/openai/skills/tree/main/skills/.curated, but users can also provide other locations. Experimental skills live in https://github.com/openai/skills/tree/main/skills/.experimental and can be installed the same way.
Use the helper scripts based on the task:
- List skills when the user asks what is available, or if the user uses this skill without specifying what to do. Default listing is `.curated`, but you can pass `--path skills/.experimental` when they ask about experimental skills.
- Install from the curated list when the user provides a skill name.
- Install from another repo when the user provides a GitHub repo/path (including private repos).
Install skills with the helper scripts.
## Communication
When listing skills, output approximately as follows, depending on the context of the user's request. If they ask about experimental skills, list from `.experimental` instead of `.curated` and label the source accordingly:
"""
Skills from {repo}:
1. skill-1
2. skill-2 (already installed)
3. ...
Which ones would you like installed?
"""
After installing a skill, tell the user: "Restart Codex to pick up new skills."
## Scripts
All of these scripts use network, so when running in the sandbox, request escalation when running them.
- `scripts/list-skills.py` (prints skills list with installed annotations)
- `scripts/list-skills.py --format json`
- Example (experimental list): `scripts/list-skills.py --path skills/.experimental`
- `scripts/install-skill-from-github.py --repo <owner>/<repo> --path <path/to/skill> [<path/to/skill> ...]`
- `scripts/install-skill-from-github.py --url https://github.com/<owner>/<repo>/tree/<ref>/<path>`
- Example (experimental skill): `scripts/install-skill-from-github.py --repo openai/skills --path skills/.experimental/<skill-name>`
## Behavior and Options
- Defaults to direct download for public GitHub repos.
- If download fails with auth/permission errors, falls back to git sparse checkout.
- Aborts if the destination skill directory already exists.
- Installs into `$CODEX_HOME/skills/<skill-name>` (defaults to `~/.codex/skills`).
- Multiple `--path` values install multiple skills in one run, each named from the path basename unless `--name` is supplied.
- Options: `--ref <ref>` (default `main`), `--dest <path>`, `--method auto|download|git`.
## Notes
- Curated listing is fetched from `https://github.com/openai/skills/tree/main/skills/.curated` via the GitHub API. If it is unavailable, explain the error and exit.
- Private GitHub repos can be accessed via existing git credentials or optional `GITHUB_TOKEN`/`GH_TOKEN` for download.
- Git fallback tries HTTPS first, then SSH.
- The skills at https://github.com/openai/skills/tree/main/skills/.system are preinstalled, so no need to help users install those. If they ask, just explain this. If they insist, you can download and overwrite.
- Installed annotations come from `$CODEX_HOME/skills`.

View File

@@ -1,5 +0,0 @@
interface:
display_name: "Skill Installer"
short_description: "Install curated skills from openai/skills or other repos"
icon_small: "./assets/skill-installer-small.svg"
icon_large: "./assets/skill-installer.png"

View File

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill="#0D0D0D" d="M2.145 3.959a2.033 2.033 0 0 1 2.022-1.824h5.966c.551 0 .997 0 1.357.029.367.03.692.093.993.246l.174.098c.397.243.72.593.932 1.01l.053.114c.116.269.168.557.194.878.03.36.03.805.03 1.357v4.3a2.365 2.365 0 0 1-2.366 2.365h-1.312a2.198 2.198 0 0 1-4.377 0H4.167A2.032 2.032 0 0 1 2.135 10.5V9.333l.004-.088A.865.865 0 0 1 3 8.468l.116-.006A1.135 1.135 0 0 0 3 6.199a.865.865 0 0 1-.865-.864V4.167l.01-.208Zm1.054 1.186a2.198 2.198 0 0 1 0 4.376v.98c0 .534.433.967.968.967H6l.089.004a.866.866 0 0 1 .776.861 1.135 1.135 0 0 0 2.27 0c0-.478.387-.865.865-.865h1.5c.719 0 1.301-.583 1.301-1.301v-4.3c0-.57 0-.964-.025-1.27a1.933 1.933 0 0 0-.09-.493L12.642 4a1.47 1.47 0 0 0-.541-.585l-.102-.056c-.126-.065-.295-.11-.596-.135a17.31 17.31 0 0 0-1.27-.025H4.167a.968.968 0 0 0-.968.968v.978Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env python3
"""Shared GitHub helpers for skill install scripts."""
from __future__ import annotations
import os
import urllib.request
def github_request(url: str, user_agent: str) -> bytes:
headers = {"User-Agent": user_agent}
token = os.environ.get("GITHUB_TOKEN") or os.environ.get("GH_TOKEN")
if token:
headers["Authorization"] = f"token {token}"
req = urllib.request.Request(url, headers=headers)
with urllib.request.urlopen(req) as resp:
return resp.read()
def github_api_contents_url(repo: str, path: str, ref: str) -> str:
return f"https://api.github.com/repos/{repo}/contents/{path}?ref={ref}"

View File

@@ -1,308 +0,0 @@
#!/usr/bin/env python3
"""Install a skill from a GitHub repo path into $CODEX_HOME/skills."""
from __future__ import annotations
import argparse
from dataclasses import dataclass
import os
import shutil
import subprocess
import sys
import tempfile
import urllib.error
import urllib.parse
import zipfile
from github_utils import github_request
DEFAULT_REF = "main"
@dataclass
class Args:
url: str | None = None
repo: str | None = None
path: list[str] | None = None
ref: str = DEFAULT_REF
dest: str | None = None
name: str | None = None
method: str = "auto"
@dataclass
class Source:
owner: str
repo: str
ref: str
paths: list[str]
repo_url: str | None = None
class InstallError(Exception):
pass
def _codex_home() -> str:
return os.environ.get("CODEX_HOME", os.path.expanduser("~/.codex"))
def _tmp_root() -> str:
base = os.path.join(tempfile.gettempdir(), "codex")
os.makedirs(base, exist_ok=True)
return base
def _request(url: str) -> bytes:
return github_request(url, "codex-skill-install")
def _parse_github_url(url: str, default_ref: str) -> tuple[str, str, str, str | None]:
parsed = urllib.parse.urlparse(url)
if parsed.netloc != "github.com":
raise InstallError("Only GitHub URLs are supported for download mode.")
parts = [p for p in parsed.path.split("/") if p]
if len(parts) < 2:
raise InstallError("Invalid GitHub URL.")
owner, repo = parts[0], parts[1]
ref = default_ref
subpath = ""
if len(parts) > 2:
if parts[2] in ("tree", "blob"):
if len(parts) < 4:
raise InstallError("GitHub URL missing ref or path.")
ref = parts[3]
subpath = "/".join(parts[4:])
else:
subpath = "/".join(parts[2:])
return owner, repo, ref, subpath or None
def _download_repo_zip(owner: str, repo: str, ref: str, dest_dir: str) -> str:
zip_url = f"https://codeload.github.com/{owner}/{repo}/zip/{ref}"
zip_path = os.path.join(dest_dir, "repo.zip")
try:
payload = _request(zip_url)
except urllib.error.HTTPError as exc:
raise InstallError(f"Download failed: HTTP {exc.code}") from exc
with open(zip_path, "wb") as file_handle:
file_handle.write(payload)
with zipfile.ZipFile(zip_path, "r") as zip_file:
_safe_extract_zip(zip_file, dest_dir)
top_levels = {name.split("/")[0] for name in zip_file.namelist() if name}
if not top_levels:
raise InstallError("Downloaded archive was empty.")
if len(top_levels) != 1:
raise InstallError("Unexpected archive layout.")
return os.path.join(dest_dir, next(iter(top_levels)))
def _run_git(args: list[str]) -> None:
result = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if result.returncode != 0:
raise InstallError(result.stderr.strip() or "Git command failed.")
def _safe_extract_zip(zip_file: zipfile.ZipFile, dest_dir: str) -> None:
dest_root = os.path.realpath(dest_dir)
for info in zip_file.infolist():
extracted_path = os.path.realpath(os.path.join(dest_dir, info.filename))
if extracted_path == dest_root or extracted_path.startswith(dest_root + os.sep):
continue
raise InstallError("Archive contains files outside the destination.")
zip_file.extractall(dest_dir)
def _validate_relative_path(path: str) -> None:
if os.path.isabs(path) or os.path.normpath(path).startswith(".."):
raise InstallError("Skill path must be a relative path inside the repo.")
def _validate_skill_name(name: str) -> None:
altsep = os.path.altsep
if not name or os.path.sep in name or (altsep and altsep in name):
raise InstallError("Skill name must be a single path segment.")
if name in (".", ".."):
raise InstallError("Invalid skill name.")
def _git_sparse_checkout(repo_url: str, ref: str, paths: list[str], dest_dir: str) -> str:
repo_dir = os.path.join(dest_dir, "repo")
clone_cmd = [
"git",
"clone",
"--filter=blob:none",
"--depth",
"1",
"--sparse",
"--single-branch",
"--branch",
ref,
repo_url,
repo_dir,
]
try:
_run_git(clone_cmd)
except InstallError:
_run_git(
[
"git",
"clone",
"--filter=blob:none",
"--depth",
"1",
"--sparse",
"--single-branch",
repo_url,
repo_dir,
]
)
_run_git(["git", "-C", repo_dir, "sparse-checkout", "set", *paths])
_run_git(["git", "-C", repo_dir, "checkout", ref])
return repo_dir
def _validate_skill(path: str) -> None:
if not os.path.isdir(path):
raise InstallError(f"Skill path not found: {path}")
skill_md = os.path.join(path, "SKILL.md")
if not os.path.isfile(skill_md):
raise InstallError("SKILL.md not found in selected skill directory.")
def _copy_skill(src: str, dest_dir: str) -> None:
os.makedirs(os.path.dirname(dest_dir), exist_ok=True)
if os.path.exists(dest_dir):
raise InstallError(f"Destination already exists: {dest_dir}")
shutil.copytree(src, dest_dir)
def _build_repo_url(owner: str, repo: str) -> str:
return f"https://github.com/{owner}/{repo}.git"
def _build_repo_ssh(owner: str, repo: str) -> str:
return f"git@github.com:{owner}/{repo}.git"
def _prepare_repo(source: Source, method: str, tmp_dir: str) -> str:
if method in ("download", "auto"):
try:
return _download_repo_zip(source.owner, source.repo, source.ref, tmp_dir)
except InstallError as exc:
if method == "download":
raise
err_msg = str(exc)
if "HTTP 401" in err_msg or "HTTP 403" in err_msg or "HTTP 404" in err_msg:
pass
else:
raise
if method in ("git", "auto"):
repo_url = source.repo_url or _build_repo_url(source.owner, source.repo)
try:
return _git_sparse_checkout(repo_url, source.ref, source.paths, tmp_dir)
except InstallError:
repo_url = _build_repo_ssh(source.owner, source.repo)
return _git_sparse_checkout(repo_url, source.ref, source.paths, tmp_dir)
raise InstallError("Unsupported method.")
def _resolve_source(args: Args) -> Source:
if args.url:
owner, repo, ref, url_path = _parse_github_url(args.url, args.ref)
if args.path is not None:
paths = list(args.path)
elif url_path:
paths = [url_path]
else:
paths = []
if not paths:
raise InstallError("Missing --path for GitHub URL.")
return Source(owner=owner, repo=repo, ref=ref, paths=paths)
if not args.repo:
raise InstallError("Provide --repo or --url.")
if "://" in args.repo:
return _resolve_source(
Args(url=args.repo, repo=None, path=args.path, ref=args.ref)
)
repo_parts = [p for p in args.repo.split("/") if p]
if len(repo_parts) != 2:
raise InstallError("--repo must be in owner/repo format.")
if not args.path:
raise InstallError("Missing --path for --repo.")
paths = list(args.path)
return Source(
owner=repo_parts[0],
repo=repo_parts[1],
ref=args.ref,
paths=paths,
)
def _default_dest() -> str:
return os.path.join(_codex_home(), "skills")
def _parse_args(argv: list[str]) -> Args:
parser = argparse.ArgumentParser(description="Install a skill from GitHub.")
parser.add_argument("--repo", help="owner/repo")
parser.add_argument("--url", help="https://github.com/owner/repo[/tree/ref/path]")
parser.add_argument(
"--path",
nargs="+",
help="Path(s) to skill(s) inside repo",
)
parser.add_argument("--ref", default=DEFAULT_REF)
parser.add_argument("--dest", help="Destination skills directory")
parser.add_argument(
"--name", help="Destination skill name (defaults to basename of path)"
)
parser.add_argument(
"--method",
choices=["auto", "download", "git"],
default="auto",
)
return parser.parse_args(argv, namespace=Args())
def main(argv: list[str]) -> int:
args = _parse_args(argv)
try:
source = _resolve_source(args)
source.ref = source.ref or args.ref
if not source.paths:
raise InstallError("No skill paths provided.")
for path in source.paths:
_validate_relative_path(path)
dest_root = args.dest or _default_dest()
tmp_dir = tempfile.mkdtemp(prefix="skill-install-", dir=_tmp_root())
try:
repo_root = _prepare_repo(source, args.method, tmp_dir)
installed = []
for path in source.paths:
skill_name = args.name if len(source.paths) == 1 else None
skill_name = skill_name or os.path.basename(path.rstrip("/"))
_validate_skill_name(skill_name)
if not skill_name:
raise InstallError("Unable to derive skill name.")
dest_dir = os.path.join(dest_root, skill_name)
if os.path.exists(dest_dir):
raise InstallError(f"Destination already exists: {dest_dir}")
skill_src = os.path.join(repo_root, path)
_validate_skill(skill_src)
_copy_skill(skill_src, dest_dir)
installed.append((skill_name, dest_dir))
finally:
if os.path.isdir(tmp_dir):
shutil.rmtree(tmp_dir, ignore_errors=True)
for skill_name, dest_dir in installed:
print(f"Installed {skill_name} to {dest_dir}")
return 0
except InstallError as exc:
print(f"Error: {exc}", file=sys.stderr)
return 1
if __name__ == "__main__":
raise SystemExit(main(sys.argv[1:]))

View File

@@ -1,107 +0,0 @@
#!/usr/bin/env python3
"""List skills from a GitHub repo path."""
from __future__ import annotations
import argparse
import json
import os
import sys
import urllib.error
from github_utils import github_api_contents_url, github_request
DEFAULT_REPO = "openai/skills"
DEFAULT_PATH = "skills/.curated"
DEFAULT_REF = "main"
class ListError(Exception):
pass
class Args(argparse.Namespace):
repo: str
path: str
ref: str
format: str
def _request(url: str) -> bytes:
return github_request(url, "codex-skill-list")
def _codex_home() -> str:
return os.environ.get("CODEX_HOME", os.path.expanduser("~/.codex"))
def _installed_skills() -> set[str]:
root = os.path.join(_codex_home(), "skills")
if not os.path.isdir(root):
return set()
entries = set()
for name in os.listdir(root):
path = os.path.join(root, name)
if os.path.isdir(path):
entries.add(name)
return entries
def _list_skills(repo: str, path: str, ref: str) -> list[str]:
api_url = github_api_contents_url(repo, path, ref)
try:
payload = _request(api_url)
except urllib.error.HTTPError as exc:
if exc.code == 404:
raise ListError(
"Skills path not found: "
f"https://github.com/{repo}/tree/{ref}/{path}"
) from exc
raise ListError(f"Failed to fetch skills: HTTP {exc.code}") from exc
data = json.loads(payload.decode("utf-8"))
if not isinstance(data, list):
raise ListError("Unexpected skills listing response.")
skills = [item["name"] for item in data if item.get("type") == "dir"]
return sorted(skills)
def _parse_args(argv: list[str]) -> Args:
parser = argparse.ArgumentParser(description="List skills.")
parser.add_argument("--repo", default=DEFAULT_REPO)
parser.add_argument(
"--path",
default=DEFAULT_PATH,
help="Repo path to list (default: skills/.curated)",
)
parser.add_argument("--ref", default=DEFAULT_REF)
parser.add_argument(
"--format",
choices=["text", "json"],
default="text",
help="Output format",
)
return parser.parse_args(argv, namespace=Args())
def main(argv: list[str]) -> int:
args = _parse_args(argv)
try:
skills = _list_skills(args.repo, args.path, args.ref)
installed = _installed_skills()
if args.format == "json":
payload = [
{"name": name, "installed": name in installed} for name in skills
]
print(json.dumps(payload))
else:
for idx, name in enumerate(skills, start=1):
suffix = " (already installed)" if name in installed else ""
print(f"{idx}. {name}{suffix}")
return 0
except ListError as exc:
print(f"Error: {exc}", file=sys.stderr)
return 1
if __name__ == "__main__":
raise SystemExit(main(sys.argv[1:]))

View File

@@ -137,6 +137,18 @@ If `ncdu` is missing, use:
nix run nixpkgs#ncdu -- -x "$HOME"
```
For reusable, mount-safe snapshots on this machine, prefer the local wrapper:
```bash
safe_ncdu /
sudo -n env HOME=/home/imalison safe_ncdu /
safe_ncdu /nix/store
safe_ncdu top ~/.cache/ncdu/latest-root.json.zst 30 /home/imalison
safe_ncdu open ~/.cache/ncdu/latest-root.json.zst
```
`safe_ncdu` writes compressed ncdu exports under `~/.cache/ncdu`, records the exclude list beside the export, excludes mounted descendants of the scan root, and supports follow-up `top` queries without rescanning.
For quick, non-blocking triage on very large trees, prefer bounded probes:
```bash
@@ -147,9 +159,16 @@ timeout 30s du -xh --max-depth=1 "$HOME/.local/share" 2>/dev/null | sort -h
Machine-specific heavy hitters seen in practice:
- `~/.cache/uv` can exceed 20G and is reclaimable with `uv cache clean`.
- `~/.cache/pypoetry` can exceed 7G across artifacts, repository cache, and virtualenvs; inspect first, then use Poetry cache commands or targeted virtualenv removal.
- `~/.cache/google-chrome` can exceed 8G across multiple Chrome profiles; close Chrome before clearing profile cache directories.
- `~/.cache/spotify` can exceed 10G; treat as optional app-cache cleanup.
- `~/.gradle` can exceed 8G, mostly under `caches/`; prefer Gradle-aware cleanup and expect dependency redownloads.
- `~/.local/share/picom/debug.log` can grow past 15G when verbose picom debugging is enabled or crashes leave a stale log behind; if `picom` is not running, deleting or truncating the log is a high-yield low-risk win.
- `~/.local/share/Trash` can exceed several GB; empty only with user approval.
- `/var/lib/private/gitea-runner` can exceed 50G and is not visible to an unprivileged `ncdu /` scan; use `sudo -n env HOME=/home/imalison safe_ncdu /` when `/var` looks undercounted.
- Validated cleanup pattern: stop `gitea-runner-nix.service`, remove cache/work directories under `/var/lib/private/gitea-runner` (`.cache`, `.gradle`, `action-cache-dir`, `workspace`, stale nested `gitea-runner`, and nested `nix/.cache`/`nix/.local`), recreate `action-cache-dir`, `workspace`, and `.cache` owned by `gitea-runner:gitea-runner`, then restart the service.
- Preserve registration/config-like files such as `/var/lib/private/gitea-runner/nix/.runner`, `/var/lib/private/gitea-runner/nix/.labels`, `/var/lib/private/gitea-runner/.docker/config.json`, and SSH/Kube material.
- `~/Projects/*/target` directories can dominate home usage. Recent example candidates included stale `target/` directories under `scrobble-scrubber`, `http-client-vcr`, `http-client`, `subtr-actor`, `http-types`, `subtr-actor-py`, `sdk`, and `async-h1`.
## Step 5: `/nix/store` Deep Dive
@@ -183,6 +202,25 @@ Common retention pattern on this machine:
- Many `.direnv/flake-profile-*` symlinks under `~/Projects` and worktrees keep `nix-shell-env`/`ghc-shell-*` roots alive.
- Old taffybar constellation repos under `~/Projects` can pin large Haskell closures through `.direnv` and `result` symlinks. Deleting `gtk-sni-tray`, `status-notifier-item`, `dbus-menu`, `dbus-hslogger`, and `gtk-strut` and then rerunning `nix-collect-garbage -d` reclaimed about 11G of store data in one validated run.
- `find_store_path_gc_roots` is especially useful for proving GHC retention: many large `ghc-9.10.3-with-packages` paths are unique per project, while the base `ghc-9.10.3` and docs paths are shared.
- NixOS system generations and a repo-root `nixos/result` symlink can pin multiple Android Studio and Android SDK versions. Check `/nix/var/nix/profiles/system-*-link`, `/run/current-system`, `/run/booted-system`, and `~/dotfiles/nixos/result` before assuming Android paths are pinned by project shells.
- `~/Projects/railbird-mobile/.direnv/flake-profile-*` can pin large Android SDK system images. Removing stale direnv profiles there is a more targeted first step than deleting Android store paths directly.
- For a repeatable `/nix/store` `ncdu` snapshot without driving the TUI, export and inspect it:
```bash
ncdu -0 -x -c -o /tmp/nix-store.ncdu.json.zst /nix/store
zstdcat /tmp/nix-store.ncdu.json.zst | jq 'def sumd: if type=="array" then ((.[0].dsize // 0) + ([.[1:][] | sumd] | add // 0)) elif type=="object" then (.dsize // 0) else 0 end; .[3] | sumd'
```
- `nix-store --gc --print-dead` plus the Nix SQLite database is a fast way to estimate immediate GC wins before deleting anything:
```bash
nix-store --gc --print-dead > /tmp/nix-dead-paths.txt
printf '%s\n' '.mode list' '.separator |' 'create temp table dead(path text);' \
'.import /tmp/nix-dead-paths.txt dead' \
'select count(*), sum(narSize) from ValidPaths join dead using(path);' \
| nix shell nixpkgs#sqlite --command sqlite3 /nix/var/nix/db/db.sqlite
```
- Quantify before acting:
```bash

View File

@@ -33,6 +33,9 @@ digraph unsubscribe_check {
- Do not ask a kickoff question like "should I start now?".
- Default scan window is `newer_than:7d` unless the user already specified a different range.
- Only ask a follow-up question before starting if required information is missing and execution would otherwise be blocked.
- Default user preference: they generally do not want subscription-style email in their inbox.
- For obvious marketing/newsletter/digest mail with a working unsubscribe path, unsubscribe by default without asking for confirmation first.
- Still ask first for borderline cases such as creator subscriptions, professional communities, event platforms, or anything that appears transactional/security-sensitive.
## How to Scan
@@ -42,6 +45,8 @@ digraph unsubscribe_check {
- **Clearly unsubscribeable**: marketing, promos, digests user never engages with
- **Ask user**: newsletters, community content, event platforms (might be wanted)
When the user's standing preference is to keep subscriptions out of the inbox, treat the **Clearly unsubscribeable** bucket as auto-actionable.
## Unsubscribe Execution
For each confirmed sender, do ALL of these:
@@ -95,6 +100,7 @@ gws gmail users messages batchModify \
- Community digests the user doesn't engage with
- Financial marketing (not transactional alerts)
- "Your weekly/daily/monthly" summaries
- Messages with explicit unsubscribe/manage-preferences links whose primary purpose is promotional or newsletter delivery
## Signals to NOT Auto-Unsubscribe (Ask First)

View File

@@ -31,7 +31,6 @@
"iterm2",
"java",
"jumpcut",
"karabiner",
"libreoffice",
"macpass",
"mirrordisplays",
@@ -170,6 +169,7 @@
"tig",
"tmate",
"tmux",
"zellij",
"unoconv",
"vim",
"w3m",

6
dotfiles/claude/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
*
!.gitignore
!CLAUDE.md
!settings.json
!settings.local.json
!settings.local.json.example

5
dotfiles/codex/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
*
!.gitignore
!AGENTS.md
!config.toml
!skills

View File

@@ -1,7 +1,9 @@
model = "gpt-5.4"
model = "gpt-5.5"
model_reasoning_effort = "high"
personality = "pragmatic"
notify = ["/Users/kat/.codex/plugins/cache/openai-bundled/computer-use/1.0.750/Codex Computer Use.app/Contents/SharedSupport/SkyComputerUseClient.app/Contents/MacOS/SkyComputerUseClient", "turn-ended"]
notify = ["/Users/kat/dotfiles/dotfiles/codex/plugins/cache/openai-bundled/computer-use/1.0.755/Codex Computer Use.app/Contents/SharedSupport/SkyComputerUseClient.app/Contents/MacOS/SkyComputerUseClient", "turn-ended"]
[projects."/home/imalison/Projects/nixpkgs"]
trust_level = "trusted"
@@ -105,12 +107,36 @@ trust_level = "trusted"
[projects."/home/imalison/keysmith_generated"]
trust_level = "trusted"
[projects."/run/media/imalison/NIXOS_SD"]
trust_level = "trusted"
[projects."/Users/kat/dotfiles"]
trust_level = "trusted"
[projects."/Users/kat"]
trust_level = "trusted"
[projects."/Users/kat/org"]
trust_level = "trusted"
[projects."/Users/kat/Documents/Codex/2026-04-25/do-you-see-the-sandisk-external"]
trust_level = "trusted"
[projects."/Volumes/Extreme SSD/Projects/keepbook"]
trust_level = "trusted"
[projects."/Users/kat/Documents/Codex/2026-04-25/it-seems-like-maybe-we-dont"]
trust_level = "trusted"
[projects."/Users/kat/Documents/Codex/2026-04-25/what-is-the-state-of-tiling"]
trust_level = "trusted"
[projects."/home/imalison/Pictures/ai/2026/celeb"]
trust_level = "trusted"
[projects."/home/imalison/.local/share/keepbook"]
trust_level = "trusted"
[notice]
hide_gpt5_1_migration_prompt = true
"hide_gpt-5.1-codex-max_migration_prompt" = true
@@ -126,10 +152,6 @@ args = ["-y", "chrome-devtools-mcp@latest", "--auto-connect"]
command = "npx"
args = ["-y", "@google-cloud/observability-mcp"]
[mcp_servers.gmail]
command = "nix"
args = ["run", "/home/imalison/Projects/gmail-mcp#gmail-mcp-server"]
[mcp_servers.openaiDeveloperDocs]
url = "https://developers.openai.com/mcp"
@@ -139,10 +161,15 @@ apps = true
steer = true
[marketplaces.openai-bundled]
last_updated = "2026-04-19T01:07:40Z"
last_updated = "2026-04-21T17:43:57Z"
source_type = "local"
source = "/Users/kat/.codex/.tmp/bundled-marketplaces/openai-bundled"
[marketplaces.openai-primary-runtime]
last_updated = "2026-04-25T23:49:36Z"
source_type = "local"
source = "/Users/kat/.cache/codex-runtimes/codex-primary-runtime/plugins/openai-primary-runtime"
[plugins."google-calendar@openai-curated"]
enabled = true
@@ -152,8 +179,23 @@ enabled = true
[plugins."google-drive@openai-curated"]
enabled = true
[plugins."github@openai-curated"]
enabled = true
[plugins."computer-use@openai-bundled"]
enabled = true
[plugins."github@openai-curated"]
[plugins."documents@openai-primary-runtime"]
enabled = true
[plugins."spreadsheets@openai-primary-runtime"]
enabled = true
[plugins."presentations@openai-primary-runtime"]
enabled = true
[plugins."browser-use@openai-bundled"]
enabled = true
[tui.model_availability_nux]
"gpt-5.5" = 4

View File

@@ -0,0 +1,18 @@
output HDMI-0
off
output DP-1
off
output DP-2
off
output DP-3
off
output DP-4
off
output DP-5
off
output DP-0
crtc 0
mode 3440x1440
pos 0x0
rate 240.00
x-prop-non_desktop 0

View File

@@ -0,0 +1 @@
DP-0 00ffffffffffff003669d04d0000000033210104b55022783bac05b04d3db7250f5054bfcf00714f81c0814081809500b300d1c00101e77c70a0d0a0295030203a0020513100001a023a801871382d40582c450020513100001e000000fd0c30f0919196010a202020202020000000fc004d50473334314358204f4c45440257020339f14901030204901211133f2309070783010000e2002a741a0000030330f000a066024f03f0000000000000e305e201e6060701664b00565e00a0a0a029503020350020513100001a6fc200a0a0a055503020350020513100001a00000000000000000000000000000000000000000000000000000000000000000000fc7012790300030150a2e300086f0d9f002f801f009f05b20031000900520101086f0d9f002f801f009f05540002000900b76901086f0d9f002f801f009f057600020009006f0502086f0d8f002f801f009f0563001d00090000000000000000000000000000000000000000000000000000000000000000000000000000001590

View File

@@ -1,90 +0,0 @@
@binding-set gtk-emacs-text-entry
{
bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) };
bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) };
bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) };
bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) };
bind "<alt>b" { "move-cursor" (words, -1, 0) };
bind "<shift><alt>b" { "move-cursor" (words, -1, 1) };
bind "<alt>f" { "move-cursor" (words, 1, 0) };
bind "<shift><alt>f" { "move-cursor" (words, 1, 1) };
bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) };
bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) };
bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) };
bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) };
bind "<ctrl>w" { "cut-clipboard" () };
bind "<ctrl>y" { "paste-clipboard" () };
bind "<ctrl>d" { "delete-from-cursor" (chars, 1) };
bind "<alt>d" { "delete-from-cursor" (word-ends, 1) };
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) };
bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) };
bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
"insert-at-cursor" (" ") };
bind "<alt>KP_Space" { "delete-from-cursor" (whitespace, 1)
"insert-at-cursor" (" ") };
/*
* Some non-Emacs keybindings people are attached to
*/
bind "<ctrl>u" { "move-cursor" (paragraph-ends, -1, 0)
"delete-from-cursor" (paragraph-ends, 1) };
bind "<ctrl>h" { "delete-from-cursor" (chars, -1) };
bind "<ctrl>w" { "delete-from-cursor" (word-ends, -1) };
}
/*
* Bindings for GtkTextView
*/
@binding-set gtk-emacs-text-view
{
bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) };
bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) };
bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) };
bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) };
bind "<ctrl>space" { "set-anchor" () };
bind "<ctrl>KP_Space" { "set-anchor" () };
}
/*
* Bindings for GtkTreeView
*/
@binding-set gtk-emacs-tree-view
{
bind "<ctrl>s" { "start-interactive-search" () };
bind "<ctrl>f" { "move-cursor" (logical-positions, 1) };
bind "<ctrl>b" { "move-cursor" (logical-positions, -1) };
}
/*
* Bindings for menus
*/
@binding-set gtk-emacs-menu
{
bind "<ctrl>n" { "move-current" (next) };
bind "<ctrl>p" { "move-current" (prev) };
bind "<ctrl>f" { "move-current" (child) };
bind "<ctrl>b" { "move-current" (parent) };
}
entry {
-gtk-key-bindings: gtk-emacs-text-entry;
}
textview {
-gtk-key-bindings: gtk-emacs-text-entry, gtk-emacs-text-view;
}
treeview {
-gtk-key-bindings: gtk-emacs-tree-view;
}
GtkMenuShell {
-gtk-key-bindings: gtk-emacs-menu;
}
@import 'colors.css';

View File

@@ -4,12 +4,6 @@ general {
after_sleep_cmd = hyprctl dispatch dpms on
}
listener {
timeout = 600
on-timeout = hypr-screensaver start
on-resume = hypr-screensaver stop
}
listener {
timeout = 900
on-timeout = hypr-screensaver stop && hyprctl dispatch dpms off

View File

@@ -315,12 +315,12 @@ bind = $hyper SHIFT, S, movewindow, mon:d
bind = $hyper SHIFT, A, movewindow, mon:l
bind = $hyper SHIFT, D, movewindow, mon:r
# Shift to empty workspace on screen direction (Hyper + Ctrl + WASD)
# Shift to empty workspace on screen direction (Super + Ctrl + Shift + WASD)
# Like XMonad's shiftToEmptyOnScreen
bind = $hyper CTRL, W, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh u
bind = $hyper CTRL, S, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh d
bind = $hyper CTRL, A, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh l
bind = $hyper CTRL, D, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh r
bind = $mainMod CTRL SHIFT, W, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh u
bind = $mainMod CTRL SHIFT, S, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh d
bind = $mainMod CTRL SHIFT, A, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh l
bind = $mainMod CTRL SHIFT, D, exec, ~/.config/hypr/scripts/shift-to-empty-on-screen.sh r
# -----------------------------------------------------------------------------
# LAYOUT CONTROL (XMonad-like with hy3)
@@ -525,8 +525,9 @@ bind = $hyper, R, exec, rofi-systemd
bind = $hyper, slash, exec, toggle_taffybar
bind = $hyper, 9, exec, start_synergy.sh
bind = $hyper, I, exec, rofi_select_input.hs
bind = $hyper, backslash, exec, /home/imalison/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle
bind = $hyper, O, exec, rofi_paswitch
bind = $hyper, W, exec, rofi_wallpaper.sh
bind = $hyper, comma, exec, rofi_wallpaper.sh
bind = $hyper, Y, exec, rofi_agentic_skill
# Reload config

File diff suppressed because it is too large Load Diff

View File

@@ -1,106 +0,0 @@
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 1000
},
"rules": [
{
"manipulators": [
{
"description": "Change right command to command+control+option+shift.",
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
],
"to_if_alone": [
{
"key_code": "escape",
"modifiers": {
"optional": [
"any"
]
}
}
],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": {},
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 610,
"vendor_id": 1452
},
"ignore": false,
"simple_modifications": {}
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": {},
"identifiers": {
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 597,
"vendor_id": 1452
},
"ignore": false,
"simple_modifications": {}
}
],
"fn_function_keys": {
"f1": "vk_consumer_brightness_down",
"f10": "mute",
"f11": "volume_down",
"f12": "volume_up",
"f2": "vk_consumer_brightness_up",
"f3": "vk_mission_control",
"f4": "vk_launchpad",
"f5": "vk_consumer_illumination_down",
"f6": "vk_consumer_illumination_up",
"f7": "vk_consumer_previous",
"f8": "vk_consumer_play",
"f9": "vk_consumer_next"
},
"name": "Default profile",
"one_to_many_mappings": {},
"selected": true,
"simple_modifications": {
"caps_lock": "left_control"
},
"standalone_keys": {},
"virtual_hid_keyboard": {
"caps_lock_delay_milliseconds": 0,
"keyboard_type": "ansi",
"standalone_keys_delay_milliseconds": 200
}
}
]
}

View File

@@ -4,8 +4,9 @@
- Prefer `just run` (foreground) and `just restart` (background) when running taffybar during iterative work.
- If running manually, prefer `direnv exec . cabal run` (or `nix develop -c cabal run` if direnv is not active) so you get the right build inputs and environment.
## Tmux session titling
- If the TMUX environment variable is set, treat this chat as the controller for the current tmux session.
## Multiplexer session titling
- If the `TMUX` or `ZELLIJ` environment variable is set, treat this chat as the controller for the current tmux or zellij session.
- Use `set_multiplexer_title '<project> - <task>'` to update the title. The command detects tmux vs. zellij internally, prefers tmux when both are present, and no-ops outside a multiplexer.
- Maintain a session/window/pane title that updates when the task focus changes substantially.
- Prefer automatic titling: infer a concise <task> from the current user request and context without asking.
- Title format: "<project> - <task>".
@@ -14,11 +15,7 @@
- <task> is a short, user-friendly description of what we are doing.
- Ask for a short descriptive <task> only when the task is ambiguous or you are not confident in an inferred title.
- When the task changes substantially, update the <task> automatically if clear; otherwise ask for an updated <task>.
- When a title is provided or updated, immediately run this one-liner:
tmux rename-session '<project> - <task>' \; rename-window '<project> - <task>' \; select-pane -T '<project> - <task>'
- Assume you are inside tmux, so do not use -t unless the user asks to target a specific session.
- When a title is provided or updated, immediately run `set_multiplexer_title '<project> - <task>'`; do not call raw tmux or zellij rename commands unless debugging the helper itself.
## Pane usage
- Do not create extra panes or windows unless the user asks.
@@ -30,4 +27,3 @@
## Skills
A skill is a set of local instructions to follow that is stored in a `SKILL.md` file.

View File

@@ -34,26 +34,6 @@
"type": "github"
}
},
"git-ignore-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1762808025,
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@@ -79,11 +59,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"lastModified": 1776877367,
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0182a361324364ae3f436a63005877674cf45efb",
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
"type": "github"
},
"original": {
@@ -117,11 +97,19 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"git-ignore-nix": "git-ignore-nix",
"nixpkgs": "nixpkgs",
"flake-utils": [
"taffybar",
"flake-utils"
],
"nixpkgs": [
"taffybar",
"nixpkgs"
],
"taffybar": "taffybar",
"xmonad": "xmonad"
"xmonad": [
"taffybar",
"xmonad"
]
}
},
"systems": {
@@ -141,24 +129,18 @@
},
"taffybar": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"weeder-nix": "weeder-nix",
"xmonad": [
"xmonad"
],
"xmonad": "xmonad",
"xmonad-contrib": "xmonad-contrib"
},
"locked": {
"lastModified": 1776035803,
"narHash": "sha256-JnZKgFeZrh7P4zgLeNJGqTdPm425BJj003CXUR0nvPs=",
"ref": "refs/heads/master",
"rev": "3c7014217875a7ab8554c3c07cc3e7aacd82f1ca",
"revCount": 2283,
"lastModified": 1777319252,
"narHash": "sha256-mPft6i8ReJAvW2LdylFI6FF6NFGa1HMa3RNbisfAsbc=",
"ref": "refs/heads/codex/fix-gdk-backend-strut-detection",
"rev": "c2cee23fc57384cd322d589944129e6c31d4f0fd",
"revCount": 2288,
"type": "git",
"url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar"
},
@@ -190,26 +172,13 @@
}
},
"xmonad": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"git-ignore-nix": [
"git-ignore-nix"
],
"nixpkgs": [
"nixpkgs"
],
"unstable": [
"nixpkgs"
]
},
"flake": false,
"locked": {
"lastModified": 1767819257,
"narHash": "sha256-U7MIHr0B10wDSNgUvq4QTK22HZ4pl2oIYkdOKEMnxC4=",
"lastModified": 1776502138,
"narHash": "sha256-mSOpNU1iJvfFh5uwayA6aPxneFMduNW1kG1gV2tGE+c=",
"owner": "xmonad",
"repo": "xmonad",
"rev": "bb33042d408c15d8727011b1ed4aa22b2716d73d",
"rev": "a618fb32662e44eb5d8276a3dc1925b0233e638b",
"type": "github"
},
"original": {

View File

@@ -1,31 +1,21 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
git-ignore-nix = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Kept for compatibility with parent flakes that set `inputs.xmonad.follows`,
# and for taffybar's own flake inputs. We don't depend on xmonad.lib here.
xmonad = {
url = "github:xmonad/xmonad/master";
inputs.nixpkgs.follows = "nixpkgs";
# xmonad's `unstable` input is another nixpkgs pin; keep it aligned too.
inputs.unstable.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.git-ignore-nix.follows = "git-ignore-nix";
};
taffybar = {
# Use the local git checkout, not a raw path snapshot, so gitignored
# build artifacts like dist-newstyle/.worktrees/.direnv don't get copied
# into flake-input store sources.
url = "git+file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.xmonad.follows = "xmonad";
inputs.weeder-nix.inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
};
# Follow the vendored taffybar flake's pins so the config shell and the
# library shell mostly share their nixpkgs/Haskell dependency graph.
flake-utils.follows = "taffybar/flake-utils";
nixpkgs.follows = "taffybar/nixpkgs";
# Kept for compatibility with parent flakes that set `inputs.xmonad.follows`.
# The config flake itself does not use xmonad.lib.
xmonad = {
follows = "taffybar/xmonad";
};
};
outputs = {
self,

View File

@@ -1,6 +1,5 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module Main (main) where
@@ -9,6 +8,7 @@ import Control.Monad (void, when)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Reader (asks)
import Data.Char (toLower)
import Data.Foldable (for_)
import Data.GI.Base (castTo)
import Data.Int (Int32)
import Data.List (nub)
@@ -39,16 +39,18 @@ import System.Taffybar.DBus
import System.Taffybar.DBus.Toggle
import System.Taffybar.Hooks (withLogLevels)
import System.Taffybar.Information.EWMHDesktopInfo (WorkspaceId (..))
import qualified System.Taffybar.Information.Workspaces.Model as WorkspaceModel
import System.Taffybar.Information.Memory (MemoryInfo (..), parseMeminfo)
import qualified System.Taffybar.Information.Workspaces.Model as WorkspaceModel
import System.Taffybar.Information.X11DesktopInfo
import System.Taffybar.SimpleConfig
import System.Taffybar.Util (getPixbufFromFilePath, maybeTCombine, postGUIASync, (<|||>))
import System.Taffybar.Widget
import qualified System.Taffybar.Widget.ASUS as ASUS
import System.Taffybar.Widget.AnthropicUsage (anthropicUsageStackNew)
import System.Taffybar.Widget.CPUMonitor (cpuMonitorNew)
import System.Taffybar.Widget.Generic.Graph (GraphConfig (..), GraphDirection (..), GraphStyle (..), defaultGraphConfig)
import qualified System.Taffybar.Widget.NetworkManager as NetworkManager
import System.Taffybar.Widget.OpenAIUsage (openAIUsageStackNew)
import qualified System.Taffybar.Widget.PulseAudio as PulseAudio
import System.Taffybar.Widget.SNIMenu (withNmAppletMenu)
import System.Taffybar.Widget.SNITray
@@ -83,9 +85,7 @@ decorateWithClassAndBoxM klass builder =
forEachLabelRecursively :: Gtk.Widget -> (Gtk.Label -> IO ()) -> IO ()
forEachLabelRecursively widget action = do
maybeLabel <- castTo Gtk.Label widget
case maybeLabel of
Just label -> action label
Nothing -> pure ()
for_ maybeLabel action
maybeContainer <- castTo Gtk.Container widget
case maybeContainer of
@@ -345,7 +345,7 @@ mprisWidget =
simplePlayerWidget
defaultPlayerConfig
{ setNowPlayingLabel =
\np -> stackedMprisLabel <$> playingText 20 20 np,
fmap stackedMprisLabel . playingText 20 20,
setupPlayerLabel = setFixedLabelWidth 20
}
}
@@ -551,6 +551,14 @@ wakeupDebugWidget :: TaffyIO Gtk.Widget
wakeupDebugWidget =
decorateWithClassAndBoxM "wakeup-debug" wakeupDebugWidgetNew
openAIUsageWidget :: TaffyIO Gtk.Widget
openAIUsageWidget =
decorateWithClassAndBoxM "openai-usage" openAIUsageStackNew
anthropicUsageWidget :: TaffyIO Gtk.Widget
anthropicUsageWidget =
decorateWithClassAndBoxM "anthropic-usage" anthropicUsageStackNew
sniPriorityVisibilityThresholdDefault :: Int
sniPriorityVisibilityThresholdDefault = 0
@@ -609,6 +617,8 @@ endWidgetsForHost hostName =
let baseEndWidgets =
[ sniTrayWidget,
audioWidget,
anthropicUsageWidget,
openAIUsageWidget,
cpuWidget,
ramSwapWidget,
diskUsageWidget,
@@ -622,6 +632,8 @@ endWidgetsForHost hostName =
sniTrayWidget,
asusDiskUsageWidget,
audioBacklightWidget,
anthropicUsageWidget,
openAIUsageWidget,
cpuWidget,
ramSwapWidget,
screensaverWidget,

View File

@@ -1012,11 +1012,11 @@ addKeys conf@XConfig { modMask = modm } =
(modm .|. shiftMask) (`windowSwap` True) ++
buildDirectionalBindings
(modm .|. controlMask) (followingWindow . (`windowToScreen` True)) ++
buildDirectionalBindings
(modm .|. controlMask .|. shiftMask) shiftToEmptyOnScreen ++
buildDirectionalBindings hyper (`screenGo` True) ++
buildDirectionalBindings
(hyper .|. shiftMask) (followingWindow . (`screenSwap` True)) ++
buildDirectionalBindings
(hyper .|. controlMask) shiftToEmptyOnScreen ++
-- Specific program spawning
bindBringAndRaiseMany
@@ -1097,10 +1097,11 @@ addKeys conf@XConfig { modMask = modm } =
, ((hyper, xK_r), spawn "rofi-systemd")
, ((hyper, xK_9), spawn "start_synergy.sh")
, ((hyper, xK_slash), spawn "toggle_taffybar")
, ((hyper, xK_backslash), spawn "$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input toggle")
, ((hyper, xK_space), spawn "skippy-xd")
, ((hyper, xK_i), spawn "rofi_select_input.hs")
, ((hyper, xK_o), spawn "rofi_paswitch")
, ((hyper, xK_w), spawn "rofi_wallpaper.sh")
, ((hyper, xK_comma), spawn "rofi_wallpaper.sh")
, ((hyper, xK_y), spawn "rofi_agentic_skill")
, ((modm, xK_e), spawn "emacsclient --eval '(emacs-everywhere)'")

View File

@@ -0,0 +1,24 @@
keybinds {
// Keep Ctrl-p available for readline/history/up in shells and editors.
unbind "Ctrl p"
shared_except "locked" "pane" {
bind "Ctrl Space" { SwitchToMode "Pane"; }
}
pane {
bind "Ctrl Space" { SwitchToMode "Normal"; }
}
tmux {
// Ctrl-b C: start a Codex pane from the current zellij tab.
bind "C" {
Run "codex" "--dangerously-bypass-approvals-and-sandbox" {
name "codex"
}
SwitchToMode "Normal"
}
}
}
default_mode "locked"

View File

@@ -1752,6 +1752,7 @@ bind-key and global-set-key forms.
((projectile-require-project-root nil)
(projectile-enable-caching nil)
(projectile-git-submodule-command nil)
(projectile-git-use-fd t)
(project-vc-merge-submodules nil)
(projectile-current-project-on-switch 'keep))
:config
@@ -1765,6 +1766,43 @@ bind-key and global-set-key forms.
`(let ((default-directory ,directory))
,@forms))
(defvar imalison:projectile-find-ignore-file ".projectile-find-ignore"
"Project-local fd ignore file used only for Projectile file finding.")
(defun imalison:projectile-fd-ignore-file-arg ()
"Return a shell fragment that adds `imalison:projectile-find-ignore-file' when present."
(let ((ignore-file (shell-quote-argument imalison:projectile-find-ignore-file)))
(format "$(test -f %s && printf -- '--ignore-file %s')" ignore-file ignore-file)))
(defun imalison:projectile-fd-command (&optional pattern)
"Build an fd command for Projectile file finding.
The command includes ignored and hidden files by default, then applies
`imalison:projectile-find-ignore-file' when that file exists in the project
root. PATTERN is passed as fd's search pattern when non-nil."
(mapconcat
#'identity
(delq nil
(list projectile-fd-executable
pattern
"-H"
"--no-ignore"
(imalison:projectile-fd-ignore-file-arg)
"-0"
"-E .git"
"-tf"
"--strip-cwd-prefix"
"-c never"))
" "))
(when projectile-fd-executable
(setq projectile-git-fd-args
(replace-regexp-in-string
(concat "^" (regexp-quote projectile-fd-executable) " ")
""
(imalison:projectile-fd-command)))
(setq projectile-generic-command
(imalison:projectile-fd-command ".")))
(defun imalison:do-rg-default-directory (&rest args)
(interactive)
(let ((consult-ripgrep-args (concat consult-ripgrep-args " --no-ignore" " --hidden")))

View File

@@ -151,7 +151,10 @@
;; Without this, org can behave very strangely
(use-package org
:ensure
(org :type git :host github :repo "colonelpanic8/org-mode"
;; Keep Org on the historical local checkout name to match the existing
;; source directory under ~/.emacs.d/straight/repos/org.
(org :type git :host github
:repo ("colonelpanic8/org-mode" . "org")
:branch "my-main-2025"
:depth full
:files (:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*"))

View File

@@ -102,10 +102,10 @@
required = true
[credential "https://github.com"]
helper =
helper = !/etc/profiles/per-user/imalison/bin/gh auth git-credential
helper = !/run/current-system/sw/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/etc/profiles/per-user/imalison/bin/gh auth git-credential
helper = !/run/current-system/sw/bin/gh auth git-credential
[includeIf "gitdir:~/Projects/org-agenda-api/"]
path = ~/.gitconfig.org-agenda-api
[includeIf "gitdir:~/Projects/dotfiles/org-agenda-api/"]

View File

@@ -74,6 +74,8 @@ cabal.project.local
#
.direnv
/dotfiles/config/gtk-3.0/settings.ini
/dotfiles/config/gtk-3.0/gtk.css
*.hm-backup
/untracked

View File

@@ -0,0 +1,451 @@
local hyper = { "cmd", "ctrl", "alt" }
local hyperShift = { "cmd", "ctrl", "alt", "shift" }
local wf = hs.window.filter.defaultCurrentSpace
hs.window.animationDuration = 0
pcall(function()
hs.ipc.cliInstall()
end)
local config = {
gap = 8,
autoColumns = false,
}
local retileTimer = nil
local arranging = false
local rightCommandDown = false
local rightCommandUsed = false
local rightCommandKeyCode = 54
local function notify(message)
hs.alert.show(message, 0.7)
end
local function screenFrame(screen)
return screen:frame()
end
local function sameScreen(a, b)
return a and b and a:id() == b:id()
end
local function centerX(win)
local f = win:frame()
return f.x + (f.w / 2)
end
local function centerY(win)
local f = win:frame()
return f.y + (f.h / 2)
end
local function distance(a, b)
local dx = a.x - b.x
local dy = a.y - b.y
return math.sqrt((dx * dx) + (dy * dy))
end
local function directionScore(focused, candidate, direction)
local focusedCenter = {
x = centerX(focused),
y = centerY(focused),
}
local candidateCenter = {
x = centerX(candidate),
y = centerY(candidate),
}
if direction == "left" and candidateCenter.x >= focusedCenter.x then
return nil
elseif direction == "right" and candidateCenter.x <= focusedCenter.x then
return nil
elseif direction == "up" and candidateCenter.y >= focusedCenter.y then
return nil
elseif direction == "down" and candidateCenter.y <= focusedCenter.y then
return nil
end
return distance(focusedCenter, candidateCenter)
end
local function columnWindows(screen)
local windows = {}
for _, win in ipairs(wf:getWindows()) do
if win:isStandard()
and not win:isMinimized()
and sameScreen(win:screen(), screen)
then
table.insert(windows, win)
end
end
table.sort(windows, function(a, b)
local af = a:frame()
local bf = b:frame()
if math.abs(centerX(a) - centerX(b)) > 24 then
return centerX(a) < centerX(b)
end
return af.y < bf.y
end)
return windows
end
local function neighborWindow(direction)
local focused = hs.window.focusedWindow()
if not focused then
return nil
end
local focusedId = focused:id()
local best = nil
local bestScore = nil
for _, win in ipairs(wf:getWindows()) do
if win:isStandard()
and not win:isMinimized()
and sameScreen(win:screen(), focused:screen())
and win:id() ~= focusedId
then
local score = directionScore(focused, win, direction)
if score and (not bestScore or score < bestScore) then
best = win
bestScore = score
end
end
end
return best
end
local function setFrame(win, frame)
win:setFrame(frame, 0)
end
local function tileWindows(windows)
if #windows == 0 then
return
end
arranging = true
local screen = windows[1]:screen()
local frame = screenFrame(screen)
local gap = config.gap
local count = #windows
local width = (frame.w - (gap * (count - 1))) / count
for index, win in ipairs(windows) do
setFrame(win, {
x = frame.x + ((index - 1) * (width + gap)),
y = frame.y,
w = width,
h = frame.h,
})
end
arranging = false
end
local function tileFocusedScreen()
local focused = hs.window.focusedWindow()
if not focused then
notify("No focused window")
return
end
local windows = columnWindows(focused:screen())
tileWindows(windows)
end
local function focusWindow(direction)
local target = neighborWindow(direction)
if target then
target:focus()
end
end
local function swapWindow(direction)
local focused = hs.window.focusedWindow()
local target = neighborWindow(direction)
if not focused or not target then
return
end
arranging = true
local focusedFrame = focused:frame()
local targetFrame = target:frame()
setFrame(focused, targetFrame)
setFrame(target, focusedFrame)
focused:focus()
arranging = false
end
local function placeFocused(startColumn, spanColumns, totalColumns)
local focused = hs.window.focusedWindow()
if not focused then
return
end
local frame = screenFrame(focused:screen())
local gap = config.gap
local unit = (frame.w - (gap * (totalColumns - 1))) / totalColumns
local x = frame.x + ((startColumn - 1) * (unit + gap))
local width = (unit * spanColumns) + (gap * (spanColumns - 1))
setFrame(focused, {
x = x,
y = frame.y,
w = width,
h = frame.h,
})
end
local function moveFocusedToScreen(direction)
local focused = hs.window.focusedWindow()
if not focused then
return
end
local target = direction < 0 and focused:screen():previous() or focused:screen():next()
focused:moveToScreen(target, false, true)
tileWindows(columnWindows(target))
end
local function scheduleRetile()
if arranging or not config.autoColumns then
return
end
if retileTimer then
retileTimer:stop()
end
retileTimer = hs.timer.doAfter(0.25, tileFocusedScreen)
end
local function toggleAutoColumns()
config.autoColumns = not config.autoColumns
notify(config.autoColumns and "Auto columns on" or "Auto columns off")
if config.autoColumns then
tileFocusedScreen()
end
end
local function toggleMonitorInput()
hs.task.new("/bin/zsh", function(exitCode)
if exitCode ~= 0 then
notify("Monitor input toggle failed")
end
end, {
"-lc",
"export PATH=\"$HOME/.nix-profile/bin:/run/current-system/sw/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH\"; \"$HOME/dotfiles/dotfiles/lib/functions/mpg341cx_input\" toggle",
}):start()
end
wf:subscribe({
hs.window.filter.windowCreated,
hs.window.filter.windowDestroyed,
hs.window.filter.windowMoved,
hs.window.filter.windowInCurrentSpace,
hs.window.filter.windowNotInCurrentSpace,
hs.window.filter.windowUnminimized,
hs.window.filter.windowNotVisible,
}, scheduleRetile)
hs.hotkey.bind(hyper, "c", tileFocusedScreen)
hs.hotkey.bind(hyper, "v", toggleAutoColumns)
hs.hotkey.bind(hyper, "\\", toggleMonitorInput)
hs.hotkey.bind(hyper, "a", function()
focusWindow("left")
end)
hs.hotkey.bind(hyper, "d", function()
focusWindow("right")
end)
hs.hotkey.bind(hyper, "w", function()
focusWindow("up")
end)
hs.hotkey.bind(hyper, "s", function()
focusWindow("down")
end)
hs.hotkey.bind(hyperShift, "a", function()
swapWindow("left")
end)
hs.hotkey.bind(hyperShift, "d", function()
swapWindow("right")
end)
hs.hotkey.bind(hyperShift, "w", function()
swapWindow("up")
end)
hs.hotkey.bind(hyperShift, "s", function()
swapWindow("down")
end)
hs.hotkey.bind(hyper, "m", function()
placeFocused(1, 1, 1)
end)
hs.hotkey.bind(hyper, "f", function()
placeFocused(1, 1, 1)
end)
hs.hotkey.bind(hyper, "1", function()
placeFocused(1, 1, 3)
end)
hs.hotkey.bind(hyper, "2", function()
placeFocused(2, 1, 3)
end)
hs.hotkey.bind(hyper, "3", function()
placeFocused(3, 1, 3)
end)
hs.hotkey.bind(hyper, "4", function()
placeFocused(1, 2, 3)
end)
hs.hotkey.bind(hyper, "5", function()
placeFocused(2, 2, 3)
end)
hs.hotkey.bind(hyper, "q", function()
moveFocusedToScreen(-1)
end)
hs.hotkey.bind(hyper, "e", function()
moveFocusedToScreen(1)
end)
hs.hotkey.bind(hyper, "r", hs.reload)
local rguiBindings = {}
local function bindRgui(key, handler, shiftedHandler)
rguiBindings[hs.keycodes.map[key]] = {
normal = handler,
shifted = shiftedHandler,
}
end
bindRgui("a", function()
focusWindow("left")
end, function()
swapWindow("left")
end)
bindRgui("d", function()
focusWindow("right")
end, function()
swapWindow("right")
end)
bindRgui("w", function()
focusWindow("up")
end, function()
swapWindow("up")
end)
bindRgui("s", function()
focusWindow("down")
end, function()
swapWindow("down")
end)
bindRgui("c", tileFocusedScreen)
bindRgui("v", toggleAutoColumns)
bindRgui("\\", toggleMonitorInput)
bindRgui("m", function()
placeFocused(1, 1, 1)
end)
bindRgui("f", function()
placeFocused(1, 1, 1)
end)
bindRgui("1", function()
placeFocused(1, 1, 3)
end)
bindRgui("2", function()
placeFocused(2, 1, 3)
end)
bindRgui("3", function()
placeFocused(3, 1, 3)
end)
bindRgui("4", function()
placeFocused(1, 2, 3)
end)
bindRgui("5", function()
placeFocused(2, 2, 3)
end)
bindRgui("q", function()
moveFocusedToScreen(-1)
end)
bindRgui("e", function()
moveFocusedToScreen(1)
end)
bindRgui("r", hs.reload)
local rguiTap = hs.eventtap.new({
hs.eventtap.event.types.flagsChanged,
hs.eventtap.event.types.keyDown,
}, function(event)
local keyCode = event:getKeyCode()
local eventType = event:getType()
if eventType == hs.eventtap.event.types.flagsChanged and keyCode == rightCommandKeyCode then
rightCommandDown = event:getFlags().cmd
if rightCommandDown then
rightCommandUsed = false
elseif not rightCommandUsed then
hs.eventtap.keyStroke({}, "escape", 0)
end
return false
end
if eventType ~= hs.eventtap.event.types.keyDown or not rightCommandDown then
return false
end
local binding = rguiBindings[keyCode]
if not binding then
return false
end
rightCommandUsed = true
local flags = event:getFlags()
local handler = flags.shift and binding.shifted or binding.normal
if handler then
handler()
end
return true
end)
rguiTap:start()
notify("Hammerspoon loaded")

View File

@@ -0,0 +1,285 @@
#!/usr/bin/env -S zsh -f
function mpg341cx_input_usage {
cat <<'EOF'
Usage:
mpg341cx_input [toggle|dp|usb-c|hdmi1|hdmi2]
Switches the current DDC/CI monitor input. On the MSI MPG341CX OLED:
dp -> DisplayPort
usb-c -> USB-C / Type-C
toggle -> DisplayPort <-> USB-C
Environment:
MPG341CX_INPUT_DDC_DISPLAY DDC display number, default: 1
MPG341CX_INPUT_BACKEND auto, ddcutil, ddcctl, or m1ddc; default: auto
MPG341CX_INPUT_DARWIN_DISPLAY_NAME
macOS display name used to infer USB-C state
EOF
}
function mpg341cx_input_notify {
local message="$1"
if command -v notify-send >/dev/null 2>&1; then
notify-send "MPG341CX input" "$message"
elif command -v osascript >/dev/null 2>&1; then
osascript - "$message" <<'EOF' >/dev/null 2>&1
on run argv
display notification (item 1 of argv) with title "MPG341CX input"
end run
EOF
fi
}
function mpg341cx_input_backend {
local requested="${MPG341CX_INPUT_BACKEND:-auto}"
local candidate
local -a candidates
MPG341CX_INPUT_SELECTED_BACKEND=""
if [[ "$requested" != auto ]]; then
if command -v "$requested" >/dev/null 2>&1; then
MPG341CX_INPUT_SELECTED_BACKEND="$requested"
return 0
fi
echo "mpg341cx_input: requested backend '$requested' is not available on PATH" >&2
return 1
fi
if [[ "$OSTYPE" == darwin* ]]; then
candidates=(m1ddc ddcctl ddcutil)
else
candidates=(ddcutil ddcctl)
fi
for candidate in "${candidates[@]}"; do
if command -v "$candidate" >/dev/null 2>&1; then
MPG341CX_INPUT_SELECTED_BACKEND="$candidate"
return 0
fi
done
echo "mpg341cx_input: no supported DDC command is available on PATH" >&2
return 1
}
function mpg341cx_input_current_ddcutil {
local display="$1"
local output_file
output_file="${TMPDIR:-/tmp}/mpg341cx-input-current-$$-$RANDOM"
ddcutil --display "$display" getvcp 60 --terse 2>/dev/null \
| grep -Eo 'x[0-9a-fA-F]+' \
| tail -1 > "$output_file"
read -r MPG341CX_INPUT_CURRENT < "$output_file"
rm -f "$output_file"
}
function mpg341cx_input_current_ddcctl {
local display="$1"
local current
local output_file
output_file="${TMPDIR:-/tmp}/mpg341cx-input-current-$$-$RANDOM"
ddcctl -d "$display" -i '?' 2>/dev/null \
| sed -nE 's/.*current: ([0-9]+).*/\1/p' \
| tail -1 > "$output_file"
read -r current < "$output_file"
rm -f "$output_file"
if [[ -n "$current" ]]; then
printf -v MPG341CX_INPUT_CURRENT 'x%02x' "$current"
fi
}
function mpg341cx_input_current_m1ddc {
local display="$1"
local current
local output_file parsed_file
output_file="${TMPDIR:-/tmp}/mpg341cx-input-current-$$-$RANDOM"
parsed_file="${TMPDIR:-/tmp}/mpg341cx-input-parsed-$$-$RANDOM"
m1ddc display "$display" get input > "$output_file" 2>/dev/null
sed -nE 's/.*[^0-9]([0-9]+)$/\1/p; /^[0-9]+$/p' "$output_file" | tail -1 > "$parsed_file"
read -r current < "$parsed_file"
rm -f "$output_file" "$parsed_file"
if [[ -n "$current" ]]; then
printf -v MPG341CX_INPUT_CURRENT 'x%02x' "$current"
fi
}
function mpg341cx_input_current {
local backend="$1"
local display="$2"
MPG341CX_INPUT_CURRENT=""
case "$backend" in
ddcutil)
mpg341cx_input_current_ddcutil "$display"
;;
ddcctl)
mpg341cx_input_current_ddcctl "$display"
;;
m1ddc)
mpg341cx_input_current_m1ddc "$display"
;;
esac
}
function mpg341cx_input_current_darwin_active {
local display_name="${MPG341CX_INPUT_DARWIN_DISPLAY_NAME:-MPG341CX OLED}"
MPG341CX_INPUT_CURRENT_TARGET=""
if [[ "$OSTYPE" != darwin* ]] || ! command -v system_profiler >/dev/null 2>&1; then
return 1
fi
if system_profiler SPDisplaysDataType 2>/dev/null | awk -v display_name="$display_name" '
{
line = $0
trimmed = line
gsub(/^[[:space:]]+|[[:space:]]+$/, "", trimmed)
if (trimmed == display_name ":") {
in_display = 1
next
}
if (in_display && line ~ /^ [^[:space:]].*:[[:space:]]*$/) {
exit
}
if (in_display && trimmed == "Online: Yes") {
found = 1
exit
}
}
END {
exit(found ? 0 : 1)
}
'; then
MPG341CX_INPUT_CURRENT_TARGET="usb-c"
return 0
fi
return 1
}
function mpg341cx_input_current_target {
local backend="$1"
local current="${2:l}"
MPG341CX_INPUT_CURRENT_TARGET=""
case "$backend:$current" in
m1ddc:x0f|m1ddc:0x0f)
MPG341CX_INPUT_CURRENT_TARGET="dp"
;;
m1ddc:x10|m1ddc:0x10)
MPG341CX_INPUT_CURRENT_TARGET="usb-c"
;;
ddcutil:x0f|ddcutil:0x0f|ddcctl:x0f|ddcctl:0x0f)
MPG341CX_INPUT_CURRENT_TARGET="usb-c"
;;
ddcutil:x10|ddcutil:0x10|ddcctl:x10|ddcctl:0x10)
MPG341CX_INPUT_CURRENT_TARGET="dp"
;;
esac
}
function mpg341cx_input {
local target="${1:-toggle}"
local display="${MPG341CX_INPUT_DDC_DISPLAY:-1}"
local backend value_hex value_dec value_m1ddc label current current_target
if [[ "$target" == "-h" || "$target" == "--help" ]]; then
mpg341cx_input_usage
return 0
fi
if ! mpg341cx_input_backend; then
mpg341cx_input_notify "No DDC command is available"
return 1
fi
backend="$MPG341CX_INPUT_SELECTED_BACKEND"
case "${target:l}" in
toggle)
mpg341cx_input_current "$backend" "$display"
current="$MPG341CX_INPUT_CURRENT"
mpg341cx_input_current_target "$backend" "$current"
current_target="$MPG341CX_INPUT_CURRENT_TARGET"
if [[ -z "$current_target" ]]; then
mpg341cx_input_current_darwin_active
current_target="$MPG341CX_INPUT_CURRENT_TARGET"
fi
case "${current_target:l}" in
dp)
target="usb-c"
;;
usb-c)
target="dp"
;;
*)
echo "mpg341cx_input: current input is '${current:-unknown}', defaulting to DisplayPort" >&2
target="dp"
;;
esac
;;
esac
case "${target:l}" in
dp|displayport|display-port)
value_hex="0x10"
value_dec="16"
value_m1ddc="15"
label="DisplayPort"
target="dp"
;;
usb-c|usbc|type-c|typec)
value_hex="0x0f"
value_dec="15"
value_m1ddc="16"
label="USB-C"
target="usb-c"
;;
hdmi1|hdmi-1)
value_hex="0x11"
value_dec="17"
value_m1ddc="17"
label="HDMI 1"
target="hdmi1"
;;
hdmi2|hdmi-2)
value_hex="0x12"
value_dec="18"
value_m1ddc="18"
label="HDMI 2"
target="hdmi2"
;;
*)
mpg341cx_input_usage >&2
return 2
;;
esac
mpg341cx_input_notify "Switching to $label"
case "$backend" in
ddcutil)
ddcutil --display "$display" --noverify setvcp 60 "$value_hex" || return $?
;;
ddcctl)
ddcctl -d "$display" -i "$value_dec" || return $?
;;
m1ddc)
m1ddc display "$display" set input "$value_m1ddc" || return $?
;;
esac
}
mpg341cx_input "$@"

218
dotfiles/lib/functions/safe_ncdu Executable file
View File

@@ -0,0 +1,218 @@
#!/usr/bin/env zsh
function _safe_ncdu_usage {
cat <<'EOF'
Usage:
safe_ncdu [scan] [ROOT] [-o OUTPUT]
safe_ncdu open SNAPSHOT
safe_ncdu top SNAPSHOT [LIMIT] [PATH]
safe_ncdu excludes [ROOT]
Creates a compressed ncdu export while avoiding mounted descendants of ROOT.
Default ROOT is /. Default OUTPUT is ~/.cache/ncdu/safe-ncdu-<root>-<timestamp>.json.zst.
EOF
}
function _safe_ncdu_require {
local cmd
for cmd in "$@"; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "safe_ncdu: missing required command: $cmd" >&2
return 1
fi
done
}
function _safe_ncdu_root_name {
local root="$1"
if [[ "$root" == "/" ]]; then
echo root
else
echo "${root#/}" | sed 's#[^A-Za-z0-9._-]#_#g'
fi
}
function _safe_ncdu_excludes {
local root="${1:-/}"
local root_real
root_real="$(realpath -m "$root")" || return 1
# Exclude every mounted descendant. This catches FUSE/remote mounts such as
# Keybase and also bind mounts such as /nix/store when scanning /.
findmnt -R -rn -o TARGET "$root_real" 2>/dev/null \
| awk -v root="$root_real" '
$0 != root && length($0) > length(root) { print }
'
# Static guardrails for known remote/special/noisy paths. ncdu treats
# --exclude values as patterns, so globs are intentional here.
cat <<EOF
$HOME/keybase
$HOME/.cache/keybase
$HOME/.local/share/keybase
$HOME/.config/keybase
/home/*/keybase
/keybase
/var/lib/railbird
/run/user/*/doc
EOF
}
function _safe_ncdu_scan {
local root="/"
local output=""
local arg
while [[ $# -gt 0 ]]; do
arg="$1"
case "$arg" in
-h|--help)
_safe_ncdu_usage
return 0
;;
-o|--output)
shift
output="$1"
;;
--)
shift
break
;;
-*)
echo "safe_ncdu: unknown option: $arg" >&2
_safe_ncdu_usage >&2
return 2
;;
*)
root="$arg"
;;
esac
shift
done
_safe_ncdu_require ncdu findmnt realpath awk sed date mkdir tee sort uniq || return 1
local root_real root_name out_dir latest excludes_file
root_real="$(realpath -m "$root")" || return 1
root_name="$(_safe_ncdu_root_name "$root_real")"
out_dir="$HOME/.cache/ncdu"
mkdir -p "$out_dir"
if [[ -z "$output" ]]; then
output="$out_dir/safe-ncdu-${root_name}-$(date +%Y%m%d-%H%M%S).json.zst"
fi
excludes_file="${output}.excludes"
_safe_ncdu_excludes "$root_real" | sort -u | tee "$excludes_file" >/dev/null
local -a exclude_args
local exclude
exclude_args=()
while IFS= read -r exclude; do
[[ -n "$exclude" ]] && exclude_args+=(--exclude "$exclude")
done < "$excludes_file"
echo "safe_ncdu: scanning $root_real"
echo "safe_ncdu: writing $output"
echo "safe_ncdu: excludes recorded in $excludes_file"
ncdu -0 -x -c "${exclude_args[@]}" -o "$output" "$root_real" || return $?
latest="$out_dir/latest-${root_name}.json.zst"
ln -sfn "$output" "$latest"
echo "safe_ncdu: latest symlink $latest"
ln -sfn "$excludes_file" "${latest}.excludes"
}
function _safe_ncdu_open {
local snapshot="$1"
if [[ -z "$snapshot" ]]; then
echo "safe_ncdu open: missing SNAPSHOT" >&2
return 2
fi
_safe_ncdu_require ncdu || return 1
ncdu -r -f "$snapshot"
}
function _safe_ncdu_top {
local snapshot="$1"
local limit="${2:-30}"
local query_path="${3:-}"
if [[ -z "$snapshot" ]]; then
echo "safe_ncdu top: missing SNAPSHOT" >&2
return 2
fi
_safe_ncdu_require zstdcat jq awk || return 1
zstdcat "$snapshot" | jq -r --argjson limit "$limit" --arg path "$query_path" '
def total:
if type == "array" then
((.[0].dsize // 0) + ([.[1:][] | total] | add // 0))
elif type == "object" then
(.dsize // 0)
else
0
end;
def child_name:
if type == "array" then .[0].name else .name end;
def descend($parts):
if ($parts | length) == 0 then
.
else
.[1:][]
| select(type == "array" and .[0].name == $parts[0])
| descend($parts[1:])
end;
($path
| sub("^/"; "")
| split("/")
| map(select(length > 0))) as $parts
| (.[3] | descend($parts))[1:]
| map({name: (if type == "array" then .[0].name else .name end), size: total})
| sort_by(.size)
| reverse
| .[:$limit][]
| [.name, .size]
| @tsv
' | awk -F'\t' '
{
size = $2
unit = "B"
if (size >= 1073741824) { size = size / 1073741824; unit = "GiB" }
else if (size >= 1048576) { size = size / 1048576; unit = "MiB" }
else if (size >= 1024) { size = size / 1024; unit = "KiB" }
printf "%-90s %8.1f %s\n", $1, size, unit
}
'
}
function safe_ncdu {
local subcommand="${1:-scan}"
case "$subcommand" in
scan)
shift
_safe_ncdu_scan "$@"
;;
open)
shift
_safe_ncdu_open "$@"
;;
top)
shift
_safe_ncdu_top "$@"
;;
excludes)
shift
_safe_ncdu_excludes "${1:-/}" | sort -u
;;
-h|--help|help)
_safe_ncdu_usage
;;
*)
_safe_ncdu_scan "$@"
;;
esac
}
safe_ncdu "$@"

View File

@@ -0,0 +1,41 @@
#!/usr/bin/env sh
set_multiplexer_title() {
if [ "$#" -lt 1 ]; then
echo "usage: set_multiplexer_title <title>" >&2
return 2
fi
title="$*"
if [ -n "${TMUX:-}" ]; then
multiplexer="tmux"
elif [ -n "${ZELLIJ:-}" ]; then
multiplexer="zellij"
else
return 0
fi
state_dir="${HOME}/.agents/state"
state_file="$state_dir/${multiplexer}-title"
mkdir -p "$state_dir"
if [ -f "$state_file" ]; then
last_title=$(cat "$state_file" 2>/dev/null || true)
if [ "$last_title" = "$title" ]; then
return 0
fi
fi
if [ "$multiplexer" = "tmux" ]; then
tmux rename-session "$title" \; rename-window "$title" \; select-pane -T "$title"
else
zellij action rename-session "$title" &&
zellij action rename-tab "$title" &&
zellij action rename-pane "$title"
fi
printf '%s' "$title" > "$state_file"
}
set_multiplexer_title "$@"

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env sh
function zclaude {
ZRW_NAME=claude zrw claude --dangerously-skip-permissions "$@"
}
zclaude "$@"

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env sh
function zcodex {
# Record launch directories so rofi_tmcodex can offer good defaults.
state_dir="${XDG_STATE_HOME:-$HOME/.local/state}/rofi-tmcodex"
history_file="$state_dir/dirs"
mkdir -p "$state_dir" 2>/dev/null || true
if [ -d "$PWD" ]; then
tmp="$(mktemp 2>/dev/null || true)"
if [ -n "$tmp" ]; then
{ printf '%s\n' "$PWD"; cat "$history_file" 2>/dev/null || true; } \
| awk 'NF && !seen[$0]++' \
| head -n 200 >"$tmp" 2>/dev/null || true
mv -f "$tmp" "$history_file" 2>/dev/null || true
else
printf '%s\n' "$PWD" >>"$history_file" 2>/dev/null || true
fi
fi
ZRW_NAME=codex zrw codex --dangerously-bypass-approvals-and-sandbox "$@"
}
zcodex "$@"

View File

@@ -0,0 +1,59 @@
#!/usr/bin/env sh
function _zrw_kdl_quote {
printf '"'
printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g'
printf '"'
}
function _zrw_layout_string {
command="$1"
shift
printf 'layout {\n'
printf ' pane command='
_zrw_kdl_quote "$command"
printf ' name='
_zrw_kdl_quote "${ZRW_NAME:-$(basename -- "$command")}"
printf ' cwd='
_zrw_kdl_quote "$PWD"
if [ "$#" -eq 0 ]; then
printf '\n'
else
printf ' {\n'
printf ' args'
for arg in "$@"; do
printf ' '
_zrw_kdl_quote "$arg"
done
printf '\n'
printf ' }\n'
fi
printf '}\n'
}
function _zrw_session_name {
command_name="$(basename -- "$1")"
base="$(basename -- "$PWD")"
ck="$(printf '%s' "$PWD" | cksum | awk '{print $1}')"
session="${ZRW_SESSION:-${command_name}-${base}-${ck}}"
printf '%s' "$session" | tr -cs 'A-Za-z0-9_-' '-' | sed 's/^-//;s/-$//'
}
function zrw {
if [ "$#" -eq 0 ]; then
echo "Usage: zrw COMMAND [ARG ...]" >&2
return 2
fi
tab_name="${ZRW_NAME:-$(basename -- "$1")}"
if [ -n "$ZELLIJ" ]; then
zellij action new-tab --cwd "$PWD" --name "$tab_name" -- "$@"
else
session="$(_zrw_session_name "$1")"
layout="$(_zrw_layout_string "$@")"
zellij --session "$session" --layout-string "$layout"
fi
}
zrw "$@"

View File

@@ -1 +0,0 @@

View File

@@ -1,27 +0,0 @@
# This is necessary for tramp.
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
source_if_exists ~/.custom.sh
source_if_exists ~/.this-machine.sh
function emacs_ansi_term_support {
echo -e "\033AnSiTu" "$LOGNAME" # $LOGNAME is more portable than using whoami.
echo -e "\033AnSiTc" "$(pwd)"
if [ $(uname) = "SunOS" ]; then
# The -f option does something else on SunOS and is not needed anyway.
hostname_options="";
else
hostname_options="-f";
fi
# XXX/TODO: This disables correct setting of the current directory
# when in an sshed shell when inside of emacs
# echo -e "\033AnSiTh" "$(hostname $hostname_options)" # Using the -f option can #
# cause problems on some OSes.
}
if environment_variable_exists INSIDE_EMACS; then
if [[ $INSIDE_EMACS == *"term"* ]]
then
add-zsh-hook precmd emacs_ansi_term_support
fi
fi

162
nix-darwin/flake.lock generated
View File

@@ -31,7 +31,7 @@
"railbird-secrets",
"nixpkgs"
],
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1770165109,
@@ -48,6 +48,23 @@
}
},
"brew-src": {
"flake": false,
"locked": {
"lastModified": 1776478798,
"narHash": "sha256-ERStG27tf83VbCfYMxtDSs+sa8FUMJ/3jSu/QfX9rKE=",
"owner": "Homebrew",
"repo": "brew",
"rev": "3aae056b8d072624255bc8fd27febb7f327b2265",
"type": "github"
},
"original": {
"owner": "Homebrew",
"ref": "5.1.7",
"repo": "brew",
"type": "github"
}
},
"brew-src_2": {
"flake": false,
"locked": {
"lastModified": 1774235677,
@@ -72,11 +89,11 @@
]
},
"locked": {
"lastModified": 1776370363,
"narHash": "sha256-Ul2mJIH6irPdJLiVFDUcSbc7rv7ULWutGjIv7IHOvyI=",
"lastModified": 1777126457,
"narHash": "sha256-jE5KMGZc9p2H86gCi38o2H3loV/OwICJVa8YbDmpDyg=",
"owner": "sadjow",
"repo": "claude-code-nix",
"rev": "9e198808ce7466eceb5bbd341936d6c410f9c664",
"rev": "002de6e1b2d10f4646c68af360d9dc92b89a6be9",
"type": "github"
},
"original": {
@@ -93,11 +110,11 @@
]
},
"locked": {
"lastModified": 1776288174,
"narHash": "sha256-kCvsC6JxJtcpLLPrrjptgmBlV7Zmz0NWdLfoP15+jOc=",
"lastModified": 1777054843,
"narHash": "sha256-aiuiKK6xJu5inj/RTmSl9S3jDC6RzNsKfNJ700MRPNY=",
"owner": "sadjow",
"repo": "codex-cli-nix",
"rev": "7c050fa951b5ca20a4754b42ec5242231edda35f",
"rev": "fc382bef14dcb9873769bdcb4d3b943ef2606489",
"type": "github"
},
"original": {
@@ -252,7 +269,25 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_7"
},
"locked": {
"lastModified": 1709126324,
@@ -292,6 +327,28 @@
"type": "github"
}
},
"git-sync-rs": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1777164691,
"narHash": "sha256-sgeJvKHuZK+Q+GafoKpzGhnIh23626yHIM0+chCOfUw=",
"owner": "colonelpanic8",
"repo": "git-sync-rs",
"rev": "842380a4db8ee2302cf3d333a73b7138bef17a8d",
"type": "github"
},
"original": {
"owner": "colonelpanic8",
"repo": "git-sync-rs",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -320,11 +377,11 @@
]
},
"locked": {
"lastModified": 1776454077,
"narHash": "sha256-7zSUFWsU0+jlD7WB3YAxQ84Z/iJurA5hKPm8EfEyGJk=",
"lastModified": 1777151655,
"narHash": "sha256-Th3a5OZyEy4kCoyLfefnt+2dwRIrFQqYgMsayF9qzFw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "565e5349208fe7d0831ef959103c9bafbeac0681",
"rev": "6f59831b23d03bbf4fbd13ad167ae25da294cc14",
"type": "github"
},
"original": {
@@ -358,11 +415,11 @@
"homebrew-cask": {
"flake": false,
"locked": {
"lastModified": 1776455667,
"narHash": "sha256-OKDV1G6pwELUesgrywURqPIROI6F1lm0mWCVY2ytd9Q=",
"lastModified": 1777159046,
"narHash": "sha256-/3NNjeudK+0vc4ZyCIyIf80gbhDyXWjJzLUuMaPilMI=",
"owner": "homebrew",
"repo": "homebrew-cask",
"rev": "4bcd1598f14109e9edd27f4dc9d81fde8caa7174",
"rev": "191adc33f03f399c8d97c438c8a1a9acea173f0b",
"type": "github"
},
"original": {
@@ -374,11 +431,11 @@
"homebrew-core": {
"flake": false,
"locked": {
"lastModified": 1776452660,
"narHash": "sha256-4my3q2B6l0/m6UlyrKHGpdtZi+2FO7gVbDzUPQVbtGg=",
"lastModified": 1777157463,
"narHash": "sha256-SM5CtkgezWUgd2zmIQVBcRtWpSE3VVgj5dP6nnQ5sBo=",
"owner": "homebrew",
"repo": "homebrew-core",
"rev": "8f3e1320b037c2d774334de9d9afe75e043916b5",
"rev": "8a0c7637b90ce943cd9f4520c8a1d13df81ee276",
"type": "github"
},
"original": {
@@ -398,11 +455,11 @@
]
},
"locked": {
"lastModified": 1776369368,
"narHash": "sha256-5jnqHK2pOCr6Tp8FSyDIizWhiwdfhjQwwYjiKCzfdI0=",
"lastModified": 1777109987,
"narHash": "sha256-8obD0vLqaPIhu5q6guZ3XN70+9OGzA2GWKQC4/PNcVo=",
"owner": "colonelpanic8",
"repo": "keepbook",
"rev": "4c573ac7343b588d0fff8e3cf83c100fbf272544",
"rev": "a130c6592f215e8e5727e9fd6eafd234f09f9341",
"type": "github"
},
"original": {
@@ -433,7 +490,7 @@
},
"nix-homebrew": {
"inputs": {
"brew-src": "brew-src"
"brew-src": "brew-src_2"
},
"locked": {
"lastModified": 1774720267,
@@ -451,11 +508,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1776255774,
"narHash": "sha256-psVTpH6PK3q1htMJpmdz1hLF5pQgEshu7gQWgKO6t6Y=",
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "566acc07c54dc807f91625bb286cb9b321b5f42a",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github"
},
"original": {
@@ -466,6 +523,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1776949667,
"narHash": "sha256-GMSVw35Q+294GlrTUKlx087E31z7KurReQ1YHSKp5iw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "01fbdeef22b76df85ea168fbfe1bfd9e63681b30",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1774709303,
"narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=",
@@ -484,8 +557,8 @@
"railbird-secrets": {
"inputs": {
"agenix": "agenix_2",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_2"
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1775003480,
@@ -504,17 +577,19 @@
"root": {
"inputs": {
"agenix": "agenix",
"brew-src": "brew-src",
"claude-code-nix": "claude-code-nix",
"codex-cli-nix": "codex-cli-nix",
"flake-utils": "flake-utils_3",
"git-blame-rank": "git-blame-rank",
"git-sync-rs": "git-sync-rs",
"home-manager": "home-manager_2",
"homebrew-cask": "homebrew-cask",
"homebrew-core": "homebrew-core",
"keepbook": "keepbook",
"nix-darwin": "nix-darwin",
"nix-homebrew": "nix-homebrew",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"railbird-secrets": "railbird-secrets"
}
},
@@ -552,6 +627,24 @@
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1755311859,
"narHash": "sha256-NspGtm0ZpihxlFD628pvh5ZEhL/Q6/Z9XBpe3n6ZtEw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "07619500e5937cc4669f24fec355d18a8fec0165",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -641,6 +734,21 @@
"repo": "default",
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@@ -14,6 +14,10 @@
url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git";
};
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
brew-src = {
url = "github:Homebrew/brew/5.1.7";
flake = false;
};
# Optional: Declarative tap management
homebrew-core = {
@@ -27,6 +31,11 @@
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
git-sync-rs = {
url = "github:colonelpanic8/git-sync-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
codex-cli-nix = {
# Default branch is `main` on GitHub (not `master`).
url = "github:sadjow/codex-cli-nix/main";
@@ -54,6 +63,7 @@
outputs = inputs @ {
self,
agenix,
git-sync-rs,
nix-darwin,
nixpkgs,
home-manager,
@@ -61,24 +71,59 @@
...
}: let
libDir = ../dotfiles/lib;
# Keep this on the currently-existing macOS account until the target user
# exists locally and its home directory has been migrated.
activePrimaryUser = "kat";
targetPrimaryUser = "imalison";
primaryUser = activePrimaryUser;
personalUsers = [
activePrimaryUser
targetPrimaryUser
];
# Home Manager activation should only target accounts that exist today.
# Add targetPrimaryUser here when the macOS account is ready.
enabledHomeUsers = [
activePrimaryUser
];
sharedHomeModules = [
./home/common.nix
./home/git-sync.nix
./home/syncthing.nix
];
homeForUser = user: "/Users/${user}";
configuration = {
pkgs,
lib,
config,
...
}: let
essentialPkgs = (import ../nixos/essential.nix {inherit pkgs lib inputs;}).environment.systemPackages;
essentialPkgs = (import ../nix-shared/system/essential.nix {inherit pkgs lib inputs;}).environment.systemPackages;
disabledAppleSymbolicHotKey = parameters: {
enabled = false;
value = {
inherit parameters;
type = "standard";
};
};
in {
networking.hostName = "mac-demarco-mini";
imports = [(import ./gitea-actions-runner.nix)];
imports = [
(import ./gitea-actions-runner.nix)
];
age = {
identityPaths = [
"${config.users.users.kat.home}/.ssh/id_ed25519"
"${config.users.users.${primaryUser}.home}/.ssh/id_ed25519"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key"
];
secrets.gitea-runner-token.file = ../nixos/secrets/gitea-runner-token.mac-demarco-mini.age;
secrets.tailscale-authkey = {
file = ../nixos/secrets/tailscale-authkey.age;
owner = "root";
mode = "0400";
};
};
services.tailscale.enable = true;
services.gitea-actions-runner = {
user = "gitea-runner";
instances.nix = {
@@ -108,7 +153,7 @@
just
git-lfs
isort
gitFull
git
gnused
ncdu
nixVersions.stable
@@ -124,14 +169,70 @@
XDG_CACHE_HOME = "/var/lib/gitea-runner/.cache";
XDG_RUNTIME_DIR = "/var/lib/gitea-runner/tmp";
};
launchd.daemons.tailscaled.serviceConfig.KeepAlive = true;
system.primaryUser = "kat";
launchd.daemons.tailscale-autoconnect = {
script = ''
set -euo pipefail
key_file='${config.age.secrets.tailscale-authkey.path}'
if [ ! -s "$key_file" ]; then
exit 0
fi
if [ "$(cat "$key_file")" = "DISABLED" ]; then
exit 0
fi
for _ in $(${pkgs.coreutils}/bin/seq 1 30); do
state="$(${config.services.tailscale.package}/bin/tailscale status --json 2>/dev/null | ${pkgs.jq}/bin/jq -r '.BackendState // empty' || true)"
if [ "$state" = "Running" ]; then
exit 0
fi
if [ -n "$state" ]; then
break
fi
sleep 2
done
${config.services.tailscale.package}/bin/tailscale up \
--auth-key "file:$key_file" \
--accept-dns=true \
--operator="${primaryUser}" \
--timeout=60s
'';
serviceConfig = {
RunAtLoad = true;
StartInterval = 300;
StandardOutPath = "/var/log/tailscale-autoconnect.log";
StandardErrorPath = "/var/log/tailscale-autoconnect.err.log";
};
};
system.primaryUser = primaryUser;
security.sudo.extraConfig = ''
${primaryUser} ALL=(ALL) NOPASSWD: ALL
'';
system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = false;
system.defaults.CustomUserPreferences."com.apple.screensaver".idleTime = 300;
system.defaults.CustomUserPreferences."com.apple.symbolichotkeys".AppleSymbolicHotKeys = {
# Disable input source shortcuts that conflict with launcher usage.
"60" = disabledAppleSymbolicHotKey [32 49 262144];
"61" = disabledAppleSymbolicHotKey [32 49 786432];
# Disable Spotlight's Command-Space and Finder search window shortcuts.
"64" = disabledAppleSymbolicHotKey [32 49 1048576];
"65" = disabledAppleSymbolicHotKey [32 49 1572864];
};
system.defaults.screensaver.askForPassword = false;
system.defaults.screensaver.askForPasswordDelay = 0;
system.activationScripts.postActivation.text = ''
echo >&2 "current-host screensaver defaults..."
launchctl asuser "$(id -u -- ${primaryUser})" sudo --user=${primaryUser} -- defaults -currentHost write com.apple.screensaver askForPassword -bool false
launchctl asuser "$(id -u -- ${primaryUser})" sudo --user=${primaryUser} -- defaults -currentHost write com.apple.screensaver askForPasswordDelay -int 0
'';
power.sleep = {
computer = "never";
display = "never";
@@ -174,14 +275,20 @@
};
nixpkgs.overlays = [
(import ../nixos/overlay.nix)
(import ../nix-shared/overlays)
# Use codex and claude-code from dedicated flakes with cachix
(final: prev: {
codex = inputs.codex-cli-nix.packages.${prev.stdenv.hostPlatform.system}.default;
claude-code = inputs.claude-code-nix.packages.${prev.stdenv.hostPlatform.system}.default;
git-sync-rs = git-sync-rs.packages.${prev.stdenv.hostPlatform.system}.default;
})
];
environment.systemPackages = essentialPkgs ++ [pkgs.spotify];
environment.systemPackages =
essentialPkgs
++ [
pkgs.gnupg
pkgs.spotify
];
nixpkgs.config.allowUnfree = true;
@@ -193,9 +300,17 @@
# Homebrew casks (managed by nix-darwin, installed by nix-homebrew)
homebrew = {
enable = true;
taps = builtins.attrNames config.nix-homebrew.taps;
brews = [
"ddcctl"
"m1ddc"
];
casks = [
"codex-app"
"ghostty"
"hammerspoon"
"raycast"
"vlc"
];
masApps = {
Xcode = 497799835;
@@ -205,6 +320,10 @@
# Auto upgrade nix package and the daemon service.
launchd.user.envVariables.PATH = config.environment.systemPath;
launchd.user.agents.hammerspoon.serviceConfig = {
ProgramArguments = ["/usr/bin/open" "-gja" "Hammerspoon"];
RunAtLoad = true;
};
programs.direnv.enable = true;
@@ -231,18 +350,20 @@
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
users.users.kat.openssh.authorizedKeys.keys = inputs.railbird-secrets.keys.kanivanKeys;
users.users.gitea-runner = {
name = "gitea-runner";
isHidden = false;
home = "/Users/gitea-runner";
createHome = false;
};
users.users.kat = {
name = "kat";
home = "/Users/kat";
};
users.users =
lib.genAttrs personalUsers (user: {
name = user;
home = homeForUser user;
openssh.authorizedKeys.keys = inputs.railbird-secrets.keys.kanivanKeys;
})
// {
gitea-runner = {
name = "gitea-runner";
isHidden = false;
home = "/Users/gitea-runner";
createHome = false;
};
};
programs.zsh = {
enable = true;
@@ -255,10 +376,8 @@
extraSpecialArgs = {
inherit inputs libDir;
};
sharedModules = [./home/common.nix];
users.kat = {
imports = [./home/kat.nix];
};
sharedModules = sharedHomeModules;
users = lib.genAttrs enabledHomeUsers (_: {});
};
};
in {
@@ -270,8 +389,14 @@
{
nix-homebrew = {
enable = true;
user = "kat";
user = primaryUser;
autoMigrate = true;
package =
inputs.brew-src
// {
name = "brew-5.1.7";
version = "5.1.7";
};
taps = {
"homebrew/homebrew-core" = inputs.homebrew-core;
"homebrew/homebrew-cask" = inputs.homebrew-cask;

View File

@@ -58,7 +58,7 @@
just
git-lfs
isort
gitFull
git
gnused
ncdu
nixFlakes
@@ -112,13 +112,13 @@
};
};
nixpkgs.overlays = [(import ../nixos/overlay.nix)];
nixpkgs.overlays = [(import ../nix-shared/overlays)];
environment.systemPackages = with pkgs; [
#python-with-my-packages
emacs
alejandra
cocoapods
gitFull
git
just
tmux
htop

View File

@@ -1,21 +1,75 @@
{
config,
inputs,
libDir,
lib,
pkgs,
...
}: let
dotfilesDir = builtins.dirOf (toString libDir);
srcDotfilesDir = builtins.dirOf libDir;
worktreeDotfilesDir = "${config.home.homeDirectory}/dotfiles/dotfiles";
outOfStore = config.lib.file.mkOutOfStoreSymlink;
replaceRuntimeDir = builtins.replaceStrings ["$XDG_RUNTIME_DIR"] ["\${XDG_RUNTIME_DIR}"];
gpgKeyPath = replaceRuntimeDir config.age.secrets.gpg-keys.path;
gpgPassphrasePath = replaceRuntimeDir config.age.secrets.gpg-passphrase.path;
raycastPath = lib.concatStringsSep ":" [
"${config.home.homeDirectory}/.nix-profile/bin"
"/run/current-system/sw/bin"
"/opt/homebrew/bin"
"/usr/local/bin"
"/usr/bin"
"/bin"
"/usr/sbin"
"/sbin"
];
importGpgKeyScript = pkgs.writeShellScript "import-gpg-key" ''
set -eu
key_path=${gpgKeyPath}
passphrase_path=${gpgPassphrasePath}
attempts=0
while [ "$attempts" -lt 30 ]; do
if [ -r "$key_path" ] && [ -r "$passphrase_path" ]; then
break
fi
attempts=$((attempts + 1))
sleep 1
done
if [ ! -r "$key_path" ] || [ ! -r "$passphrase_path" ]; then
echo "Timed out waiting for agenix GPG secrets" >&2
exit 1
fi
normalized_key_file="$(mktemp)"
trap 'rm -f "$normalized_key_file"' EXIT
# Some historical exports omitted the required blank line after the
# armor header. GnuPG imports the keys but exits non-zero in that case.
awk '
pending_blank {
if ($0 != "") {
print ""
}
pending_blank = 0
}
{ print }
/^-----BEGIN PGP PRIVATE KEY BLOCK-----$/ {
pending_blank = 1
}
' "$key_path" > "$normalized_key_file"
exec ${pkgs.gnupg}/bin/gpg \
--batch \
--pinentry-mode loopback \
--passphrase-file "$passphrase_path" \
--import "$normalized_key_file"
'';
multiplexerAliases = import ../../shared/multiplexer-aliases.nix;
excludedTopLevelEntries = [
"agents"
"claude"
"codex"
"config"
"emacs.d"
"zshenv"
"zshrc"
];
excludedConfigEntries = [
@@ -26,33 +80,101 @@
name = ".${name}";
value = {
force = true;
source = outOfStore "${dotfilesDir}/${name}";
source = outOfStore "${worktreeDotfilesDir}/${name}";
};
}) (lib.subtractLists excludedTopLevelEntries (builtins.attrNames (builtins.readDir dotfilesDir))));
}) (lib.subtractLists excludedTopLevelEntries (builtins.attrNames (builtins.readDir srcDotfilesDir))));
xdgConfigLinks = lib.listToAttrs (map (name: {
name = name;
value = {
force = true;
source = outOfStore "${dotfilesDir}/config/${name}";
source = outOfStore "${worktreeDotfilesDir}/config/${name}";
};
}) (lib.subtractLists excludedConfigEntries (builtins.attrNames (builtins.readDir "${dotfilesDir}/config"))));
}) (lib.subtractLists excludedConfigEntries (builtins.attrNames (builtins.readDir "${srcDotfilesDir}/config"))));
in {
imports = [
inputs.agenix.homeManagerModules.default
../../nix-shared/home-manager/codex-generated-skills.nix
];
programs.home-manager.enable = true;
age.identityPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
age.secrets.gpg-keys.file = ../../nixos/secrets/gpg-keys.age;
age.secrets.gpg-passphrase.file = ../../nixos/secrets/gpg-passphrase.age;
home.file = dotfilesLinks;
home.activation.linkEmacsDotdir = lib.hm.dag.entryAfter ["writeBoundary"] ''
live_emacs_dir="$HOME/dotfiles/dotfiles/emacs.d"
target_emacs_dir="${dotfilesDir}/emacs.d"
if [ -d "$live_emacs_dir" ]; then
target_emacs_dir="$live_emacs_dir"
myModules.codexGeneratedSkills.enable = true;
home.packages =
[
(pkgs.pass.withExtensions (ext: [ext.pass-otp]))
]
++ (with pkgs; [
alejandra
alt-tab-macos
claude-code
cocoapods
codex
gnupg
nodejs
playwright-cli
prettier
slack
tea
typescript
vim
yarn
]);
home.activation.repairGpgHomeAndImportKey = lib.hm.dag.entryAfter ["writeBoundary"] ''
gnupg_dir="$HOME/.gnupg"
password_store_gpg_id="$HOME/.password-store/.gpg-id"
/bin/mkdir -p "$gnupg_dir"
/bin/chmod 700 "$gnupg_dir"
if [ -r "$password_store_gpg_id" ]; then
needs_import=0
while IFS= read -r recipient; do
case "$recipient" in
""|\#*)
continue
;;
esac
if ! ${pkgs.gnupg}/bin/gpg --batch --list-secret-keys --with-colons "$recipient" 2>/dev/null | /usr/bin/grep -q '^sec:'; then
needs_import=1
break
fi
done < "$password_store_gpg_id"
if [ "$needs_import" -eq 1 ]; then
${importGpgKeyScript}
fi
fi
if [ -L "$HOME/.emacs.d" ] || [ ! -e "$HOME/.emacs.d" ]; then
rm -f "$HOME/.emacs.d"
ln -s "$target_emacs_dir" "$HOME/.emacs.d"
else
echo "Skipping ~/.emacs.d relink because it is not a symlink" >&2
'';
home.activation.configureRaycastHotkey = lib.hm.dag.entryAfter ["writeBoundary"] ''
raycast_domain="com.raycast.macos"
desired_hotkey="Command-49"
current_hotkey="$(/usr/bin/defaults read "$raycast_domain" raycastGlobalHotkey 2>/dev/null || true)"
if [ -d /Applications/Raycast.app ]; then
/usr/bin/xattr -dr com.apple.quarantine /Applications/Raycast.app 2>/dev/null || true
fi
if [ "$current_hotkey" != "$desired_hotkey" ]; then
/usr/bin/defaults write "$raycast_domain" raycastGlobalHotkey -string "$desired_hotkey"
/usr/bin/defaults write "$raycast_domain" mainWindow_isMonitoringGlobalHotkeys -bool true
if /usr/bin/pgrep -x Raycast >/dev/null 2>&1; then
/usr/bin/killall Raycast || true
/bin/sleep 1
fi
/usr/bin/open /Applications/Raycast.app || true
fi
'';
@@ -90,12 +212,62 @@ in {
defaultCacheTtl = 8 * 60 * 60;
maxCacheTtl = 8 * 60 * 60;
enableSshSupport = true;
pinentry.package = lib.mkIf pkgs.stdenv.isDarwin pkgs.pinentry_mac;
extraConfig = ''
allow-emacs-pinentry
allow-loopback-pinentry
'';
};
launchd.agents.import-gpg-key = {
enable = true;
config = {
ProgramArguments = ["${importGpgKeyScript}"];
KeepAlive = {
Crashed = false;
SuccessfulExit = false;
};
ProcessType = "Background";
RunAtLoad = true;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/import-gpg-key.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/import-gpg-key.err.log";
};
};
launchd.agents.raycast = lib.mkIf pkgs.stdenv.isDarwin {
enable = true;
config = {
EnvironmentVariables = {
PATH = raycastPath;
};
ProgramArguments = [
"/usr/bin/open"
"/Applications/Raycast.app"
];
KeepAlive = false;
ProcessType = "Interactive";
RunAtLoad = true;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/raycast-launchd.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/raycast-launchd.err.log";
};
};
launchd.agents.alt-tab = lib.mkIf pkgs.stdenv.isDarwin {
enable = true;
config = {
ProgramArguments = [
"/usr/bin/open"
"-gj"
"${pkgs.alt-tab-macos}/Applications/AltTab.app"
];
KeepAlive = false;
ProcessType = "Interactive";
RunAtLoad = true;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/alt-tab-launchd.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/alt-tab-launchd.err.log";
};
};
programs.starship = {
enable = true;
};
@@ -109,8 +281,7 @@ in {
};
shellAliases = {
df_ssh = "TERM='xterm-256color' ssh -o StrictHostKeyChecking=no";
ta = "tmux attach";
};
} // multiplexerAliases;
initContent = lib.mkMerge [
(lib.mkOrder 550 ''
fpath+="${libDir}/functions"
@@ -128,4 +299,6 @@ in {
};
xdg.configFile = xdgConfigLinks;
home.stateVersion = "24.05";
}

View File

@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}: let
gitSyncPackage =
if pkgs ? "git-sync-rs"
then pkgs."git-sync-rs"
else pkgs.git-sync;
orgPath = "${config.home.homeDirectory}/org";
passwordStorePath = "${config.home.homeDirectory}/.password-store";
in {
services.git-sync = {
enable = true;
package = gitSyncPackage;
repositories = {
org = {
path = orgPath;
uri = "git@github.com:colonelpanic8/org.git";
interval = 180;
};
password-store = {
path = passwordStorePath;
uri = "git@github.com:colonelpanic8/.password-store.git";
};
};
};
# git-sync-rs does not infer the repository from launchd's WorkingDirectory.
launchd.agents = {
git-sync-org.config.ProgramArguments =
lib.mkForce ["${gitSyncPackage}/bin/git-sync" "-d" orgPath];
git-sync-password-store.config.ProgramArguments =
lib.mkForce ["${gitSyncPackage}/bin/git-sync" "-d" passwordStorePath];
};
}

View File

@@ -1,36 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
alejandra
claude-code
cocoapods
codex
nodejs
prettier
slack
tea
typescript
vim
yarn
];
services.git-sync = {
enable = true;
package =
if pkgs ? "git-sync-rs"
then pkgs."git-sync-rs"
else pkgs.git-sync;
repositories = {
org = {
path = "/Users/kat/org";
uri = "git@github.com:colonelpanic8/org.git";
interval = 180;
};
password-store = {
path = "/Users/kat/.password-store";
uri = "git@github.com:IvanMalison/.password-store.git";
};
};
};
home.stateVersion = "24.05";
}

View File

@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}: let
shared = import ../../nix-shared/syncthing.nix;
inherit (shared) devices allDevices;
in {
home.activation.ensureSyncthingDirectories = lib.hm.dag.entryAfter ["writeBoundary"] ''
/bin/mkdir -p "$HOME/Library/Logs/Syncthing" "$HOME/sync" "$HOME/railbird"
'';
services.syncthing = {
enable = true;
package = pkgs.syncthing;
settings = {
inherit devices;
folders = {
sync = {
path = "~/sync";
devices = allDevices;
ignorePerms = true;
};
railbird = {
path = "~/railbird";
devices = allDevices;
ignorePerms = true;
};
};
options = {
relaysEnabled = true;
localAnnounceEnabled = true;
};
};
};
}

View File

@@ -1 +0,0 @@
/nix/store/n2y9x01zld5simp7y6vnblddq8bnykmm-darwin-system-26.05.06648f4

View File

@@ -0,0 +1,67 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.myModules.codexGeneratedSkills;
in {
options.myModules.codexGeneratedSkills = {
enable = lib.mkEnableOption "generated Codex skill setup";
codexHome = lib.mkOption {
type = lib.types.str;
default = "${config.home.homeDirectory}/.codex";
description = "Codex home directory.";
};
skillsDir = lib.mkOption {
type = lib.types.str;
default = "${cfg.codexHome}/skills";
description = "Codex skills directory.";
};
primaryRuntimeDir = lib.mkOption {
type = lib.types.str;
default = "${config.home.homeDirectory}/.cache/codex-runtimes/codex-primary-runtime";
description = "Codex primary runtime cache directory.";
};
};
config = lib.mkIf cfg.enable {
home.activation.setupCodexGeneratedSkills = lib.hm.dag.entryAfter ["writeBoundary"] ''
codex_home=${lib.escapeShellArg cfg.codexHome}
skills_dir=${lib.escapeShellArg cfg.skillsDir}
runtime_skills_root=${lib.escapeShellArg "${cfg.primaryRuntimeDir}/skills/skills"}
mkdir -p "$skills_dir"
if [ -x ${lib.escapeShellArg "${pkgs.codex}/bin/codex"} ]; then
if ! CODEX_HOME="$codex_home" ${lib.escapeShellArg "${pkgs.codex}/bin/codex"} debug prompt-input "bootstrap generated Codex skills" >/dev/null; then
echo "setupCodexGeneratedSkills: codex failed to bootstrap .system skills" >&2
fi
else
echo "setupCodexGeneratedSkills: codex binary not found; skipping .system skill bootstrap" >&2
fi
if [ -d "$runtime_skills_root" ]; then
tmp_dir="$(mktemp -d "''${TMPDIR:-/tmp}/codex-primary-runtime.XXXXXX")"
trap 'rm -rf "$tmp_dir"' EXIT
mkdir -p "$tmp_dir/codex-primary-runtime"
for skill_name in slides spreadsheets; do
if [ -d "$runtime_skills_root/$skill_name" ]; then
cp -R "$runtime_skills_root/$skill_name" "$tmp_dir/codex-primary-runtime/$skill_name"
fi
done
if [ "$(find "$tmp_dir/codex-primary-runtime" -mindepth 1 -maxdepth 1 -type d | wc -l | tr -d ' ')" != "0" ]; then
rm -rf "$skills_dir/codex-primary-runtime"
mv "$tmp_dir/codex-primary-runtime" "$skills_dir/codex-primary-runtime"
fi
else
echo "setupCodexGeneratedSkills: runtime skills not found at $runtime_skills_root; skipping codex-primary-runtime" >&2
fi
'';
};
}

View File

@@ -75,6 +75,10 @@ in
dontCheckRuntimeDeps = true;
});
direnv = prev.direnv.overrideAttrs (_: {
doCheck = false;
});
magma = prev.magma.overrideAttrs (oldAttrs: {
# The CUDA codegen step in magma 2.9.0 can segfault when `make generate`
# fans out across all cores. Keep the rest of the build parallel.
@@ -307,9 +311,9 @@ from transformers import (/' \
'';
});
happy-coder = final.callPackage ./packages/happy-coder { };
playwright-cli = final.callPackage ./packages/playwright-cli { };
t3code = final.callPackage ./packages/t3code { };
happy-coder = final.callPackage ../../nixos/packages/happy-coder { };
playwright-cli = final.callPackage ../../nixos/packages/playwright-cli { };
t3code = final.callPackage ../../nixos/packages/t3code { };
# Custom Waybar fork for workspace taskbar support + external SNI watcher option.
waybar = prev.waybar.overrideAttrs (old: {
src = prev.fetchFromGitHub {

26
nix-shared/syncthing.nix Normal file
View File

@@ -0,0 +1,26 @@
let
devices = {
adele = {id = "DAU7EFY-PDPH4H6-PIIWMPI-3CSTDZK-SZOINSZ-VCHOHGV-G54TEYD-A27S4QQ";};
biskcomp = {
id = "PVGY6OH-WJEA5SD-SL5YI3F-72AZKVL-ZXHIWEW-D5V245P-VUM2BST-CH47JQD";
addresses = ["tcp://192.168.1.44:22000" "tcp://1896Folsom.duckdns.org:22000"];
};
ryzen-shine = {id = "IYCR3JH-BDZ4N3F-ZBUETYR-4N2UILK-FAEJJ5B-YUYMZQ3-YN63E5T-I2EHCAK";};
nixquick = {id = "6OAGJ3J-3P3R33R-ICHXDWX-IDDCUU7-ESN3Y65-2OGZMWL-R647V7N-4TA6IQM";};
pixel-7-pro = {id = "RZGPHX3-W5BPHLT-I4VLQVI-ZW4K7CE-X525NEN-XRG6MOH-GPEUXAD-4VG3XAR";};
jay-lenovo-wsl = {id = "F3HW6DZ-B7BFACJ-SRAUM7Z-56TXQJ5-5WKZT5A-GKXAHVD-YLXFJ4M-G7OJQQC";};
jay-lenovo = {id = "AP5ZUKJ-QBVYWCN-DYHR3UB-JJXRWNI-CAORGYM-HWRKHEH-ZJSTRLN-PP5USQX";};
jimi-hendnix = {id = "55JWW5K-4NY5DKT-TR4MVPO-UNOMQKM-J7TYCRF-CCCZGPM-FVRKHID-JVFLAAV";};
railbird-sf = {id = "5F4FPJM-KRBFVIH-CTTB2NC-7CPVGAM-CONMH2Q-SQPRODO-CWKRFPF-HVN4AAD";};
dean = {id = "RIVW4FP-NZNGGGD-4ET26IC-R6CZHEU-4EBIDHX-U756VWB-W7EM3LE-3YQ6YA3";};
mixos = {id = "7DMMUDT-CO33EMS-LQW65MX-3BVYDBT-ZZWDJC6-SWEF6SW-ICUMWOE-ZC4IBQK";};
strixi-minaj-wsl = {id = "DOAEFFI-W6EZY3K-GDUHDLX-6DQPVFC-XU3G65X-5KX6RKK-EMF7ZT7-YKKKOAM";};
strixi-minaj = {id = "IF76WOS-WVYFAQG-ZZMIT3R-ZR6EQQH-YQP3FGZ-BJ3LJKO-56FK2XA-UREADQM";};
dean-zephyrus = {id = "UVIQVZQ-WFWVUQT-OTXPK7V-RXFKAVV-RY5DV2Z-XZEH3Q2-JQZIQLW-XMSB6AT";};
bencbox = {id = "FZFDBDG-J56RKLU-JZUHEAB-SAGB6CM-LRR6QFC-ZLNQG22-R2DEXAC-MY4BXQN";};
mac-demarco-mini = {id = "ICRKXMI-74TTIAT-S4X24GH-GBCF5VU-XH4FA3Z-XQWJH5F-WWDH5FK-DHC5NAT";};
};
in {
inherit devices;
allDevices = builtins.attrNames devices;
}

View File

@@ -4,8 +4,17 @@
inputs,
...
}: let
git-blame-rank = inputs.git-blame-rank.packages.${pkgs.stdenv.hostPlatform.system}.default;
keepbook = inputs.keepbook.packages.${pkgs.stdenv.hostPlatform.system}.keepbook.overrideAttrs (_: {
system = pkgs.stdenv.hostPlatform.system;
inputPackageOrNull = inputName: packageName: let
input = inputs.${inputName} or null;
packages = if input == null then null else input.packages or null;
systemPackages = if packages == null then null else packages.${system} or null;
in
if systemPackages == null then null else systemPackages.${packageName} or null;
git-blame-rank = inputs.git-blame-rank.packages.${system}.default;
coquiTtsStreamer = inputPackageOrNull "coqui-tts-streamer" "default";
keepbook = inputs.keepbook.packages.${system}.keepbook.overrideAttrs (_: {
# Upstream checks currently depend on TS artifacts that are not built in Nix.
doCheck = false;
});
@@ -19,6 +28,7 @@
cachix
bubblewrap
cmake
dex
direnv
fd
ffmpeg
@@ -30,7 +40,7 @@
git-blame-rank
git-lfs
git-sync
gitFull
git
gnumake
home-manager
htop
@@ -53,11 +63,14 @@
silver-searcher
skim
tmux
zellij
unzip
wget
xkcdpass
yubikey-manager
]) ++ lib.optionals (builtins.hasAttr "git-sync-rs" pkgs) [pkgs.git-sync-rs]);
])
++ lib.optionals (coquiTtsStreamer != null) [coquiTtsStreamer]
++ lib.optionals (builtins.hasAttr "git-sync-rs" pkgs) [pkgs.git-sync-rs]);
linuxOnly = with pkgs; [
dex
@@ -76,12 +89,14 @@
sshfs
sysz
gdb
gitFull
udiskie
usbutils
tzupdate
];
darwinOnly = with pkgs; [
emacs
];
in {
nixpkgs.config.allowBroken = true;

View File

@@ -71,9 +71,12 @@ makeEnable config "myModules.base" true {
# The tzupdate.timer handles triggering with OnStartupSec=30s delay.
# We disable the service's direct WantedBy since network-online.target
# is reached before network is actually online (because we disable
# NetworkManager-wait-online.service to avoid boot hangs).
# NetworkManager-wait-online.service to avoid boot hangs). Also disable
# timer persistence so a missed hourly tick does not trigger an immediate
# catch-up run at boot before networking has settled.
services.tzupdate.enable = true;
systemd.services.tzupdate.wantedBy = pkgs.lib.mkForce [];
systemd.timers.tzupdate.timerConfig.Persistent = pkgs.lib.mkForce false;
# TODO: Add a comment explaining what this does.
services.locate.enable = true;

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }:
{
imports = [
./essential.nix
../nix-shared/system/essential.nix
];
environment.systemPackages = with pkgs; [
emacs-auto

View File

@@ -10,7 +10,7 @@
./desktop.nix
./electron.nix
./environment.nix
./essential.nix
../nix-shared/system/essential.nix
./extra.nix
./games.nix
./git-sync.nix

View File

@@ -55,9 +55,13 @@ let
};
in
{
imports = [ ../nix-shared/home-manager/codex-generated-skills.nix ];
home.file =
builtins.listToAttrs (map mkManaged managedRelFiles);
myModules.codexGeneratedSkills.enable = true;
# Home Manager directory links for .emacs.d resolve through the store on this
# machine, which breaks Elpaca's writable state under ~/.emacs.d/elpaca.
# Manage placement here instead so ~/.emacs.d always points at the live
@@ -70,4 +74,5 @@ in
echo "Skipping ~/.emacs.d relink because it is not a symlink" >&2
fi
'';
}

View File

@@ -12,6 +12,7 @@ let
++ (map (machineName: "${machineName}.local") machineNames)
++ extraManagedSshHosts;
managedSshHostCasePattern = lib.concatStringsSep "|" managedSshHostPatterns;
multiplexerAliases = import ../shared/multiplexer-aliases.nix;
in
with lib;
{
@@ -81,8 +82,7 @@ with lib;
shellAliases = {
df_ssh = "TERM=xterm-256color ssh -o StrictHostKeyChecking=no";
fix_nix = "LD_LIBRARY_PATH='' nix";
ta = "tmux attach";
};
} // multiplexerAliases;
variables = {
ROFI_SYSTEMD_TERM = "ghostty -e";
NIXPKGS_GIT_REV = "${inputs.nixpkgs.rev}";

260
nixos/flake.lock generated
View File

@@ -80,11 +80,11 @@
]
},
"locked": {
"lastModified": 1775558810,
"narHash": "sha256-fy95EdPnqQlpbP8+rk0yWKclWShCUS5VKs6P7/1MF2c=",
"lastModified": 1776876344,
"narHash": "sha256-Ubqb/agkuMJK+k19gjQgHux/eOYRc1sRGoOZOho8+VY=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "7371b669b22aa2af980f913fc312a786d2f1abb2",
"rev": "648a13d0ee1e03a843b3e145b8ece15393058701",
"type": "github"
},
"original": {
@@ -126,11 +126,11 @@
"quickshell": "quickshell"
},
"locked": {
"lastModified": 1775801889,
"narHash": "sha256-q1LGwhQbNOurIAClh5YwKVU2kJ5lTCxRYZf48bAb9IM=",
"lastModified": 1776670101,
"narHash": "sha256-VmPWtG6H+k2tgGnpYwNO5YueHOBdOXXTiBTrjXqcHag=",
"owner": "caelestia-dots",
"repo": "shell",
"rev": "0e07176ff149d02391531c802b51c28e73185f30",
"rev": "b94ee8d41bad1ea59395d6184425036fa7121bc5",
"type": "github"
},
"original": {
@@ -149,11 +149,11 @@
]
},
"locked": {
"lastModified": 1775629582,
"narHash": "sha256-eWpI32JAEKfOV7xBlMrYkLi9MPy5psa3VzYSrgdb+tI=",
"lastModified": 1777126457,
"narHash": "sha256-jE5KMGZc9p2H86gCi38o2H3loV/OwICJVa8YbDmpDyg=",
"owner": "sadjow",
"repo": "claude-code-nix",
"rev": "68729dcb5e746b0c7d34e4bf04b6f99628124871",
"rev": "002de6e1b2d10f4646c68af360d9dc92b89a6be9",
"type": "github"
},
"original": {
@@ -172,11 +172,11 @@
]
},
"locked": {
"lastModified": 1775882637,
"narHash": "sha256-e2jaiMpQr2N/AxhRqt1NA0DU7jC9Sv0pvNnpCuyXxuw=",
"lastModified": 1777054843,
"narHash": "sha256-aiuiKK6xJu5inj/RTmSl9S3jDC6RzNsKfNJ700MRPNY=",
"owner": "sadjow",
"repo": "codex-cli-nix",
"rev": "d4223ed9ee52efe572c1612579c3c6a80bc4d8db",
"rev": "fc382bef14dcb9873769bdcb4d3b943ef2606489",
"type": "github"
},
"original": {
@@ -186,6 +186,33 @@
"type": "github"
}
},
"coqui-tts-streamer": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": [
"git-sync-rs",
"rust-overlay"
]
},
"locked": {
"lastModified": 1776281033,
"narHash": "sha256-Loz5kJHCM8Q04suAZ8683LdW7AP1kn4EszZe1ZjXqGM=",
"owner": "colonelpanic8",
"repo": "coqui-tts-streamer",
"rev": "5b522e3c96db61e2232c917f2c6e3f2570f98a47",
"type": "github"
},
"original": {
"owner": "colonelpanic8",
"repo": "coqui-tts-streamer",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@@ -551,27 +578,6 @@
}
},
"git-ignore-nix_2": {
"inputs": {
"nixpkgs": [
"imalison-taffybar",
"nixpkgs"
]
},
"locked": {
"lastModified": 1762808025,
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"git-ignore-nix_3": {
"inputs": {
"nixpkgs": [
"kanshi-sni",
@@ -601,11 +607,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1772717837,
"narHash": "sha256-Q95ZH+Mr6dnSLLdy3vfX5l0cFal75bS1LI2IrN34sBQ=",
"lastModified": 1777164691,
"narHash": "sha256-sgeJvKHuZK+Q+GafoKpzGhnIh23626yHIM0+chCOfUw=",
"owner": "colonelpanic8",
"repo": "git-sync-rs",
"rev": "2fc9bddfedfa93ca600f4c21edbdc35e72b29d59",
"rev": "842380a4db8ee2302cf3d333a73b7138bef17a8d",
"type": "github"
},
"original": {
@@ -729,11 +735,11 @@
]
},
"locked": {
"lastModified": 1775677668,
"narHash": "sha256-cxKncYR4mPOlVB3hFqZEcC/4A6hGwunH1PWEubUr5XE=",
"lastModified": 1777308348,
"narHash": "sha256-DJx9wnerjsOqKOo8I7/u5ENRhRWFF2mbYcACF+mn5LU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "01ea51d7065e0ab06a09df9db4d1c17f6eb2675f",
"rev": "a28e848a01044f47679453aae75f6253bef7903e",
"type": "github"
},
"original": {
@@ -764,6 +770,29 @@
"type": "github"
}
},
"hyprNStack": {
"inputs": {
"hyprland": [
"hyprland-lua-config"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1777317717,
"narHash": "sha256-Rj4vx0RvEWtnpnizggWRtrGe092bXiGLLt0WijwYWtI=",
"owner": "colonelpanic8",
"repo": "hyprNStack",
"rev": "94607cd53f2ddac88f6b26261393275e7dd590ef",
"type": "github"
},
"original": {
"owner": "colonelpanic8",
"repo": "hyprNStack",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
@@ -809,11 +838,11 @@
]
},
"locked": {
"lastModified": 1772461003,
"narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=",
"lastModified": 1776511930,
"narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7",
"rev": "39435900785d0c560c6ae8777d29f28617d031ef",
"type": "github"
},
"original": {
@@ -867,11 +896,11 @@
]
},
"locked": {
"lastModified": 1775496928,
"narHash": "sha256-Ds759WU03mGWtu3I43J+5GF5Ni8TvF+GYQUFD+fVeMo=",
"lastModified": 1776426399,
"narHash": "sha256-RUESLKNikIeEq9ymGJ6nmcDXiSFQpUW1IhJ245nL3xM=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "cf95d93d17baa18f1d9b016b3afe27f820521a6e",
"rev": "68d064434787cf1ed4a2fe257c03c5f52f33cf84",
"type": "github"
},
"original": {
@@ -992,11 +1021,11 @@
]
},
"locked": {
"lastModified": 1774710575,
"narHash": "sha256-p7Rcw13+gA4Z9EI3oGYe3neQ3FqyOOfZCleBTfhJ95Q=",
"lastModified": 1776426575,
"narHash": "sha256-KI6nIfVihn/DPaeB5Et46Xg3dkNHrrEtUd5LBBVomB0=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "0703df899520001209646246bef63358c9881e36",
"rev": "a968d211048e3ed538e47b84cb3649299578f19d",
"type": "github"
},
"original": {
@@ -1022,11 +1051,11 @@
"xdph": "xdph_2"
},
"locked": {
"lastModified": 1776451806,
"narHash": "sha256-iazLQjRsKr6IYlpEXg7ifkNRXYba+ovd9m9HR1Tyrbk=",
"lastModified": 1777207870,
"narHash": "sha256-Jld5Lp1HdjRVYJgAnW3vwOPcRUgbfP+IzhcpUjFR2Ns=",
"ref": "refs/pull/13817/head",
"rev": "f1bedcc3071a531d7d67cc631da1b973779edb0a",
"revCount": 7158,
"rev": "c35a8a565bf14fcf71b34663e7bd7683ca3facfd",
"revCount": 7174,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -1069,6 +1098,37 @@
"type": "github"
}
},
"hyprland-plugins-lua": {
"inputs": {
"hyprland": [
"hyprland-lua-config"
],
"nixpkgs": [
"hyprland-plugins-lua",
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland-plugins-lua",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1777413654,
"narHash": "sha256-lVGYGUWf9ynV5lR8QAygAfmYRkko1btIe26UcQ1bGXw=",
"owner": "colonelpanic8",
"repo": "hyprland-plugins",
"rev": "ff36c04b270c26fcd53e623fc688e4eb41672897",
"type": "github"
},
"original": {
"owner": "colonelpanic8",
"ref": "hyprexpo-lua-hyprland",
"repo": "hyprland-plugins",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
@@ -1164,11 +1224,11 @@
]
},
"locked": {
"lastModified": 1772459629,
"narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=",
"lastModified": 1776426736,
"narHash": "sha256-rl7i4aY+9p8LysJp7o8uRWahCkpFznCgGHXszlTw7b0=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "7615ee388de18239a4ab1400946f3d0e498a8186",
"rev": "7833ff33b2e82d3406337b5dcf0d1cec595d83e9",
"type": "github"
},
"original": {
@@ -1339,11 +1399,11 @@
]
},
"locked": {
"lastModified": 1774911391,
"narHash": "sha256-c4YVwO33Mmw+FIV8E0u3atJZagHvGTJ9Jai6RtiB8rE=",
"lastModified": 1776428866,
"narHash": "sha256-XfRlBolGtjvalTHJp3XvvpYLBjkMhaZLLU0WqZ91Fcg=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "e6caa3d4d1427eedbdf556cf4ceb70f2d9c0b56d",
"rev": "eedd60805cd96d4442586f2ba5fe51d549b12674",
"type": "github"
},
"original": {
@@ -1389,11 +1449,11 @@
]
},
"locked": {
"lastModified": 1772459835,
"narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=",
"lastModified": 1776430932,
"narHash": "sha256-Yv3RPiUvl7CAsJgwIVsqcj7akn1gLyJP1F/mocof5hA=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "0a692d4a645165eebd65f109146b8861e3a925e7",
"rev": "4c2fcc06dc9722c97dbb54ba649c69b18ce83d2e",
"type": "github"
},
"original": {
@@ -1447,11 +1507,11 @@
]
},
"locked": {
"lastModified": 1775414057,
"narHash": "sha256-mDpHnf+MkdOxEqIM1TnckYYh9p1SXR8B3KQfNZ12M8s=",
"lastModified": 1776728575,
"narHash": "sha256-z9eGphrArEBpl1O/GCH0wlY6z4K9vA6yWh2gAS6qytU=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "86012ee01b0fdd8bf3101ef38816f2efbee42490",
"rev": "f3a80888783702a39691b684d099e16b83ed4702",
"type": "github"
},
"original": {
@@ -1465,7 +1525,6 @@
"flake-utils": [
"flake-utils"
],
"git-ignore-nix": "git-ignore-nix_2",
"nixpkgs": [
"nixpkgs"
],
@@ -1491,7 +1550,7 @@
"flake-utils": [
"flake-utils"
],
"git-ignore-nix": "git-ignore-nix_3",
"git-ignore-nix": "git-ignore-nix_2",
"nixpkgs": [
"nixpkgs"
]
@@ -1521,11 +1580,11 @@
]
},
"locked": {
"lastModified": 1775675359,
"narHash": "sha256-N7GT7LO8FVw/snk0nJMBAApJTDKxpNsi6GwV7DCQmaM=",
"lastModified": 1777261868,
"narHash": "sha256-30E1RBr0FGrf1IdXi2OKua+vQ4sUvjwUq6lfC1qcBug=",
"owner": "colonelpanic8",
"repo": "keepbook",
"rev": "33a01ff76cf078ed7806c8659cb28dff5c287fe2",
"rev": "2e178e7ba864af0a880456dca241615dd75afd24",
"type": "github"
},
"original": {
@@ -1560,11 +1619,11 @@
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1775582384,
"narHash": "sha256-RpfExg4DcWZ/SanVuwVbdijqPylsjvtMrHTQHemE+t8=",
"lastModified": 1777302729,
"narHash": "sha256-q8ZPyO3x03e1ugBTYr1ZHN8b8JdWQZPBvc/+ZH2bPMY=",
"owner": "NixOS",
"repo": "nix",
"rev": "a37db9d249afd61a81ae26368696f60e065d6f61",
"rev": "266c2e1aea052d54a4f662e0c767075a6c59dc73",
"type": "github"
},
"original": {
@@ -1581,11 +1640,11 @@
]
},
"locked": {
"lastModified": 1775676409,
"narHash": "sha256-MDPEtP+N15kgMoQPEFcDyFnP+szp8t2vFdiyCrACSMA=",
"lastModified": 1777136668,
"narHash": "sha256-0ePYbVYxKB4HhvGgk92mq98K174AqZ3UVy9P4t40iE4=",
"owner": "nixified-ai",
"repo": "flake",
"rev": "46c64e4ad51e9ffbe51456cc62ed23950612d316",
"rev": "6428e486aa1f3fce8dff9b3d4ea0053feab4fd3d",
"type": "github"
},
"original": {
@@ -1618,11 +1677,11 @@
]
},
"locked": {
"lastModified": 1774972752,
"narHash": "sha256-DnLIpFxznohpLkIFs390uZ0gxwkVyhtknhKNu+lQJK8=",
"lastModified": 1776910211,
"narHash": "sha256-0ku3gW8bZ9TTpEU2fQw86oU6ZLT2vF6pacF+cLaf7VY=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "d97e078f4788cddb8d11c3c99f72a4bb9ddec221",
"rev": "4e6cad241baa0115a7aae8c55b04c166da4997c9",
"type": "github"
},
"original": {
@@ -1731,11 +1790,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1775423009,
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
"lastModified": 1776548001,
"narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
"rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc",
"type": "github"
},
"original": {
@@ -1760,11 +1819,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"lastModified": 1776877367,
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
"type": "github"
},
"original": {
@@ -1871,11 +1930,11 @@
"org-window-habit": "org-window-habit"
},
"locked": {
"lastModified": 1774826830,
"narHash": "sha256-UMHBROyhDEc+Xc5d1p4fwclCfmzsHiIEw/NtppvtJVQ=",
"lastModified": 1777157145,
"narHash": "sha256-JeJmKF3CisM15DKQ9w/k3r27NI7ZtwbfvEyi0/LibJI=",
"owner": "colonelpanic8",
"repo": "org-agenda-api",
"rev": "7c42a62e2f883c4990e2fc02ff1754a12337dc04",
"rev": "dbb1cb853d7de6eec7202f04ed9748978749eb29",
"type": "github"
},
"original": {
@@ -1981,11 +2040,11 @@
]
},
"locked": {
"lastModified": 1775036584,
"narHash": "sha256-zW0lyy7ZNNT/x8JhzFHBsP2IPx7ATZIPai4FJj12BgU=",
"lastModified": 1776796298,
"narHash": "sha256-PcRvlWayisPSjd0UcRQbhG8Oqw78AcPE6x872cPRHN8=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "4e0eb042b67d863b1b34b3f64d52ceb9cd926735",
"rev": "3cfd774b0a530725a077e17354fbdb87ea1c4aad",
"type": "github"
},
"original": {
@@ -2069,15 +2128,18 @@
"caelestia-shell": "caelestia-shell",
"claude-code-nix": "claude-code-nix",
"codex-cli-nix": "codex-cli-nix",
"coqui-tts-streamer": "coqui-tts-streamer",
"flake-utils": "flake-utils",
"git-blame-rank": "git-blame-rank",
"git-ignore-nix": "git-ignore-nix",
"git-sync-rs": "git-sync-rs",
"home-manager": "home-manager",
"hy3": "hy3",
"hyprNStack": "hyprNStack",
"hyprland": "hyprland",
"hyprland-lua-config": "hyprland-lua-config",
"hyprland-plugins": "hyprland-plugins",
"hyprland-plugins-lua": "hyprland-plugins-lua",
"hyprscratch": "hyprscratch",
"imalison-taffybar": "imalison-taffybar",
"kanshi-sni": "kanshi-sni",
@@ -2214,11 +2276,11 @@
]
},
"locked": {
"lastModified": 1776032459,
"narHash": "sha256-9pYE1Rp2wKhqjO6edLbS/ht9AoQ3SiANKonGdil/6jk=",
"lastModified": 1777401169,
"narHash": "sha256-bciN/qFjXYm8ZIKXSc/OssUsLt9GoNs/cU9xT/pw7QY=",
"owner": "taffybar",
"repo": "taffybar",
"rev": "263cd2af9c316cf3a98f338128ea4a434e5b64bd",
"rev": "59e3c75990156dcd4353ad9fad5823303e751f0f",
"type": "github"
},
"original": {
@@ -2341,11 +2403,11 @@
]
},
"locked": {
"lastModified": 1773601989,
"narHash": "sha256-2tJf/CQoHApoIudxHeJye+0Ii7scR0Yyi7pNiWk0Hn8=",
"lastModified": 1776608502,
"narHash": "sha256-UH8YoQxx4hFOm6qjMdjRQNRvSejFIR/wBZ8fW1p9sME=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "a9b862d1aa000a676d310cc62d249f7ad726233d",
"rev": "4a293523d36dfa367e67ec304cc718ea66a8fec2",
"type": "github"
},
"original": {
@@ -2370,11 +2432,11 @@
]
},
"locked": {
"lastModified": 1773213721,
"narHash": "sha256-nQ26qYRWLIVpwDTd5Ig8UZN+RE/E8dS1tNpiAb2K3NQ=",
"lastModified": 1776502138,
"narHash": "sha256-mSOpNU1iJvfFh5uwayA6aPxneFMduNW1kG1gV2tGE+c=",
"owner": "xmonad",
"repo": "xmonad",
"rev": "f87bfb23ce809611a44ff9ea4373830956a6e180",
"rev": "a618fb32662e44eb5d8276a3dc1925b0233e638b",
"type": "github"
},
"original": {

Some files were not shown because too many files have changed in this diff Show More