[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79DWZGP51YBVXWW0S0DFZ2S":3,"skill-same:01M79DWZGP51YBVXWW0S0DFZ2S":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79DWZGP51YBVXWW0S0DFZ2S","global-agent-guardrails",null,"Install, audit, test, or update the Development System's global destructive-command guard for Codex, Claude Code and T3 Code. Use when configuring agent safety hooks or investigating whether dangerous shell operations are blocked.","AO-HyS\u002Fdevelopment-system","AO-HyS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F286554351?v=4","01M79DCXZGC6076EH5QATNXCY2","AO HyS","01M79DCY06TSBCJ946VP0BT0RG",0,"MIT","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F1.34.1\u002Fskills\u002Finternal\u002Fglobal-agent-guardrails\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: global-agent-guardrails\ndescription: Install, audit, test, or update the Development System's global destructive-command guard for Codex, Claude Code and T3 Code. Use when configuring agent safety hooks or investigating whether dangerous shell operations are blocked.\n---\n\n# Global Agent Guardrails\n\nThis skill is the operator guide for the executable destructive-command policy. The hook is the enforcement layer; instructions alone are not protection.\n\n## Contract\n\n- Codex and T3 Code share the Codex `PreToolUse` adapter, matched on `Bash|exec|apply_patch`.\n- Claude Code uses a `PreToolUse` hook in its user settings, matched on `Bash|Monitor|Edit|Write|MultiEdit|NotebookEdit`.\n- Existing Codex hooks and Claude Code settings are merged, never replaced.\n- Factory settings, skills, logs, and executables are outside the current runtime and are never read or changed.\n- The guard fails closed when a matched shell tool has malformed or missing command input.\n- Hard blocks do not imply sandboxing and do not replace repository permissions, review, backups, or explicit authorization.\n- The agent cannot bypass a block. A human may run the command outside the harness or deliberately remove the guard after reviewing the exact target and recovery plan.\n\n## Operate\n\nUse the Development System CLI from its canonical checkout:\n\n```bash\n.\u002Fbin\u002Fdevelopment-system guardrails-enable\n.\u002Fbin\u002Fdevelopment-system guardrails-audit\n.\u002Fbin\u002Fdevelopment-system guardrails-rollback\n```\n\nUse `--home \u003Cisolated-home>` for verification. Enabling requires the catalogued Codex and Claude `global-agent-guardrails` skills to be installed first.\n\nThe policy hard-blocks recursive forced deletion, catastrophic disk operations, destructive Git history\u002Fworktree operations, forced pushes, repository deletion, high-impact infrastructure destruction, and downloaded-code-to-shell pipelines. It intentionally does not block normal reads, ordinary file edits, dependency installation, or non-recursive deletion of a named file. For tracked paths, use `git rm -r` instead of `rm -rf`.\n\n## Policy 2.0.0: quote-aware evaluation\n\n`references\u002Fpolicy.json` is evaluated against a parsed command, not raw text:\n\n- Quoted text, heredoc bodies with a quoted delimiter, and redirections such as `2>\u002Fdev\u002Fnull` are data. `grep \"git reset --hard\" docs` and `git commit -m \"...\"` pass.\n- `$(…)`, backticks, `\u003C(…)` and `>(…)` are evaluated recursively up to `maxSubstitutionDepth` (4); `$((…))` is arithmetic. `$(cat \u003C\u003C'EOF' … EOF)` (the usual commit-message form) is read as its literal heredoc text unless the command can change what `cat` runs, in which case it is dynamic: a `cat` function (also zsh `function a cat { … }`), `alias`, `hash` or `enable` naming cat (also after `command`, `builtin`, `noglob` or `nocorrect` and their options), a `trap` action naming cat or PATH or built at run time, zsh `autoload cat` or `functions -c f cat`, a `PATH` or zsh `path` assignment or loop variable, an assigning expansion (`${PATH:=…}`, `${path::=…}`), arithmetic that assigns and names PATH or holds an expansion, quote, backtick or backslash that can build that name (`(( PATH = 5 ))`, `(( \"PATH\" = 5 ))`, `(( $(echo PATH) = 5 ))`, `$[PATH=5]`, `a[PATH=5]=1`, `${a[PATH=5]}`, `${s:PATH=1}`, `[[ PATH=5 -eq 1 ]]`, `let x=PATH=5`; reading, as in `n = ${#path} + $#`, and plain names, as in `i += 1`, do not count; `(( n = $x ))` counts), a variable, array element or integer value that arithmetic reads again and that assigns a PATH name (`n='PATH=5'`, `a=('PATH=5')`, `declare -i x=PATH=5`; `NODE_OPTIONS=--require=.\u002Fpath\u002Fx.js` does not count), a name-taking builtin that sets PATH or takes a variable name (`export`, `declare`, `read`, `getopts`, `readarray`, `printf -v`, `print -v`, `wait -p`, zsh `set -A`, also inside an option cluster such as `print -rv`, …), a nameref (`declare -n`, `local -n`), or a function table entry (bash `BASH_CMDS`\u002F`BASH_ALIASES`, zsh `functions`, `commands`, `aliases`). Unquoted heredoc bodies are scanned for substitutions. A heredoc or here-string fed to a shell (or `source \u002Fdev\u002Fstdin`) is evaluated as shell. For other interpreters (`python -c`, `node -e\u002F--eval\u002F-p`, `deno eval`, `perl -e`, `ruby -e`, `osascript -e`, `php -r\u002F-R\u002F-B\u002F-E`, `Rscript -e`, `lua -e`, an `awk` program or `awk -f`, or a heredoc fed to one of them), each string literal in the code that contains whitespace, including literals joined with `+`, `,` or adjacency, and each code fragment between quotes, brackets and `;` is evaluated as a shell command with interpolations (`${…}`, `$name`, `{name}`, `%s`) replaced by a placeholder. Code that calls a process API (`system`, `exec*`, `spawn*`, `popen`, `run`, backticks, …) with a lone shell name (`os.system(\"sh\")`) is blocked. Native file APIs in that code (`shutil.rmtree`, `fs.rmSync`, `open(…, 'w')`) are not inspected.\n- Destructive rules apply to each simple command after wrappers (`sudo`, `env`, `xargs`, `timeout`, `nohup`, `find -exec`, …) are stripped, and to any argument position that names a destructive-capable command or shell (`ssh host rm -rf …`, `watch 'git reset --hard'`, `tmux new -d 'true; git reset --hard'`, `parallel ::: '…'`), including command positions inside one argument after `;`, `&`, `|`, `(`, `{` or `then`\u002F`do`. They are skipped for pure-read commands (`readOnlyCommands`, `sed` without `-i`\u002F`e`\u002F`w`, `awk` without `system(`\u002Fpipes\u002Fredirection).\n- Rule `match` values: `command` (default; canonical `name args…`, for git starting at the subcommand), `pipeline` (command names joined by `|`), `raw` (full source text).\n- Always blocked (`structuralRules`): `eval`, `$'…'` outside single quotes, `${!x}`, a variable or substitution as the command name, `sh|bash|zsh -c` with a non-literal script, a shell or interpreter reading its program from a pipe, inherited or non-literal stdin, a process substitution or a device (`echo … | sh`, `node -`, `python3 \u003C\u003C\u003C \"$x\"`, `awk -f -`, `bash \u003C(…)`), Git configuration that makes an ordinary command destructive (`help.autocorrect`, `clean.requireForce=false`, deleting or forced push refspecs, `remote.*.mirror`), unparseable input, and variable arguments to `sensitiveCommands` (`rm`, `dd`, `mkfs`, `diskutil`, `gh`, `terraform`, `pulumi`, `kubectl`, `wrangler`, `vercel`, and git outside `readOnlyGitSubcommands`). Executed inline Git configuration (`-c alias.x=…`, `core.pager`) and program-naming variables (`GIT_PAGER=…`) are evaluated as commands.\n- `git-discard` allows `git checkout --ours\u002F--theirs` and `git restore --staged`.\n- `test-file-write` blocks creating or modifying paths matching `testFilePatterns` inside the payload `cwd`: redirections, `tee`, `cp`\u002F`mv`\u002F`install` destinations, `sed -i` targets, `git diff --output`, Edit\u002FWrite\u002FMultiEdit `file_path`, NotebookEdit `notebook_path`, and apply_patch `*** Add File:`\u002F`*** Update File:`\u002F`*** Move to:`. Deleting test files is allowed.\n- `guard-config-write` blocks writes to `protectedWriteTargets`: `~\u002F.codex\u002Fhooks.json`, `~\u002F.codex\u002Fconfig.toml`, `~\u002F.claude\u002Fsettings.json`, `~\u002F.claude\u002Fsettings.local.json` and the installed `global-agent-guardrails` skills (`~`, `$HOME` and absolute spellings), plus `protectedProjectWriteTargets` inside the payload `cwd` (`.claude\u002Fsettings.json`, `.claude\u002Fsettings.local.json`, `.codex\u002Fhooks.json`, `.codex\u002Fconfig.toml`, and `.git\u002Fconfig`, whose aliases run commands; use `git config` instead). Writers include redirections, `tee`, `sponge`, `cp`\u002F`mv`\u002F`install`\u002F`ln`, recursive `cp`\u002F`rsync`\u002F`ditto` and `tar`\u002F`unzip`\u002F`patch` rooted above a protected path, `perl`\u002F`ruby -i`, `curl -o\u002F-O`, `wget -O\u002F-P`, `dd of=`, `ex`\u002F`vi`\u002F`vim`\u002F`nvim`\u002F`view`\u002F`ed` file operands (also under `-R`, since `:w!` still writes), `-w`\u002F`-W` logs, files named by write, open or dump commands in any abbreviation, after a line address (also `*`, `\\\u002F`, `\\?`, `\\&`, marks such as `'a`, `'\u003C`, `'(` and `'{`, and an address on a later `|` command) or `:g` (`:w`, `%w`, `1,$w`, `:wri`, `:sav`, `:x`, `:up`, `:wa`, `:e`, `:sp`, `:drop`, `:args`, `:redir >`, `:mksession`, `:wviminfo`, `:hardcopy >`, ed `W` and `f`, with `!`, `++opt`, `+`, `+cmd` or `>>`, and inside a literal `:execute` string, also after `\\|` or an escaped space, as `:execute` and a `cpo+=b` mapping read them (`exe \"sil\\ w FILE\"`); the `+cmd` run on the opened file, with its escaped spaces, is read as an editor command itself, as in `e +w!\\ FILE notes.txt` or `e +w!\\ FILE` with no file after it; a `+cmd` nested more than `maxSubstitutionDepth` deep is blocked) in `-c`, `--cmd` or `+cmd` scripts and in `ed`, `ex` and `vim -e`\u002F`-es` scripts from a heredoc or here-string, and `chmod`\u002F`chown`\u002F`chflags` on a protected path or any ancestor. An editor file name expands `~`, `$VAR`, `%`\u002F`#` and wildcards, and after `:cd` a relative name has an unknown base. Substitution text is data. In an `ed` script the lines typed after `a`, `i` or `c` up to `.` are data too (ed exits at the first error in a script), except inside `g`\u002F`v` or after `G`\u002F`V`, where they are commands. vim and ex run those lines as commands when the append fails or is skipped (inside `:g`, a missing line or mark, `nomodifiable`, `:if 0`), so every line of a vim or ex script is read as a command. Shell commands in those editor scripts (`:!`, range filters such as `%!` and `1,2!`, `:r !`, `:w !`) are evaluated as shell. A non-literal editor script, keys typed into a visual editor from a heredoc, here-string or pipe, a backtick file name, a vimscript process, file or option function (`system()`, `writefile()`, `delete()`, `execute()`, `setbufvar()`, …, also in a `\\=` substitution), an embedded language (`:lua`, `:python`, …), `:terminal`, `:shell`, `:source`, `:runtime`, `:make`, `:grep`, `:cscope`, a `:set` or `:let &` of a program or shell option (`shell`, `shellcmdflag`\u002F`shcf`, `shellquote`\u002F`shq`, `makeprg`, …, also cleared, since an empty `shellcmdflag` runs `:!notes.txt` as a script) or of an expression option to a value (`diffexpr`, `indentexpr`, …; clearing one with `set indentexpr=` is allowed), `:normal` keys that run commands (`!`, `Q`, `@`, `\"=`, `\u003CC-R>`) or a built `:execute` is blocked. A glob target (`*`, `?`, `[…]`, `**`, brace expansion, extglob and zsh groups, qualifiers and `^ # ~` operators, also with quoted or escaped characters inside a pattern; a fully quoted name such as `\"(backup)\u002Fsettings.json\"` is not a glob) is read broadly: each group, brace, qualifier or operator becomes any text (any depth when it spans `\u002F`; a repeated group spanning `\u002F` also counts as absent, and from the fifth such group on the rest of the pattern is read as any path), and the target is blocked when that reading can match a protected path; `*` skips a leading dot unless the command mentions dotglob, GLOBIGNORE or GLOB_DOTS. `cd`, `pushd`, `env -C` and `sudo -D` move the directory used for later relative targets; after a conditional, backgrounded, piped or branch `cd`, `cd -`, `popd`, `cd $(…)`, a missing directory or a CDPATH lookup, the directory is unknown. A path under an unknown directory (a variable prefix, `~-`, or an unknown working directory) is blocked when its literal tail can name a protected path or a file below a protected directory.\n- `shell-arithmetic-injection` blocks text shaped like `name[$(…)]` in assignments, `[[ … ]]`, `for` lists and name-taking builtins (`let`, `printf -v`, `read`, `declare`, `export`, `test -v`, …): bash runs that subscript when the text is later evaluated.\n- Known false positives, by design: interpreter code naming a shell next to a process API (`shutil.which('bash')` with `subprocess` in the same program), an interpreter with only preload options and no program (`node -r ts-node\u002Fregister`), backtick prose with a destructive command inside a runner argument, glob or brace targets that could match a protected path, read-only editor sessions (`vim -R`, `view`) on a protected or test path, editor script text outside substitutions and ed typed lines that reads like a write, open or shell command (`:echo \"e tests\u002Fa.test.ts\"`, or vim and ex append text such as `terminal output below`), conservative vimscript blocks (`:make`, `:grep`, `:source`, `:normal` keys containing `!` or `@`), and a `$(cat \u003C\u003C'EOF' …)` commit message read as dynamic when the same command assigns arithmetic through an expansion (`(( n = $x ))`, `for ((i=0; i\u003C$n; i++))`, `(( total += $x ))`, `let i=$i+1`) or stores text that assigns or steps a PATH name in a variable or array element (`ARGS=--path=src`, `a=(--path=src)`, `f=${f\u002F\u002F--path\u002F}`). Known gaps: arithmetic that reads a variable holding a built assignment (`(( $x ))`, `(( n ))` after `read n`) is not traced; editor settings such as `.vscode\u002Fsettings.json` are not protected; editor script files (`-s`, `-S`, `-u`, `ed \u003C file`), a `SHELL` prefix for the editor's `:!` and vimscript beyond the forms above are not read. The engine denies input over 64 KB and evaluations that exceed its own 3 s budget; the hook command denies when the engine exits abnormally, and the harness enforces the 5 s hook timeout, whose outcome on expiry is the harness's own behavior and is not verified here.\n\nCheck a decision without installing:\n\n```bash\nnode scripts\u002Fcommand-guard.mjs check --command 'git status --short' --cwd \u003Crepo>\nnode scripts\u002Fcommand-guard.mjs check --tool-json '{\"tool_name\":\"Write\",\"cwd\":\"\u003Crepo>\",\"tool_input\":{\"file_path\":\"src\u002Fa.test.ts\"}}'\n```\n\nExit 0 means allowed, 2 means blocked; the JSON output names the rule.\n\n## Verify\n\nAudit must prove all of the following:\n\n- the exact managed Codex and Claude Code hook entries exist alongside pre-existing entries;\n- the installed policy engine matches the current catalogued skill bytes;\n- a harmless command with a redirection (`grep -n \"x\" f 2>\u002Fdev\u002Fnull | head`) is allowed;\n- `git reset --hard` is blocked, and a `--tool-json` Write to `src\u002Fa.test.ts` is blocked;\n- rollback restores the exact prior Codex hooks and Claude Code settings bytes when each file still holds the installed bytes; when a file changed after activation (Claude Code rewrote its settings, or the report gate or orchestration added hooks), it removes only the managed guard entry from that file and rewrites it as 2-space JSON, without touching Factory.\n\nDo not claim T3 Code has an independent hook runtime: each T3 thread inherits the adapter of its Codex or Claude Code provider.\n","# Global Agent Guardrails\n\nThis skill is the operator guide for the executable destructive-command policy. The hook is the enforcement layer; instructions alone are not protection.\n\n## Contract\n\n- Codex and T3 Code share the Codex `PreToolUse` adapter, matched on `Bash|exec|apply_patch`.\n- Claude Code uses a `PreToolUse` hook in its user settings, matched on `Bash|Monitor|Edit|Write|MultiEdit|NotebookEdit`.\n- Existing Codex hooks and Claude Code settings are merged, never replaced.\n- Factory settings, skills, logs, and executables are outside the current runtime and are never read or changed.\n- The guard fails closed when a matched shell tool has malformed or missing command input.\n- Hard blocks do not imply sandboxing and do not replace repository permissions, review, backups, or explicit authorization.\n- The agent cannot bypass a block. A human may run the command outside the harness or deliberately remove the guard after reviewing the exact target and recovery plan.\n\n## Operate\n\nUse the Development System CLI from its canonical checkout:\n\n```bash\n.\u002Fbin\u002Fdevelopment-system guardrails-enable\n.\u002Fbin\u002Fdevelopment-system guardrails-audit\n.\u002Fbin\u002Fdevelopment-system guardrails-rollback\n```\n\nUse `--home \u003Cisolated-home>` for verification. Enabling requires the catalogued Codex and Claude `global-agent-guardrails` skills to be installed first.\n\nThe policy hard-blocks recursive forced deletion, catastrophic disk operations, destructive Git history\u002Fworktree operations, forced pushes, repository deletion, high-impact infrastructure destruction, and downloaded-code-to-shell pipelines. It intentionally does not block normal reads, ordinary file edits, dependency installation, or non-recursive deletion of a named file. For tracked paths, use `git rm -r` instead of `rm -rf`.\n\n## Policy 2.0.0: quote-aware evaluation\n\n`references\u002Fpolicy.json` is evaluated against a parsed command, not raw text:\n\n- Quoted text, heredoc bodies with a quoted delimiter, and redirections such as `2>\u002Fdev\u002Fnull` are data. `grep \"git reset --hard\" docs` and `git commit -m \"...\"` pass.\n- `$(…)`, backticks, `\u003C(…)` and `>(…)` are evaluated recursively up to `maxSubstitutionDepth` (4); `$((…))` is arithmetic. `$(cat \u003C\u003C'EOF' … EOF)` (the usual commit-message form) is read as its literal heredoc text unless the command can change what `cat` runs, in which case it is dynamic: a `cat` function (also zsh `function a cat { … }`), `alias`, `hash` or `enable` naming cat (also after `command`, `builtin`, `noglob` or `nocorrect` and their options), a `trap` action naming cat or PATH or built at run time, zsh `autoload cat` or `functions -c f cat`, a `PATH` or zsh `path` assignment or loop variable, an assigning expansion (`${PATH:=…}`, `${path::=…}`), arithmetic that assigns and names PATH or holds an expansion, quote, backtick or backslash that can build that name (`(( PATH = 5 ))`, `(( \"PATH\" = 5 ))`, `(( $(echo PATH) = 5 ))`, `$[PATH=5]`, `a[PATH=5]=1`, `${a[PATH=5]}`, `${s:PATH=1}`, `[[ PATH=5 -eq 1 ]]`, `let x=PATH=5`; reading, as in `n = ${#path} + $#`, and plain names, as in `i += 1`, do not count; `(( n = $x ))` counts), a variable, array element or integer value that arithmetic reads again and that assigns a PATH name (`n='PATH=5'`, `a=('PATH=5')`, `declare -i x=PATH=5`; `NODE_OPTIONS=--require=.\u002Fpath\u002Fx.js` does not count), a name-taking builtin that sets PATH or takes a variable name (`export`, `declare`, `read`, `getopts`, `readarray`, `printf -v`, `print -v`, `wait -p`, zsh `set -A`, also inside an option cluster such as `print -rv`, …), a nameref (`declare -n`, `local -n`), or a function table entry (bash `BASH_CMDS`\u002F`BASH_ALIASES`, zsh `functions`, `commands`, `aliases`). Unquoted heredoc bodies are scanned for substitutions. A heredoc or here-string fed to a shell (or `source \u002Fdev\u002Fstdin`) is evaluated as shell. For other interpreters (`python -c`, `node -e\u002F--eval\u002F-p`, `deno eval`, `perl -e`, `ruby -e`, `osascript -e`, `php -r\u002F-R\u002F-B\u002F-E`, `Rscript -e`, `lua -e`, an `awk` program or `awk -f`, or a heredoc fed to one of them), each string literal in the code that contains whitespace, including literals joined with `+`, `,` or adjacency, and each code fragment between quotes, brackets and `;` is evaluated as a shell command with interpolations (`${…}`, `$name`, `{name}`, `%s`) replaced by a placeholder. Code that calls a process API (`system`, `exec*`, `spawn*`, `popen`, `run`, backticks, …) with a lone shell name (`os.system(\"sh\")`) is blocked. Native file APIs in that code (`shutil.rmtree`, `fs.rmSync`, `open(…, 'w')`) are not inspected.\n- Destructive rules apply to each simple command after wrappers (`sudo`, `env`, `xargs`, `timeout`, `nohup`, `find -exec`, …) are stripped, and to any argument position that names a destructive-capable command or shell (`ssh host rm -rf …`, `watch 'git reset --hard'`, `tmux new -d 'true; git reset --hard'`, `parallel ::: '…'`), including command positions inside one argument after `;`, `&`, `|`, `(`, `{` or `then`\u002F`do`. They are skipped for pure-read commands (`readOnlyCommands`, `sed` without `-i`\u002F`e`\u002F`w`, `awk` without `system(`\u002Fpipes\u002Fredirection).\n- Rule `match` values: `command` (default; canonical `name args…`, for git starting at the subcommand), `pipeline` (command names joined by `|`), `raw` (full source text).\n- Always blocked (`structuralRules`): `eval`, `$'…'` outside single quotes, `${!x}`, a variable or substitution as the command name, `sh|bash|zsh -c` with a non-literal script, a shell or interpreter reading its program from a pipe, inherited or non-literal stdin, a process substitution or a device (`echo … | sh`, `node -`, `python3 \u003C\u003C\u003C \"$x\"`, `awk -f -`, `bash \u003C(…)`), Git configuration that makes an ordinary command destructive (`help.autocorrect`, `clean.requireForce=false`, deleting or forced push refspecs, `remote.*.mirror`), unparseable input, and variable arguments to `sensitiveCommands` (`rm`, `dd`, `mkfs`, `diskutil`, `gh`, `terraform`, `pulumi`, `kubectl`, `wrangler`, `vercel`, and git outside `readOnlyGitSubcommands`). Executed inline Git configuration (`-c alias.x=…`, `core.pager`) and program-naming variables (`GIT_PAGER=…`) are evaluated as commands.\n- `git-discard` allows `git checkout --ours\u002F--theirs` and `git restore --staged`.\n- `test-file-write` blocks creating or modifying paths matching `testFilePatterns` inside the payload `cwd`: redirections, `tee`, `cp`\u002F`mv`\u002F`install` destinations, `sed -i` targets, `git diff --output`, Edit\u002FWrite\u002FMultiEdit `file_path`, NotebookEdit `notebook_path`, and apply_patch `*** Add File:`\u002F`*** Update File:`\u002F`*** Move to:`. Deleting test files is allowed.\n- `guard-config-write` blocks writes to `protectedWriteTargets`: `~\u002F.codex\u002Fhooks.json`, `~\u002F.codex\u002Fconfig.toml`, `~\u002F.claude\u002Fsettings.json`, `~\u002F.claude\u002Fsettings.local.json` and the installed `global-agent-guardrails` skills (`~`, `$HOME` and absolute spellings), plus `protectedProjectWriteTargets` inside the payload `cwd` (`.claude\u002Fsettings.json`, `.claude\u002Fsettings.local.json`, `.codex\u002Fhooks.json`, `.codex\u002Fconfig.toml`, and `.git\u002Fconfig`, whose aliases run commands; use `git config` instead). Writers include redirections, `tee`, `sponge`, `cp`\u002F`mv`\u002F`install`\u002F`ln`, recursive `cp`\u002F`rsync`\u002F`ditto` and `tar`\u002F`unzip`\u002F`patch` rooted above a protected path, `perl`\u002F`ruby -i`, `curl -o\u002F-O`, `wget -O\u002F-P`, `dd of=`, `ex`\u002F`vi`\u002F`vim`\u002F`nvim`\u002F`view`\u002F`ed` file operands (also under `-R`, since `:w!` still writes), `-w`\u002F`-W` logs, files named by write, open or dump commands in any abbreviation, after a line address (also `*`, `\\\u002F`, `\\?`, `\\&`, marks such as `'a`, `'\u003C`, `'(` and `'{`, and an address on a later `|` command) or `:g` (`:w`, `%w`, `1,$w`, `:wri`, `:sav`, `:x`, `:up`, `:wa`, `:e`, `:sp`, `:drop`, `:args`, `:redir >`, `:mksession`, `:wviminfo`, `:hardcopy >`, ed `W` and `f`, with `!`, `++opt`, `+`, `+cmd` or `>>`, and inside a literal `:execute` string, also after `\\|` or an escaped space, as `:execute` and a `cpo+=b` mapping read them (`exe \"sil\\ w FILE\"`); the `+cmd` run on the opened file, with its escaped spaces, is read as an editor command itself, as in `e +w!\\ FILE notes.txt` or `e +w!\\ FILE` with no file after it; a `+cmd` nested more than `maxSubstitutionDepth` deep is blocked) in `-c`, `--cmd` or `+cmd` scripts and in `ed`, `ex` and `vim -e`\u002F`-es` scripts from a heredoc or here-string, and `chmod`\u002F`chown`\u002F`chflags` on a protected path or any ancestor. An editor file name expands `~`, `$VAR`, `%`\u002F`#` and wildcards, and after `:cd` a relative name has an unknown base. Substitution text is data. In an `ed` script the lines typed after `a`, `i` or `c` up to `.` are data too (ed exits at the first error in a script), except inside `g`\u002F`v` or after `G`\u002F`V`, where they are commands. vim and ex run those lines as commands when the append fails or is skipped (inside `:g`, a missing line or mark, `nomodifiable`, `:if 0`), so every line of a vim or ex script is read as a command. Shell commands in those editor scripts (`:!`, range filters such as `%!` and `1,2!`, `:r !`, `:w !`) are evaluated as shell. A non-literal editor script, keys typed into a visual editor from a heredoc, here-string or pipe, a backtick file name, a vimscript process, file or option function (`system()`, `writefile()`, `delete()`, `execute()`, `setbufvar()`, …, also in a `\\=` substitution), an embedded language (`:lua`, `:python`, …), `:terminal`, `:shell`, `:source`, `:runtime`, `:make`, `:grep`, `:cscope`, a `:set` or `:let &` of a program or shell option (`shell`, `shellcmdflag`\u002F`shcf`, `shellquote`\u002F`shq`, `makeprg`, …, also cleared, since an empty `shellcmdflag` runs `:!notes.txt` as a script) or of an expression option to a value (`diffexpr`, `indentexpr`, …; clearing one with `set indentexpr=` is allowed), `:normal` keys that run commands (`!`, `Q`, `@`, `\"=`, `\u003CC-R>`) or a built `:execute` is blocked. A glob target (`*`, `?`, `[…]`, `**`, brace expansion, extglob and zsh groups, qualifiers and `^ # ~` operators, also with quoted or escaped characters inside a pattern; a fully quoted name such as `\"(backup)\u002Fsettings.json\"` is not a glob) is read broadly: each group, brace, qualifier or operator becomes any text (any depth when it spans `\u002F`; a repeated group spanning `\u002F` also counts as absent, and from the fifth such group on the rest of the pattern is read as any path), and the target is blocked when that reading can match a protected path; `*` skips a leading dot unless the command mentions dotglob, GLOBIGNORE or GLOB_DOTS. `cd`, `pushd`, `env -C` and `sudo -D` move the directory used for later relative targets; after a conditional, backgrounded, piped or branch `cd`, `cd -`, `popd`, `cd $(…)`, a missing directory or a CDPATH lookup, the directory is unknown. A path under an unknown directory (a variable prefix, `~-`, or an unknown working directory) is blocked when its literal tail can name a protected path or a file below a protected directory.\n- `shell-arithmetic-injection` blocks text shaped like `name[$(…)]` in assignments, `[[ … ]]`, `for` lists and name-taking builtins (`let`, `printf -v`, `read`, `declare`, `export`, `test -v`, …): bash runs that subscript when the text is later evaluated.\n- Known false positives, by design: interpreter code naming a shell next to a process API (`shutil.which('bash')` with `subprocess` in the same program), an interpreter with only preload options and no program (`node -r ts-node\u002Fregister`), backtick prose with a destructive command inside a runner argument, glob or brace targets that could match a protected path, read-only editor sessions (`vim -R`, `view`) on a protected or test path, editor script text outside substitutions and ed typed lines that reads like a write, open or shell command (`:echo \"e tests\u002Fa.test.ts\"`, or vim and ex append text such as `terminal output below`), conservative vimscript blocks (`:make`, `:grep`, `:source`, `:normal` keys containing `!` or `@`), and a `$(cat \u003C\u003C'EOF' …)` commit message read as dynamic when the same command assigns arithmetic through an expansion (`(( n = $x ))`, `for ((i=0; i\u003C$n; i++))`, `(( total += $x ))`, `let i=$i+1`) or stores text that assigns or steps a PATH name in a variable or array element (`ARGS=--path=src`, `a=(--path=src)`, `f=${f\u002F\u002F--path\u002F}`). Known gaps: arithmetic that reads a variable holding a built assignment (`(( $x ))`, `(( n ))` after `read n`) is not traced; editor settings such as `.vscode\u002Fsettings.json` are not protected; editor script files (`-s`, `-S`, `-u`, `ed \u003C file`), a `SHELL` prefix for the editor's `:!` and vimscript beyond the forms above are not read. The engine denies input over 64 KB and evaluations that exceed its own 3 s budget; the hook command denies when the engine exits abnormally, and the harness enforces the 5 s hook timeout, whose outcome on expiry is the harness's own behavior and is not verified here.\n\nCheck a decision without installing:\n\n```bash\nnode scripts\u002Fcommand-guard.mjs check --command 'git status --short' --cwd \u003Crepo>\nnode scripts\u002Fcommand-guard.mjs check --tool-json '{\"tool_name\":\"Write\",\"cwd\":\"\u003Crepo>\",\"tool_input\":{\"file_path\":\"src\u002Fa.test.ts\"}}'\n```\n\nExit 0 means allowed, 2 means blocked; the JSON output names the rule.\n\n## Verify\n\nAudit must prove all of the following:\n\n- the exact managed Codex and Claude Code hook entries exist alongside pre-existing entries;\n- the installed policy engine matches the current catalogued skill bytes;\n- a harmless command with a redirection (`grep -n \"x\" f 2>\u002Fdev\u002Fnull | head`) is allowed;\n- `git reset --hard` is blocked, and a `--tool-json` Write to `src\u002Fa.test.ts` is blocked;\n- rollback restores the exact prior Codex hooks and Claude Code settings bytes when each file still holds the installed bytes; when a file changed after activation (Claude Code rewrote its settings, or the report gate or orchestration added hooks), it removes only the managed guard entry from that file and rewrites it as 2-space JSON, without touching Factory.\n\nDo not claim T3 Code has an independent hook runtime: each T3 thread inherits the adapter of its Codex or Claude Code provider.\n",{"name":5,"description":7},"main","9f5b43aadb1a92441d65e9cb74a584cd6fca62bc","artifacts\u002F1.34.1\u002Fskills\u002Finternal\u002Fglobal-agent-guardrails","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system","https:\u002F\u002Fgithub.com\u002FAO-HyS","https:\u002F\u002Faohys.net\u002F","Software Boutique, we make your projects come true live. ","2026-11-14 03:17:27",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add AO-HyS\u002Fdevelopment-system --skill global-agent-guardrails",{"tool":38,"command":39},"bunx","bunx skills add AO-HyS\u002Fdevelopment-system --skill global-agent-guardrails",{"tool":41,"command":42},"pnpm","pnpm dlx skills add AO-HyS\u002Fdevelopment-system --skill global-agent-guardrails","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F1.34.1\u002Fskills\u002Finternal\u002Fglobal-agent-guardrails\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",274,"https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F1.34.1\u002Fskills\u002Finternal\u002Fglobal-agent-guardrails\u002Fagents\u002Fopenai.yaml",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fpolicy.json",8508,"https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F1.34.1\u002Fskills\u002Finternal\u002Fglobal-agent-guardrails\u002Freferences\u002Fpolicy.json",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"scripts\u002Fcommand-guard.mjs","SCRIPT","脚本",148643,"https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F1.34.1\u002Fskills\u002Finternal\u002Fglobal-agent-guardrails\u002Fscripts\u002Fcommand-guard.mjs",[63,70,77,84,91,96],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79EQ4BPYQTX8RWN1Y1J2K1F","working-backwards","Define a software feature through PRFAQ and staged documents when the user requests working backwards before coding.","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F2.8.0\u002Fskills\u002Finternal\u002Fworking-backwards\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79EQ2E8P85Y1Y7VNJZMNEJE","flow-implement","Implement a requested software change through verification, corrections, and its authorized delivery endpoint.","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F2.8.0\u002Fskills\u002Finternal\u002Fflow-implement\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79EQ0PNMKHPJ78F8WMNX06P","development-steward","Run the scheduled, read-only weekly maintenance review for the six explicitly opted-in repositories and prepare one concise private report for Check-in.","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F2.8.0\u002Fskills\u002Finternal\u002Fdevelopment-steward\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M79EPXJ56MX7955GWP1HD4B0","grill-with-docs","Run one recoverable interview for functional, visual, or mixed software grills; reuse equivalent answers and offer the shared HTML questionnaire.","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F2.7.0\u002Fskills\u002Finternal\u002Fgrill-with-docs\u002FSKILL.md",[],[],{"skillNo":92,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M79EPTFPHYEV40ZG52Z0GVS2","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F2.7.0\u002Fskills\u002Finternal\u002Fglobal-agent-guardrails\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":100,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M79EPR0KPHKAFN7V6CEEDR0Y","impeccable","Design or refine frontend UI using project context and a focused design playbook; also handles visual critique and polish.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F2.7.0\u002Fskills\u002Fexternal\u002Fimpeccable\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FAO-HyS\u002Fdevelopment-system\u002Fblob\u002Fmain\u002Fartifacts\u002F2.7.0\u002Fskills\u002Fexternal\u002Fimpeccable\u002FSKILL.md",[],[]]