Repository navigation
fix(nix): prepend local usage rules to the automation CLI skills - #385
Merged
Merged
Conversation
The upstream agent-browser guide tells agents to export a session ID and chain commands, but the sandbox exclusion and the agent-config hooks accept only one plain call per Bash command, so the chained form ran sandboxed, where the daemon cannot start, and asked for approval. Insert a short Local rules section right after each skill's frontmatter, verified against the pinned agent-config (ADR-0018, ADR-0019, automation_options.py), and extend the automation-cli-skills check to require it. Refs #377 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
furedea
approved these changes
Nov 4, 2026
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
nix/home/default.nixで生成するagent-browserとagent-desktopの skill に,フロントマター直後へ短い## Local rules節を挿入した.上流の agent-browser ガイドはexport AGENT_BROWSER_SESSION="$(agent-browser session id ...)" && ...のような複合コマンドを勧めるが,sandbox のexcludedCommands(agent-browser *,agent-desktop *)と agent-config の hook は 1 回の Bash 呼び出しが単独の素のコマンドである場合だけ sandbox 外かつ確認なしで実行する.複合形は sandbox 内で走り,daemon が起動できず,さらに確認を求めていた.runCommand内でawkを使い,ノート本文はwriteTextのファイルに置いた.フロントマターは先頭のまま変更しないので,name:は 2 行目に残り既存のgrep -qx 'name: ...'も成立する.flake.lockが固定する agent-config3f2d578の ADR-0018,ADR-0019,agents/hooks/lib/automation_options.py,agents/hooks/rules/allowed_commands.jsonと照合した.nix/checks.nixのautomation-cli-skillsを拡張し,フロントマター直後の最初の内容行が## Local rulesであること,1 呼び出し 1 コマンドの規則,--session <name>(browser)と--app <name>(desktop)を要求するようにした.agent-browser session idの許可や agent-config の変更はしていない.変更前後
AGENT_BROWSER_SESSIONを推奨)## Local rulesexport ... && ...が sandbox 内で失敗し,確認も発生AGENT_BROWSER_SESSION,session id--session <name>screenshotとscreenshot --fullのみ--app <name>,パス引数は worktree か$TMPDIR内,未登録オプション・フォーカス先への入力・batch・launchは確認検証
automation-cli-skillscheck を実装前に実行し,失敗することを確認した(Red).SKILL.mdを目視し,フロントマター直後にノートがあることを確認した.nix flake check: all checks passed.homeConfigurations."kaito@mbp"と"kaito@mba"のactivationPackage,darwinConfigurations.mbpとmbaのsystemをビルドして成功.home-manager switchとdarwin-rebuild switchは実行していない.判断と残る弱点
excludedCommandsが Claude 固有であるため.Codex では確認を要する形は hook により拒否される(ADR-0018)が,短さを優先してノートには書いていない.$TMPDIRなど)」とした.当初$TMPDIRのみと書いたが,hook は$CLAUDE_TMPDIRなども許すという Codex レビューの P3 指摘を受けて修正した.export,session id,パス付き screenshot の例)を書き換えず,「以下の矛盾する指示より優先する」と明記する方式にした.マージ後の手動手順
home-manager switch(またはdarwin-rebuild switch)を実行する.agent-browser open https://example.comを再試行し,確認なしで動くことを確かめる.Refs #377
🤖 Generated with Claude Code