This is the contract a skill must meet. The `change-skill` repository skill (`.claude/skills/change-skill/SKILL.md`) is the procedure for meeting it, and `python tools/new_skill.py <name> --description "<description>"` scaffolds a new skill's frontmatter, metadata, and reference section; run it with `--help` for the other options.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Docs?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ejryan89-docs)
# Adding a skill
This is the contract a skill must meet. The `change-skill` repository skill (`.claude/skills/change-skill/SKILL.md`) is the procedure for meeting it, and `python tools/new_skill.py <name> --description "<description>"` scaffolds a new skill's frontmatter, metadata, and reference section; run it with `--help` for the other options.
## Files
Add each skill as a pair:
```text
skills/<skill-name>/SKILL.md
deploy-meta/<skill-name>.json
```
The `name` in the `SKILL.md` frontmatter must exactly match the directory and metadata filename. Skill and shared-asset names must be unique. The skills directory is flat: the deployer refuses a `SKILL.md` anywhere but directly under `skills/<skill-name>`, so group skills with a bundle (see [Opt-in skills and bundles](#opt-in-skills-and-bundles)), not a folder. Each name the deployer reads a source by, `source.json`, the `skills`, `deploy-meta`, and `agents` folders, `SKILL.md`, a metadata file's `.json`, and an owned shared asset's file as `source.json` names it, is spelled exactly so: one spelled in another case is refused by name on every platform, since Windows would open it and Linux pass it over.
The deployer and the repository tools read `name`, `description`, `argument-hint`, and the invocation flags with `frontmatter.py` from the hidden `ejryan89-skill-core` skill. Each of those may be a plain, quoted, or block (`|` or `>-`) scalar, but not a list or a nested mapping. Deployment stops with the reason when `name` cannot be read, and validation when any of them cannot. Keys they do not read, such as `hooks`, are never parsed. A skill script that reads frontmatter imports the same reader as `frontmatter`, declaring `ejryan89-skill-core` like its `console.py`.
Claude Code loads every model-invocable skill's name and description into a listing in every session, and Codex and GitHub Copilot CLI read it through the skill's runtime adapter. Claude Code's listing has a budget, a share of the model's context window: past it, Claude Code drops descriptions, starting with the skills invoked least, and it cuts every description short at a length the `skillListingMaxDescChars` setting configures ([Skill descriptions are cut short](https://code.claude.com/docs/en/skills#skill-descriptions-are-cut-short)). Put the skill's use case first, where a cut leaves it. Keep it within 1,024 characters once rendered: Copilot refuses a longer one, so deployment stops instead, and `tools/new_skill.py` refuses one before it writes anything. Add `disable-model-invocation: true` to a skill only the user should start, such as one that deletes branches or redeploys, and also `user-invocable: false` to an internal dependency nobody starts directly. Never add either to a skill another skill invokes by name; a contract test checks this.
Skill, bundle, and agent names, and the old names `renamed` records, must:
- be at most 64 characters, the limit for a skill `name` in the Agent Skills format;
- use only lowercase letters, digits, and hyphens, without a leading, trailing, or consecutive hyphen, such as `repo-cleanup` or `review-prs` but not `repo--cleanup`, the name grammar of the [Agent Skills specification](https://agentskills.io/specification), which `NAME_PATTERN` in `skills/ejryan89-skill-core/scripts/agent_skills.py` holds for the deployer and audit-ai-config alike. An agent is not a skill under the specification, but its name follows the same grammar;
- not be a reserved Windows device name such as `con`, `aux`, `nul`, `com1`, or `lpt1`.
The Agent Skills frontmatter rules ("YAML frontmatter requirements" in Anthropic's [skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)) add two more:
- a skill name must not contain the reserved words `anthropic` or `claude`, so `claude-helper` is refused;
- neither a skill's name nor its description may contain an XML tag such as `<tag>` or `</tag>`. The naming grammar already keeps angle brackets out of a name; in a description, a bare `<` or `>`, as in `a < b` or `x -> y`, is not a tag and is allowed.
The deployer rejects a name that breaks these rules before rendering anything, and a description with an XML tag once rendered, before changing any file. `tools/new_skill.py` refuses the same values.
When a skill needs executable logic, place both its implementation and tests under:
```text
skills/<skill-name>/scripts/
```
A skill's executable files are Bash, Python, and PowerShell: `.bash`, `.sh`, `.py`, and `.ps1` files, run by `bash`, `python`, and `pwsh`, the commands `deployer/tools.py` lists, and rejected anywhere else in a skill. JavaScript and TypeScript are not supported, because no runtime they need is a deployment prerequisite and the renderer cannot validate them, and neither are PowerShell modules and Windows batch files, which no analyzer or command policy reads: `.js`, `.mjs`, `.cjs`, `.ts`, `.psm1`, `.cmd`, and `.bat` files are rejected anywhere in a skill, `scripts/` included, and so is a file that starts with `#!` without one of the extensions above. Each script sits directly in `scripts/`, never in a folder below it, which the script policies do not read. Keep `SKILL.md` and supporting Markdown focused on orchestration and explanation. Executable-language fences are reserved for short command examples of at most five lines; extract longer logic into `scripts/`.
The body keeps what the agent needs to run the skill: the commands, what their output means, and what to ask the user. What a person reads once, such as guarantees the scripts enforce, a glossary of output that labels itself, or a procedure for an action the skill never takes, belongs in the skill's section of [skills.md](skills.md) instead. For structure, follow Anthropic's [skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices): keep the body under 500 lines, link every reference file directly from `SKILL.md`, and start a reference file over 100 lines with a table of contents. `audit-skill` checks all of this, by content rather than by size.
### Description
A model-invocable skill's description is all the model reads when deciding whether to start it, so it says what the skill does, then when to use it: `<What it does>. Use it when <the requests and situations that call for it>.` Name the requests the way a user would make them and, where it helps, a near miss the skill should not take. Keep what it does first, and add trigger cues rather than length, since every session loads the description. A user-only skill's description never starts anything, so it needs no such clause.
`tools/new_skill.py` refuses, and validation fails for, a model-invocable skill whose description has no `Use it when`, `Use when`, `Use it before`, or `Use it after` clause.
A model-invocable shipped skill also has a trigger scenario, whose requests come from that clause in a user's words and whose near misses come from its neighbours' clauses and from a request no skill serves; the `evaluate-skill` run judges whether the description starts the skill on each, and "Validation" says what it holds.
### Granting tools
In Claude Code, `allowed-tools` pre-approves the listed tools for the turn that starts the skill, so they run without asking the user. It restricts nothing: a tool it leaves out still runs after the usual prompt. Codex ignores the field, and the adapters do not carry it to Copilot, which cannot scope a shell grant (see the end of this section). On a machine whose managed settings set `allowManagedPermissionRulesOnly`, Claude Code ignores `allowed-tools` in skills under `~/.claude/skills`, so a deployed skill's every grant prompts, and `strictPluginOnlyCustomization`'s `skills` and `agents` locks stop it loading the deployed skills and agents at all; [Choosing a route](installation.md#choosing-a-route) says what that leaves a managed machine.
Grant shell commands as patterns, never as a bare `Bash` or `PowerShell`, which would pre-approve every command in that turn:
```yaml
allowed-tools: ["Bash({{PYTHON}} -B \"${CLAUDE_SKILL_DIR}/scripts/widget_report.py\" *)", "PowerShell({{PYTHON}} -B \"${CLAUDE_SKILL_DIR}/scripts/widget_report.py\" *)", "Read"]
```
- Grant each pattern to both shells. On Windows the model may run a fence's command through its PowerShell tool rather than Bash. A Bash-only grant then prompts, and in a non-interactive run the command is denied.
- Write the pattern the way the command is written, `{{PYTHON}}` and opening quote included, so the grant and the command render alike. Claude Code fills in `${CLAUDE_SKILL_DIR}` in the pattern as in the command, then compares the command's text, quotes and all, with `*` standing for any text. The same pattern without the quote never matches a quoted command. A skill that runs a sibling's scripts grants each one it runs by name, ending at the closing quote, such as `Bash({{PYTHON}} -B "${CLAUDE_SKILL_DIR}/../ejryan89-code-review-core/scripts/review_pipeline.py" *)`, never the sibling's folder.
- Grant each script the body runs by name, its own as well as a sibling's, the pattern ending at the script's closing quote, a space, and `*`. A pattern that runs an unquoted path, such as a repository skill's `python tools/new_skill.py *`, ends the path at a space before the `*` instead. A `*` with a space before it at the end also matches the command with no arguments.
- A grant is a prefix match on the command's text, not a sandbox: Claude Code normalizes no path in a shell grant, so any command that starts with the pattern's text is approved whatever follows. It does check each command of a line that joins several with `&&`, `||`, `;`, or `|` on its own, so a grant covering the first command approves none of the rest, and the inventory reports the rest as ungranted. A pattern whose `*` continues a path, such as `scripts/*` or `tool.py*`, therefore also matches `scripts/../../<other skill>/scripts/<script>.py`, which reaches every installed skill's scripts, whose arguments the granting skill never checks. A pattern that ends at a script's closing quote, `.../tool.py" *`, matches that script with any arguments and no `..` path, because the quoted path ends before the `*`. The script itself, together with Claude Code's working-directory and protected-path rules, bounds what the command does, so a script that acts on a path the user supplies validates it.
- A repository tool that writes into the checkout, such as `tools/skill_shims.py`, takes `--root <dir>` to work on another checkout, as its regression suite does, and a `*` after the tool's path covers that option too. Such a tool parses `--root` with `checkout_root` in `tools/checkout.py`, which refuses a directory that does not hold `source.json` and `.claude/skills`, or that lies in a skills directory such as `~/.agents/skills`, whose adapters the deployer owns. Grant a tool whose arguments a step fixes by the forms the step runs, such as `Bash(python tools/skill_shims.py --write)`, with no `*`.
- Keep shell variables and command substitution, such as `"$PWD"` or `$(...)`, out of fence commands: Claude Code asks before it runs a command that expands one, whatever is granted. Have the script default to the current directory instead.
- Grant any other command exactly as the body runs it, such as `Bash(git rev-parse --show-toplevel)`, or, for `git` or `gh`, as the subcommand it runs, such as `Bash(gh pr create *)`. Leave a command that runs code from the target repository ungranted, so the user approves it.
- Never end a pattern's text before its `*` at a program and its switches, such as `python *`, `bash -c *`, `pwsh -Command *`, or `git *`: it pre-approves any code or subcommand the `*` supplies. Before the `*`, a pattern names a script by its path, as the program or after the program and switches that take no value, written as capital letters such as `-B`, or names a `git` or `gh` subcommand right after the program. A pattern with no `*` approves only the command it names.
- Grant a pattern only for a command the body shows, in a shell fence or a code span. A fence counts wherever Markdown allows one, indented, in a list item, or in a blockquote, and under any command shell's label, such as `bash`, `zsh`, or `powershell`. A code span in which a program runs a script is held to the rules above as a fence command is: a grant must cover it, and must not cover one that runs code from the target repository. A pattern no command in the body matches pre-approves something the skill never asks for, such as a command a generic procedure leaves to the repository it works in, which should prompt there.
- A hidden skill (`disable-model-invocation: true` and `user-invocable: false`) grants nothing. No turn starts it, so its grants approve nothing; the skills that run its scripts grant them.
- A script of the skill's own that runs code from the target repository, such as one that starts the MCP servers the repository configures, says so as a module-level `RUNS_REPOSITORY_CODE = "<reason>"`. Leave its command out of the grants, which name the skill's other scripts, such as `Bash({{PYTHON}} -B "${CLAUDE_SKILL_DIR}/scripts/audit_ai_config.py" *)`.
- List tools other than the shells by name, such as `Read` or `AskUserQuestion`, and only those a step uses. Each grant widens what runs unasked (a `Read` grant covers files outside the working directory, which otherwise prompt), so name the tool in the step that needs it, such as "`Read` the `LOG` file" or "every file `Glob` matches for `docs/**/*.md`". A step that only describes the action, such as "read the `LOG` file", does not count: a script may read the file as well as the agent.
Claude Code's [skills page](https://code.claude.com/docs/en/skills) names the skill's Markdown and its Bash rules as where it fills in `${CLAUDE_SKILL_DIR}`, and no PowerShell rule. It fills in a PowerShell rule too: in a Claude Code run on Windows with its PowerShell tool on, started with the runtime canary's command line, a probe skill whose one grant was `PowerShell(python -B "${CLAUDE_SKILL_DIR}/scripts/probe.py" *)` ran that script through the PowerShell tool unprompted, and the same skill granting another script's name had the command denied. The rule on shell variables is reproduced on every run of the runtime canary that starts Claude Code, whose expansion probe, the fixture skill `runtime-canary-expansion`, grants its own script with any arguments and runs it once with a literal argument and once with `"$PWD"`: Claude Code runs the first unprompted and denies the second in a non-interactive run, and the probe fails when the second runs unprompted. The probe expands one double-quoted variable, `"$PWD"`, so an unquoted `$NAME`, a `${NAME}`, and `$(...)`, which `EXPANDS` also reports, rest, like the other rules, on a check by hand in Claude Code on Windows, which the canary does not repeat. Validation fails when a skill grants a shell every command, grants a pattern to one shell only, grants a sibling skill's folder rather than one of its scripts by name, grants a pattern whose `*` continues a path rather than following a space outside quotes, such as its own `scripts/*` or `tool.py*`, grants a pattern whose text before its `*` names a program but no script or `git` or `gh` subcommand, such as `python *`, grants a tool that no step names or implies (a prohibition such as "do not read", or a prompt quoted for a subagent, implies nothing), grants a tool other than a shell that a step only implies (the inventory's `IMPLIED`) rather than names, runs one of its own or a sibling's scripts that a shell's grants do not cover (unless the script declares `RUNS_REPOSITORY_CODE`), grants a command that runs a script declaring it, expands a shell variable in a command, grants a scoped shell pattern that matches no command in the skill's fences or code spans, or is a hidden skill with any grant. It applies the `audit-skill` inventory (`skill_inventory.py tools`), which reports these as `UNSCOPED_ALLOWED`, `UNPAIRED_ALLOWED`, `SIBLING_FOLDER_ALLOWED`, `OPEN_PATH_ALLOWED`, `NO_SCRIPT_ALLOWED`, `UNUSED_ALLOWED`, `UNGRANTED`, `GRANTED_REPOSITORY_CODE`, `EXPANDS`, `IDLE_ALLOWED`, and `HIDDEN_ALLOWED`, and reports a declared script's command left to prompt as `REPOSITORY_CODE`. It reads fences through `find_fences` in ejryan89-skill-core's `markdown_sections.py`, the one fence detector, which the deployer renders with, so the audit, validation, and rendering agree on what a fence is; it gives the fences of the one block walk, so the block readers beside it read every fence alike. It also fails a `RUNS_REPOSITORY_CODE` that is not one module-level non-empty string, or that sits in a script with no process-starting call. The shared command reader in `tests/validation/skill_scripts.py` recognizes those calls through imports and single-binding callable aliases in their lexical scopes, including the ejryan89-skill-core clients; imports, command lookups, and command lists alone do not count. Unresolved callable aliases and commands whose program cannot be read fail rather than being guessed. Validation also fails a repository skill's grant whose `*` covers the `--root` option of a `tools/` script that does not parse it with `tools/checkout.py`'s `checkout_root`. A `tools/` module that starts Claude Code with `--allowedTools`, as `tools/skill_evals_runs.py` does, is held to the same pattern rules for each grant it passes, which pre-approve those commands for the whole session: each value after the option is a string or an f-string holding one whole grant, or a starred call of a function the module defines whose every string but its docstring is one, a value an f-string fills in is read as its name, so the module fills in no text that holds a `*`, and validation fails a value it cannot read that way. Starting a process alone does not require the declaration: it names running code from the target repository, not every external command.
The runtime adapters leave `allowed-tools` out because Copilot CLI cannot scope a shell grant to a skill's scripts. This was checked with Copilot CLI on Windows, running a probe skill from a directory whose path has a space, with no shell grant on the command line:
- Copilot accepts the field and reads `Bash(...)` as its own `shell(...)`, but it matches a shell grant against the command's name, such as `python`, not against the command's text. A grant naming the script path, such as `shell(python -B "<skill directory>/scripts/*)`, approved nothing, quoted or not, and neither did the same pattern passed as `--allow-tool`.
- The only grant that let the script run, `shell(python:*)`, also ran a `python -c` command outside the skill.
- A non-interactive `copilot -p` run applied none of a skill's grants, not even `shell(python:*)`.
Carrying the field would approve either nothing or every Python command, so a Copilot user approves each script a skill runs. Revisit this when Copilot matches a shell grant against the command's arguments.
### Paths to a skill's own files
A skill names its own files, and a sibling skill's, through `${CLAUDE_SKILL_DIR}`, never through a rendered install path such as `{{HOME}}/.claude/skills/<name>/`. As a skill's Markdown writes it, in a Bash fence before the deployer renders `{{PYTHON}}`:
```text
{{PYTHON}} -B "${CLAUDE_SKILL_DIR}/scripts/tool.py" report
{{PYTHON}} -B "${CLAUDE_SKILL_DIR}/../ejryan89-code-review-core/scripts/review_pipeline.py" check --run "<run>"
```
Claude Code replaces `${CLAUDE_SKILL_DIR}` with the absolute directory of the skill it loads. Codex and Copilot read the skill through its adapter, which states the same directory for them (see the adapter paragraph below). Either way the path is absolute when the command runs, so it does not depend on the working directory, and the skill works under any install layout. Keep the quotes: the directory may contain spaces.
- Name a sibling as `${CLAUDE_SKILL_DIR}/../<skill>/` and declare it in `skill_deps`, so it is installed beside the skill.
- Never write a bare `scripts/...` or `../<skill>/...` path in a shell fence; it resolves against whatever directory the session is in.
- In `SKILL.md` prose, name the skill's own files in a code span as `${CLAUDE_SKILL_DIR}/scripts/...` or `${CLAUDE_SKILL_DIR}/references/...`, never bare. Claude Code resolves a bare path against the working directory, costing a failed read and a search, and Codex and Copilot resolve it against the adapter, which has neither folder. Files under `references/` are exempt, because Claude Code fills in the variable only in `SKILL.md`. Validation fails on a bare path in a `SKILL.md` code span outside a fence.
- Claude Code replaces the variable everywhere in the skill, prose included, so do not use it as literal text, for example to explain it.
- Claude Code replaces it only in a skill it loads, so a skill that needs another skill's procedure invokes that skill by name, as `update-pr-dashboard` invokes `review-prs`; it never reads the other skill's `SKILL.md` or cites its step numbers or section titles, which break silently when that skill is renumbered or retitled.
- A script that needs the user's Claude directory derives it, as `curate-agent-memory` does from `CLAUDE_CONFIG_DIR` or `~/.claude`, rather than taking a rendered `{{HOME}}`. Keep `{{HOME}}` for documentation that names another location, such as the user's skills root.
Repository validation fails when a skill or agent names any skill through an install path under any spelling of the home, `{{HOME}}`, `$HOME`, `${HOME}`, or `~`, as in `{{HOME}}/.claude/skills/<skill>`, except the `os.path.expanduser('~/.claude/skills/<path>')` an agent's hook runs a script through ("Subagent definitions"), when a shell fence runs a script or a `SKILL.md` code span names its own file by a bare relative path, when a skill reaches `../<skill>` without declaring it in `skill_deps`, when a script puts another skill's `scripts` directory on `sys.path` without declaring that skill in `skill_deps`, or when a skill reads another skill's `SKILL.md` or names it beside a step number or section title.
### Script results
Every skill script reports the same way, so a `SKILL.md` reads each one alike:
| Exit | Means | Prints |
|---|---|---|
| 0 | The command did its job, including "nothing to do" and a state the skill polls again, such as `RUNNING`. | Its result lines. |
| 1 | Findings the user must act on, such as violations or invalid results, or a named failure. | Its finding lines, or a last line `FAILED <reason>`. |
| 2 | A usage error: arguments `argparse` rejects, including its `type=` checks, before any work starts. | `argparse`'s usage text on stderr. |
| 130 | Ctrl+C stopped the script. | A last line `FAILED interrupted`. |
- Every line goes to stdout, one fact per line, as `KEY value…`. A failure is a `FAILED <reason>` line on stdout, never on stderr and never through `parser.error`, which is for usage alone. A batch command names each item's failure on its own line, such as `REPOSITORY_FAILED <repository> <reason>`, and exits 1.
- A line holds one fact whatever value it carries: a path, a file's content, a model's result, or git's or gh's error text may hold a newline or another character `str.splitlines()` breaks on, and the line after it would read as a fact of its own. So every stdout `print` and `sys.stdout.write` in a shipped or repository skill's scripts prints, in each argument, `sep`, and `end`, a one-line literal, a name the module binds once at its top to one that no parameter or local hides, or what a choke point in ejryan89-skill-core returns: `flat_text` for a free-text value, `fact_line` for a tab-separated line, `single_line` for a whole line whose spaces are its own, `document_line` for a document's own line printed as its file holds it, tabs and trailing spaces kept, or `console.failed_line`; an f-string whose every value is one of those; an either-or of two; or `"\n".join(single_line(line) for line in lines)`, the final pass over lines a function built. Validation, in `tests/validation/skill_scripts.py`, fails on any other stdout print it reads, unless the module states why beside the code as a module-level `PRINT_ALLOWED = {scope: reason}`, keyed by the function's qualified name, as a Markdown report the skill shows as it is does; an entry that sanctions nothing fails. It reads a call of `print` by its own name and as `builtins.print`, under any name an import or an assignment gives either, a parameter's default such as `write=print` included, and the write by its names, and not a module under `EXIT_CONTRACT_EXEMPT`. It follows a `print` passed as an argument, as in `tick(..., emit=print)` or `Emitter(print)`, by position or by keyword, into the parameter that takes it of a function, or of a class's `__init__`, that the module or another module defines at its top level, the other module's named through the module's imports, and on through each call that passes that parameter on and each attribute of `self` a method of the class binds to it; a call through any of them is a stdout print. A module a call names by its stem is the one in the caller's own `scripts/`, ejryan89-skill-core's, or a `skill_deps` dependency's, in that order, as Python's import finds it, and each module of that stem where none holds it. Limits: a `print` a function returns, a container holds, or `functools.partial` binds is not followed, nor one a method's parameter takes, a call through `self` or any other receiver filling it, one an `__init__` the class's own body does not define takes, as a dataclass's generated one or a base class's, one `**kwargs` takes, one a nested function's parameter takes, or one a name binds conditionally, as `emit = emit or print`, nor an attribute stored on or read on anything but a method's own `self`, nor `sys.stdout.write` passed as a value; and `document_line` keeps a tab, so a tab-separated fact line printed through it may gain a field, which the policy cannot tell from a document's own line, so it is for a document's own lines alone.
- An expected error, such as a missing file, a failed `git` or `gh` call, or a directory that is not a repository, becomes a `FAILED` line, never a traceback: `main` catches it and prints its own line. An error `main` did not foresee becomes one too, through the runner every entry point starts with (below): a last line `FAILED <type>: <message>`, the exception's type and its message on one line, and exit 1.
- A script runs `gh` only through `GitHubClient` in the hidden `ejryan89-skill-core` skill's `github_client.py`, declared and imported like its `console.py`, and declares `gh` in `tools` (or `optional_tools`). Every gh command reads no stdin, shows no prompt (`GH_PROMPT_DISABLED=1`), starts no askpass helper as a git command does, and fails when it runs longer than the client's `timeout` (300 seconds unless the client names another). The client classifies a failure into `GitHubError.kind` (`prerequisite`, `execution`, `timeout`, `authentication`, `forbidden`, `not_found`, `rate_limit`, `search_cap`, `network`, `sso_partial`, `malformed` for JSON it cannot parse, `unknown_outcome` for a request that may have changed GitHub before a transient failure lost its answer, or `api` for anything else), and a caller's parse raises the same error with its own kind, such as `malformed` for an unexpected shape, `incomplete` for results GitHub cut short, `input` for an argument the caller rejects, or `ineligible` for a pull request it will not take. The client waits out a rate limit with one bounded backoff policy, and retries a read a few times after a transient failure (a 502, 503, or 504, or a connection dropped mid-request), unless the call passes `retry=False`; it never retries a request that may change GitHub, and treats any command it does not recognize as a read as such a request. It replaces each byte of output that is not UTF-8 with U+FFFD, counting them in `CommandResult.replaced`. A regression suite injects a runner that returns `CommandResult`, and a sleeper that records the waits. `json` returns the parsed output, and a caller's own parse for `request` starts from `json_body`, the same parse, so output that is not JSON fails as `malformed` everywhere. `capped_list` runs a listing that takes `--limit`, such as `pr list`, asking for one more item than its limit, and returns the items within the limit with `cut`, whether GitHub held more, so a listing cut at its limit says so.
- A Python script runs `git` only through `GitClient` in the hidden `ejryan89-skill-core` skill's `git_client.py`, declared and imported like its `console.py`. Every git command reads no stdin but the bytes a call gives in full as `input_bytes`, shows no prompt and starts no askpass helper (`GIT_TERMINAL_PROMPT=0`; an empty `GIT_ASKPASS`, which also stops `core.askPass` and git's fallback to `SSH_ASKPASS`; an empty `SSH_ASKPASS` with `SSH_ASKPASS_REQUIRE=never`, so ssh starts none either; and `GCM_INTERACTIVE=never`), and fails when it runs longer than the client's `timeout` (300 seconds unless the client or the call names another), so an expired credential fails a command instead of waiting on a prompt. It runs without git's repository-selecting variables (`bounded_process.REPOSITORY_VARIABLES`), inherited or given in an `env`, so it reads the repository its directory names, and, as every command `bounded_process` starts, without a variable whose name starts with `GIT_TRACE` or `GIT_REDIRECT_STD`, in any case, and with `GIT_TRACE2`, `GIT_TRACE2_PERF`, and `GIT_TRACE2_EVENT` set to `0` (`bounded_process.command_environment`), so a trace the environment or the configuration asks for never turns git's quiet no into a failure. `GitClient` sets none of them and takes no keyword that would: the one exception is `bounded_process.run_bounded`'s `index_file` keyword, which the deployer's `platform_support.run_tool` passes on, and which sets `GIT_INDEX_FILE` (`bounded_process.INDEX_FILE_VARIABLE`) to the index a command reads and writes, as `deploy.py --at` does for a throwaway index through a `GitClient` runner of its own that calls `run_tool`; a `GIT_INDEX_FILE` in an `env`, whatever its value, is left out like every other, since an `env` may be built from another process's, such as a hook's. A `fetch` or `ls-remote` that fails on a transient transport fault, such as a dropped connection or a host briefly not found, is retried a few times with short waits inside the same time limit, and the last attempt's answer is the result, with the retries it gave up after named on its stderr; `push` and every other subcommand run once, and a regression suite replaces the waits with the client's `sleeper` and `clock`. `run` returns a `GitResult` with the exit status, stdout, and stderr whatever git's exit, since an exit status is often the answer; `output` returns stdout and raises on a nonzero exit. stdout keeps every byte (`GitResult.output_bytes()` gives them back), and stderr replaces a byte that is not UTF-8 with U+FFFD. `stream` runs a command that answers requests while it runs, such as `cat-file --batch`; there the timeout bounds each wait for output, so a long answer that keeps arriving never times out, and closing it ends git within its exit allowance and the time limit even while a thread of the caller's is blocked writing to git's stdin. A failure raises `GitError` with its class in `kind`: `prerequisite`, `execution`, `timeout`, `not_repository`, or `git` for anything else. A regression suite injects a runner that takes the command and its timeout and returns `GitResult`, and, for a call given `input_bytes`, an `input_runner` that also takes them by that keyword; a client given a runner alone refuses such a call rather than run real git. Where absence is a normal answer, the client gives three: what git found, `None` for what git itself reports as absent, and a `GitError` with git's reason for every other failure, such as a checkout whose ownership git doubts, a configuration it cannot parse, or a broken ref, so none of them reads as something that is not there. `rev_parse_paths` and `rev_parse_path` give the absolute paths `git rev-parse` names, such as `--show-toplevel` or `--git-common-dir`, `None` only when git answers that the folder lies in no repository; `quiet_output` gives a `--quiet` command's stdout, `None` only for exit 1 with nothing on stderr; `commit_of` gives the commit a ref names; `ref_commit` gives the commit the ref of exactly one full name, such as `refs/heads/main`, names, so a branch or a tag named like an absent ref never stands in for it; and `file_at` gives a file's bytes at a commit. `names` runs a name listing, such as `diff --name-only`, `diff --name-status`, `ls-files`, `ls-tree`, or `status --porcelain`, with `-z` after its subcommand and gives each NUL-separated field exactly as git holds it, since without `-z` git quotes a name that holds a non-ASCII byte or a newline. Validation fails on a Python script outside `ejryan89-skill-core`, tests aside, that runs `git` or `gh` itself: a list or tuple that begins with either, or a call that starts a command, such as `subprocess.run` under any name its imports give it, given either as a string or through a name bound to one.
- Both clients start their commands through ejryan89-skill-core's `bounded_process.py`, the bounded runner beneath them, which, when its caller asks, also bounds the output it keeps and ends, through a process tree the caller supplies, every process the command started that has not left its process group.
- A script prints no JSON. Data the next step reads goes to a file whose path the script prints on one line (see "Working files"). A report the skill shows the user as it is, such as `github-activity-report`'s table, stays a report.
- No other exit codes. A `SKILL.md` keys on the printed lines, not on which nonzero code came back.
- Every entry point, a module whose `if __name__ == "__main__":` block calls `run_main`, deploy.py and `tools/` included, states its exit codes in its module docstring in one table, a line `Exit status:` and below it one row per code, in ascending order, the code two spaces in and what it means after it, a row's text continuing on lines indented further:
```text
Exit status:
0 the report was written, findings or not
1 a last line FAILED <reason>
2 a usage error
```
The table names exactly the codes the module can exit with: 1, run_main's; 2 when it parses arguments with argparse; and each code its code returns or exits with, which `tests/validation/exit_tables.py` reads through what `main` returns, into the functions it calls in its own module and the modules its imports name. A table names 130, which run_main gives every entry point alike on Ctrl+C, only where the code gives it a meaning of its own, as the deployer does for a cancelled recovery. A return or an exit call whose code the reader cannot follow, and an `exit_code` keyword or default whose code it cannot read where a return reads an error's `exit_code`, is named, with where its codes come from, in a module-level `EXIT_CODES_ALLOWED = {"<expression as written>": "<reason>"}` in the entry point or the module that holds it. Validation fails an entry point without a table, a code the table leaves out, a code it names that no path exits with, an `EXIT_CODES_ALLOWED` entry that names no such return, wherever it is left, and a run that finds no entry point. An entry point that reaches an allowed return may name codes the reader cannot see, so its table is held only to name each code the reader does see.
- Output is UTF-8, and no script ends in a traceback. Every entry point's `if __name__ == "__main__":` block is one call to `run_main` from the hidden `ejryan89-skill-core` skill's `console.py`: `run_main(main)`, or `run_main(lambda: main(sys.argv[1:]))` for a `main` that takes its arguments. The entry point declares `ejryan89-skill-core` in `skill_deps` and imports it as "Validation" below shows. `run_main` first sets stdout and stderr to UTF-8, because a Windows pipe defaults to a legacy code page that cannot encode every path or title a script prints. It then runs `main` and exits with what `main` returns. A `SystemExit`, `argparse`'s usage error included, passes through; any other exception prints `FAILED <type>: <message>` and exits 1; Ctrl+C prints `FAILED interrupted` and exits 130. Neither prints a traceback unless the entry point passes `traceback_requested`, a function asked only then, which says to: `deploy.py` passes one that reads `--debug` and `DEPLOYER_DEBUG`, and the traceback follows the line on stderr. Pass it `errors="replace"` for output that may hold surrogate-escaped paths, or `newline="\n"` for line endings that must not follow the platform, or `failure=failed_kind`, also from `console.py`, when an exception's text may quote a private repository the script read, so its line is `FAILED <type>` alone, as `tools/context_probe.py` passes it. To test the encoding, run the script with `PYTHONIOENCODING=cp1252` on output that code page cannot encode and compare the UTF-8 bytes it printed, not only its exit code: an encoding failure exits 1 too.
The skill's Markdown names each line a script it runs prints, by its first word, where the agent acts on it or, for a line that needs nothing, saying so, as "`DRY_RUN` and `REPOSITORY` need nothing from you". Validation fails, for every shipped and repository skill, on a line such a script prints whose first word the Markdown never names, on a status word a code span on a prose line about output names that none of the skill's scripts prints, and on an exit code the prose states that none of them uses, or that none uses as far as the inventory can read when a script exits with a constant it cannot read: the `audit-skill` inventory's `UNEXPLAINED`, `UNPRINTED`, `EXIT_MISMATCH`, and `EXIT_UNREAD` lines, which `skill_inventory.py scan` prints for one skill.
A script that must speak another protocol states why beside its code as a module-level `EXIT_CONTRACT_EXEMPT = "<reason>"`: `review_guard.py`, for example, answers Claude Code's hook protocol. Repository validation fails when any other script calls `parser.error` while handling an exception, prints `FAILED` on stderr, prints `json.dumps` output, or exits with a code other than 0, 1, or 2, or than 130 given in an `except` clause that names `KeyboardInterrupt`, as `run_main` exits on Ctrl+C. It reads the code an exit call is given or a module-level `main` returns itself as an int literal, either arm of a conditional, or a name of a constant bound to int literals, in the module or in one its imports name, at the top or inside a function, which ejryan89-skill-core's `exit_constants` reads as the exit tables do; a name of the module's or an import's that it cannot read that way fails as unread, and a local or a parameter, a value the run computes, is not read. Limits: a Bash script's `exit` given anything but digits, as `exit "$CODE"`, and a PowerShell script's exit are not read; nor is an exit given any other expression, such as arithmetic, `and` or `or`, a subscript, or a unary operation but a minus sign before an int literal; and 130 is allowed anywhere lexically inside a `KeyboardInterrupt` clause, in a function or lambda defined there and called elsewhere too. It also fails when an entry point's `__main__` block (a skill script's, `deploy.py`'s, or a deployer or `tools/` module's) does not start with `run_main()`, resolved through its imports, or when a script outside `ejryan89-skill-core` reconfigures a stream's encoding itself: by its `reconfigure`, on any receiver, read as `validation_support.resolved_calls` reads a call, through a name bound to it, a lookup by a constant name in any form of the catalogue `attribute_lookups` reads, and `functools.partial`, or looked up in any of those forms given a name computed at run time, or through `operator.methodcaller` given `reconfigure` or a computed name, with an `encoding` or a `**` it cannot read, or by a text stream it builds over a standard stream, its descriptor, or a console device's path: one Windows opens in any case, before an extension or a colon, and in any folder, as `conout$`, `CON:`, and `con.txt` do, or a Linux path to a standard stream, its descriptor under `/dev/fd` or a process's `fd` folder, or a terminal, such as `/dev/tty`, `/dev/pts/<n>`, or `/dev/console`, and it runs each entry point's block as written with its `main` failing, to show the `FAILED` line and the exit code.
A walrus in a definition's defaults, decorators, or class bases is not read as rebinding a module constant; no script here writes one. The exit tables read a name an entry point's function binds locally, or as a `for` or `with` target, as the module constant of the same name; no entry point here shadows one.
### Working files
A script that writes a working file, such as a batch, an input, or a plan, chooses the path itself: by default a new directory from `tempfile.mkdtemp` with a prefix naming the skill, such as `review-prs-batch-`, made in `private_folder.temporary_directory()` from the hidden `ejryan89-skill-core` skill. That is the temporary directory, resolved through every link and `..`, refused with an OSError naming it when another account could rename it or a folder above it, as a `TMPDIR` set by hand below a shared folder that is not sticky allows. Validation reads the Python of every shipped or repository skill's scripts, the deployer, and the repository tools, tests aside. It fails a `tempfile.mkdtemp`, `mkstemp`, `mktemp`, `TemporaryDirectory`, or `NamedTemporaryFile` call given no `dir` or `dir=None`, and one given a `dir` it cannot trace to a folder the code holds: `private_folder.temporary_directory()` called with nothing through the imported `private_folder`, a folder `tempfile.mkdtemp` made, a parameter, or one of these through `Path`, `str`, `os.fspath`, `os.path.realpath`, `os.path.abspath`, `.resolve()`, or `.absolute()`, or joined by `/` to a name or a relative string literal that reads no temporary directory, since an absolute path on the right replaces the folder, a conditional between two of them, or the `.parent` of a held name. A parameter is followed into what each call of its function in the same module passes it, and its default when it has one, so a `dir` from `gettempdir()`, the environment, or a literal fails there too. A function handed on as a value, to another name, `functools.partial`, a thread, `map`, or any other call, is one whose calls the module does not show, so its parameter is not held. A function the module never names but in its definition is taken to be handed a folder its caller holds, since another module's calls are not read. It also fails a write, such as `mkdir`, `open`, or `write_text`, whose path it traces, through the same names and calls, and into each other argument of a call a function is handed to as a value, to `tempfile.gettempdir()`, `tempfile.tempdir`, or `TMPDIR`, `TEMP`, or `TMP`, as text or bytes, a literal or a name bound to one, read from any mapping by a subscript, `get`, `pop`, `setdefault`, a name bound to one of those, or `os.getenv`, or expanded in a string, as `os.path.expandvars` does, or to a path at or below `/tmp` or `/var/tmp`, either also below `/private`, such as `/tmp/out`. It fails a call that starts a process, through `subprocess`, the exec and spawn calls of `os`, `asyncio`'s, or `bounded_process`' runners, given any argument but its environment that it traces the same way, such as `subprocess.run(["mkdir", tempfile.gettempdir() + "/x"])` or a `cwd` there, since the command may write wherever it is pointed. A call it cannot resolve through the module's imports, such as one through `getattr`, is not read, nor is a command handed to a function that starts it later, such as a method of `GitClient`, nor a process start reached through a value, as `functools.partial(subprocess.run, cwd=tempfile.gettempdir())(...)` reaches one, or through `importlib.import_module`, `__import__`, or `sys.modules`, which validation refuses at the source as a dynamic lookup. A path is read as written, in Python, Bash, and PowerShell alike: `/usr/tmp`, tempfile's last fallback, and a path with a doubled slash, as `//tmp`, are not read. A Bash script makes its temporary files in the folder `python private_folder.py temporary-directory "${TMPDIR:-/tmp}"` prints, judged the same way, naming the folder as its `mktemp` template does, so an unset or empty `TMPDIR` is judged as `/tmp`, as `update-coding-agent-skills`' `update.sh` does. Validation reads the script through ejryan89-skill-core's `bash_syntax.py`, the repository's one Bash grammar, so its comments, quotes, escapes, and here-documents are read as Bash reads them, and fails a script the grammar refuses, or a substitution in it, one in a here-document's body included, at its first line, as unread. It fails a command that runs `mktemp`, bare, by a path, or with `.exe`, itself or through a wrapper, `eval`, a shell's `-c` script, or a `trap`'s action, unless it is given only `-d` or `-q` and one template that starts by reading, whole as `$NAME` or `${NAME}` or with a prefix or a suffix removed by `#` or `%`, a variable holding the judged folder there. A variable holds it when the assignment to it written last before that place gives it a value that is one command substitution running nothing but the judge, in which a Python interpreter, named or held in a variable as `update.sh`'s `"$PYTHON"` is, or `private_folder.py` itself runs `private_folder.py`, named directly or by a variable assigned it, with `temporary-directory`, or a value that starts by reading such a variable the same way, as `update.sh`'s `TEMPLATE` reads `TEMPORARY`, assigned from `JUDGED`. A substitution with a `||` fallback, a `;` list, or a pipeline runs more than the judge; a fallback, an alternative, a replacement, a slice, or a length, as `${JUDGED:-/tmp}` is, reads something other than the judged folder; any later assignment, an append among them, ends what the earlier one gave; and a template naming `TMPDIR`, `TEMP`, or `TMP` fails. It also fails a word Bash expands, a redirection's target among them, or a here-document's body, that names the temporary directory unjudged, so a `mkdir`, a `cp`, or a redirection into it fails: `TMPDIR`, `TEMP`, or `TMP` expanded, never written as text in single quotes, a path at or below `/tmp` or `/var/tmp`, either also below `/private`, or a variable whose last assignment gave it a value naming one of these. Only two places may name it: an assignment's value outside its command substitutions, before a command's program or among the arguments of `export`, `local`, `readonly`, `declare`, or `typeset`, which gives the variable what it holds, and a substitution running the judge, as `update.sh` hands its judge `"${TMPDIR:-/tmp}"` through `TEMPORARY`. Comments are not read, so a judge named only in a comment runs nothing. An element's assignment, `NAME[SUBSCRIPT]=`, assigns part of a variable, so its value is read as a word; and where the grammar keeps no text of a part of its own, an array's value, arithmetic, or a `$'...'` string holding an escape, the word is read as written. It reads the script in text order: an assignment counts from where it is written, whatever branch it sits in, so `update.sh`'s first value of `TEMPORARY`, which it keeps on Windows, where the temporary directory lies under the user's profile, is ended by the judged one written after it. Beyond what it reads: a branch not taken, a loop that runs a later assignment again, and a function called before the assignments its body reads; a variable set by `read`, `mapfile`, `readarray`, `for`, `printf -v`, `getopts`, `unset`, `eval`, a nameref (`declare -n` or `local -n`), or a declaration that gives no value; the temporary directory named another way, as `${!name}`, `$(printenv TMPDIR)`, or `$(getconf DARWIN_USER_TEMP_DIR)` name it; a `#` or `%` removal that cuts the judged folder short, as `${JUDGED%%/*}` does, and a template that goes on without a `/`, as `${JUDGED}-x/` or a `T="$JUDGED.d"` does; a redirection inside the judge's own substitution, as `2>/tmp/err`; a `mktemp` the script runs through a variable or an expansion that names it, as `m=mktemp; "$m"` or `mktemp${x}`; and an `eval`, a shell's `-c` script, or a `trap`'s action the grammar refuses, as `bash -c $'mktemp\n)'` or `trap $'mktemp\n)' EXIT`, whose lines before the error Bash runs. It reads each `mktemp` command whole, across every line it runs on. A PowerShell script fails, outside its comments, on `New-TemporaryFile`, `GetTempPath`, `GetTempFileName`, or `TMPDIR`, `TEMP`, or `TMP` read through the `env:` drive written whole, such as `$env:TEMP`, `${env:TEMP}`, `Env:TEMP`, `Env:\TEMP`, or `Env:/TEMP`, through the `Environment::` provider, through `GetEnvironmentVariable('TEMP')` or `GetEnvironmentVariables()['TEMP']`, or expanded as `%TEMP%`, and on a path at or below `/tmp` or `/var/tmp`, as Bash does. Of the variables read by a name that is no literal, which may be any of them, it fails the `env:` drive given no name after it, as `Join-Path Env: TEMP` and `"Env:$name"` give it, and `GetEnvironmentVariable`, an index of `GetEnvironmentVariables()`, or its `Item`, given anything but one string literal that expands no variable. It does not read a wildcard name such as `Env:TE*`, a name partly literal, as `"Env:TE$x"`, or holding a backtick, as ``"Env:T`EMP"``, `"Environment::$n"`, `GetEnvironmentVariables().$n`, `GetEnvironmentVariables().Item('TEMP')` or its `get_Item` given the name as a literal, `ExpandEnvironmentVariables` given a string it builds or holds or `"%$n%"`, or the table `GetEnvironmentVariables()` returns, kept in a variable and read later. Outside single quotes a backtick escapes the character after it, as a backslash does in Bash. A PowerShell script runs `python private_folder.py temporary-directory` with no folder, which judges the temporary directory Python finds there. Command fences in Markdown are not read. It prints the path on one line, such as `BATCH <file>`, and the next step reads that line. An option for an explicit path may stay, but the script refuses, with a `FAILED` line and exit code 1 before writing anything, any path inside the skills directory it runs from, `~/.claude/skills`, or `~/.agents/skills`: `skills_directory_holding` in the hidden `ejryan89-skill-core` skill's `skill_roots.py` names the one a path lies in.
Never leave the path to the agent. Given a placeholder such as `--output "<file>"` and a skill directory it already knows, an agent writes beside `SKILL.md`, and the deployer then sees the installed skill as modified and skips it on every later update. Repository validation fails when a command fence in a skill passes a `<...>` placeholder to `--output`, `--output-<name>`, `--out`, `--out-dir`, or `--plans`. A placeholder for a path an earlier command printed, such as `--run "<run directory>"` or `--input "<input file>"`, is fine.
### Metadata
`deploy-meta/<name>.json` is the skill's deployment metadata: what the deployer needs to know to install the skill, which the runtime never sees. It lives outside the skill directory because the deployer renders, installs, and hashes only what is under `skills/<name>/`, so a deployed skill carries no deployer-specific file, and a change to how a skill is deployed never touches its template or its hash.
`deploy-meta/<name>.json` declares the variables and shared files needed by the skill:
```json
{
"required_vars": ["REPOS_ROOT"],
"shared_deps": ["runtime-compatibility.md"]
}
```
Metadata may also declare same-source skill dependencies and selection visibility:
```json
{
"required_vars": [],
"shared_deps": ["runtime-compatibility.md"],
"skill_deps": ["ejryan89-code-review-core"],
"selectable": true
}
```
`selectable` defaults to `true`. Set it to `false` only for an internal support skill that is reachable from a selectable skill. Dependencies must exist in this source and form an acyclic graph. The deployer expands the complete transitive dependency closure before rendering or mutation.
Every skill declares `runtime_support`, which runtimes run it, one value per runtime (`claude-code`, `codex`, and `copilot-cli`): `"full"`, or an object whose `level` is `partial` or `none`, whose `needs` names the capabilities the runtime lacks for it, and whose `reason` says in one line what the user loses:
```json
"runtime_support": {"claude-code": "full", "codex": "full", "copilot-cli": {"level": "partial", "needs": ["user-only-start"], "reason": "A headless copilot -p session cannot start it; start it from an interactive session."}}
```
The capabilities, and which runtimes offer them, are catalogued in `skills/ejryan89-skill-core/scripts/runtime_support.py`: `agent-delegation` (starting a subagent; every runtime), `workflow` (Claude Code's Workflow tool), `fail-closed-agent-hooks` (running a subagent under the hooks its agent definition declares, with a tool call blocked when a hook fails or times out, which the code-review reviewer's guard needs; Claude Code, since Codex and Copilot CLI run hooks but let a call through when one fails), `user-only-start` (starting a user-only skill from a headless session as well as an interactive one; Claude Code and Codex), and `sandbox-network` (network access for a skill's commands in the runtime's default sandbox; Claude Code and Copilot CLI, since Codex's default sandbox turns it off). The value follows from what the skill needs, and validation derives that from its frontmatter: an `Agent` grant in `allowed-tools` needs `agent-delegation`, a `Workflow` grant needs `workflow`, an `Agent` grant in a skill whose `SKILL.md` names, in backticks, an agent under `agents/` whose definition declares `hooks` needs `fail-closed-agent-hooks`, `disable-model-invocation: true` needs `user-only-start`, a network tool (`gh` or `copilot`) among the `tools` or `optional_tools` in `deploy-meta/<name>.json` needs `sandbox-network`, as does a git subcommand that reaches a remote (`clone`, `fetch`, `ls-remote`, `pull`, or `push`), or one no literal names, which may be any, including the git a wrapper option the reader cannot settle, a `source`d file, or a program no literal names may run, run by one of the skill's Bash or PowerShell scripts wherever the shell starts a command, git named bare, by a path, or with `.exe` (read by `git_subcommands.py` in ejryan89-skill-core, as "Commands skills may run" describes), or named by a git call in one of its Python scripts (a call that starts git: a git client's method that takes git's words, such as `services.git.run(["fetch", "origin"])`, or a function named for git that is not one of the script's own that starts none, such as `git_in(checkout, runner, "fetch")`, where any other value standing for the subcommand, as `verb` in `git.output(["-C", directory, verb])`, names one no literal names, read by `python_git_subcommands` in `runtime_support.py`, whose docstring states what it does not read), since git is never declared as a tool, and a skill another skill's `SKILL.md` says to invoke passes on what it does, though not how it starts. A runtime that offers every need is `full`; one that lacks any is `partial` or `none` and names exactly what it lacks. A hidden skill is `none` on every runtime, with the reason that no runtime starts it. The deployer refuses a malformed declaration, an unknown runtime or capability, and a `partial` or `none` without a reason. `tools/new_skill.py` writes the value that follows from the options it is given, with a default reason for each partial to sharpen. A reason for lacking a capability that a runtime's guide says how to give, which `CAPABILITY_GUIDES` in `runtime_support.py` names, such as Codex's `sandbox-network`, ends with the sentence pointing to that guide's section rather than restating its settings, and validation refuses one that does not carry it. `tools/skill_reference.py` prints the declarations as "Runtime support" in `docs/skills.md`, and the runtime canary compares each run with them. A sentence of `docs/codex-support.md` or `docs/copilot-support.md` that names one skill and one level in backticks states the skill's support on that runtime, and validation holds its level, and the capabilities it names in backticks, to the declaration. A sentence of either page that states how a runtime behaves links, in its paragraph, a page or changelog the guidance record (`.claude/skills/audit-repository/references/guidance.json`) lists, or is named in `UNSOURCED_STATEMENTS` in `tests/validation/skill_layout.py` with why it needs none, and validation refuses one that does neither.
Every metadata file has one layout, the one `tools/new_skill.py` writes: one key per line, indented four spaces, with each value on its key's line. Repository validation fails on any other layout.
### Commands skills may run
Skills run on machines where installing extra utilities may be inconvenient or not allowed, so a skill may run only:
- Python and its standard library. Call it as `{{PYTHON}}` in a Markdown example and a grant, which the deployer renders as `python` on Windows, where `python3` is often a Microsoft Store placeholder, and as `python3` elsewhere, where a distribution may install no `python` command; see [Template values](#template-values).
- `git`, Bash, and the utilities Git for Windows bundles on Windows and a Linux or macOS system provides, such as `grep`, `sed`, `awk`, `find`, `tr`, `xargs`, `ps`, and `curl`. On Windows they come with Git for Windows, together with `cygpath`; on Linux and macOS they are the system's, and a script that must run the same on both keeps to the options POSIX gives them, since macOS's are BSD's rather than GNU's.
- PowerShell: `pwsh`, and on Windows also Windows PowerShell (`powershell`).
- A tool from the catalogue in `deployer/tools.py`, declared in the skill's metadata as described below.
`STANDARD_COMMANDS` in `deployer/tools.py` lists the first three groups exactly; the platform-specific names among them (Python's command, and on Windows `powershell` and `cygpath`) come from `deployer/platform_support.py`. Repository validation fails when a skill's scripts or its Bash or PowerShell examples run anything else. It reads a Python script through `ast`, resolving each call through the script's imports and simple assignment aliases in its lexical scope, following a command held in a name to the literal the script binds it to in that scope, and reading ejryan89-skill-core's `run_bounded`, `streaming`, `GitClient`, and `GitHubClient` as the commands they run, and `os`'s exec and spawn calls, `os.startfile`, `pty.spawn`, and an event loop's `subprocess_exec` and `subprocess_shell` on any receiver as the program they start. A module the script reaches by its name, through `importlib.import_module`, `__import__`, or `sys.modules`, is read as if imported, and a runner taken from a module looked up by a computed name, or from a dict or tuple indexed where it is written, fails as a runner handed on as a value does. Validation reads a `.ps1` script or a PowerShell fence through PowerShell's own parser, where the aliases and commands PowerShell ships are standard. An alias binds a name once to a known `Name` or `Attribute` chain: by an assignment such as `runner = subprocess.run`, an assignment expression, an item of a literal tuple or list it is unpacked from or loops over, a parameter's default, or a case that captures its whole subject. A call through an alias that is rebound or cannot be resolved fails validation. Dynamic callable construction, such as a call's result or an item of anything but a literal, is not an alias.
Validation reads a Python command's program wherever the script names it: the first item of a list or
tuple, the first word of a string, or the literal prefix of an f-string, a `%` format, or a `.format()` string
before its first placeholder, so `"gh api %s" % endpoint` runs `gh`; what a `" ".join`, a `shlex` split or join,
a path conversion, or a lookup such as `shutil.which` is given; what one of the script's own functions returns;
`sys.executable`, which is the platform's Python command; and a runner's `executable=`, which replaces the program. A command a
function takes as a parameter is read at every call of that function in the script. A command whose program it
cannot read fails both the declared-tool and shared-client policies instead of being ignored: a format with no
literal program prefix, such as `f"{program} api"`, a value the script reads from elsewhere, or a parameter of a
function no call in the script passes, that the script hands on as a value, or that other scripts may call by its
public name. So is a runner itself that the script hands on as a value, to `functools.partial`, `map`, a thread's
target, or a collection, or takes by any lookup by name in the one catalogue `attribute_lookups` in
`tests/validation/validation_support.py` reads (`getattr`, `inspect.getattr_static`, `object.__getattribute__`, a
bound `x.__getattribute__(name)`, `operator.attrgetter`, `operator.methodcaller`, `vars(x)[...]`, and `x.__dict__[...]`), given the runner's
name or one the script computes. Keep the program name literal and interpolate only its arguments. A function whose
program truly comes from
elsewhere, such as a runner a client injects or a server a repository configures, states why beside
the code, as a module-level `COMMANDS_ALLOWED = {scope: reason}` keyed by the function's qualified name or by a
module-level assignment's target; validation fails on an allowance that sanctions nothing it reads. A parameter
that `COMMAND_RUNNERS` in `tests/validation/skill_scripts.py` names, such as `run_bounded`'s command, is read at
each caller instead.
A command that runs another reads as both. Validation reads Bash, a script, a fence, or the script a command hands a
shell, through ejryan89-skill-core's `bash_syntax.py`, the repository's one Bash grammar, which Bash's own syntax
check holds: a command wherever Bash starts one, a here-document's body as data handed to its command's input, of
which only the command substitutions of an unquoted one run, a comment to its line's end, and arithmetic as running
no program. A here-document a shell reads as its script, as in `bash <<EOF` or `bash -s <<'EOF'`, is read as data
too, so a program in its body goes unread; no script here writes one. `source /dev/stdin <<EOF` is refused, as every
`source` is, below. A
file holding Bash the grammar refuses fails the policy, which names it, and so does a Python script handing a shell
such Bash fail the shared-client and checker policies: Bash runs the lines before a syntax error, so none of the
file's programs can be trusted as read. A script a shell is handed with `-c` as an f-string in a list, as in
`["bash", "-c", f"git push {x}"]`, is not read by the shared-client policy; no script here writes one. A word
whose literal text holds `%unread%`, the reader's own placeholder for a part only running settles, is read as such a
part; no script here writes one. A function the script defines runs no program of its name,
unless Bash refuses its name as it runs the definition, as it refuses a quoted, escaped, or expanded one; a name
holding a tilde, which Bash defines, is read as one it refuses, a stated limit. In Bash, validation reads the program each command substitution, quoted
or not, runs, and the program a wrapper of `COMMAND_WRAPPERS` in ejryan89-skill-core's `command_wrappers.py` runs,
such as `xargs`, `env`, `command`, `nohup`, `timeout`, `sudo`, and `setsid`, and `find`'s `-exec`, and every command of the script `eval`, a shell's `-c`, or a `trap`'s action runs, the action read as Bash's `trap [-lpP] [action] condition ...` reads it, with `-c` read as the
shell reads it, alone or in a bundle such as `-lc`, before or after the shell's other options; `command -v` only looks
one up. An unquoted first operand of `trap` only running settles that expands to nothing or to an option, as in `trap $none 'git push' EXIT`, moves the action Bash runs to a word read as a condition, so its programs and git subcommands go unread, a stated limit; no script here writes one. A shell, wrapper, or `find` is read by its file name, so `/bin/bash -c`, `bash.exe -c`, and `/usr/bin/env` run
what their bare names run, matched as written in Bash and in any case in PowerShell. A wrapper under a prefix a package
manager installs it with, a g or a u, as `gtimeout` or `uenv`, is read as the wrapper it builds; a prefixed `find` or
shell, as `gfind`, is not, a stated limit, since no script here names one. Only an unquoted operator or keyword is syntax: a quoted or escaped `;`, `&`, `|`, `(`, or `{`, such as the
`\;` or `';'` that ends a `find -exec` action, is a word of the command it stands in. A wrapper's options are read as getopt reads them, a long one only spelled in full, so a program behind an
abbreviated option or one the wrapper's table does not list is a program the policy cannot read. So is a builtin's use
that runs text no reader reads, as `command_wrappers.REFUSED_BUILTINS` names each: `.` and `source`, `fc` but for a
listing, `mapfile -C` or `readarray -C`, `compgen -C`, `-F`, or `-W`, whose wordlist's substitutions it expands, `enable
-f`, and a word whose array subscript holds a command or process substitution, or Bash 5.3's `${ command; }`, a nested
subscript's included, for `let`, `declare`, `typeset`, `local`, `read`, `printf`, `unset`, `test`, `[`, `wait -p`,
`export`, `readonly`, or `getopts`, which Bash expands even where the word is quoted, for the last three once the
variable has the integer attribute; and, for `declare`, `typeset`, `local`, `readonly`, or `export`, an assignment
whose value's text opens with `(` and holds a substitution or a parameter expansion, whatever its name part, as
`declare -a a='($(x) 1)'`, `declare -a a="($v)"`, `declare -a b[0]='($(x))'`, or `declare -a "$n"='($(x))'`, which
Bash reads as a compound assignment when the variable is an array, by `-a` or `-A` or as it already is, expanding each
word it holds; a quoted value holding neither, as the regex `local re='(^|/)x$'`, runs nothing and is read. An unquoted
subscript is a glob or a brace expansion's word, read with its text, so `read a['$(x)']` is refused too. Every builtin Bash's `compgen -b` lists is decided there. The policy does not see, and no script here
writes: an ANSI-C `$'...'` word whose escape spells such a substitution, or an ANSI-C `$'...'` value whose escape
spells a compound assignment's `(` or its substitution, as `declare -a a=$'\x28$(x))'`; a declaration's value a
variable gives whole, as `v='($(x))'; declare -a b=$v`, which Bash reads as a compound assignment once it expands
the variable, a design question #3716 holds; text an integer variable receives as data, as
`declare -i i; read i <<< 'a[$(x)]'`; a quoted subscript's substitution outside a builtin's words, as
`[[ -v 'a[$(x)]' ]]`, `[[ 'a[$(x)]' -eq 1 ]]`, an assignment to an integer variable, or the quoted, escaped, or
ANSI-C subscript of an element inside an array assignment, as `a=(['$(x)']=1)` or `declare -a a=(['$(x)']=1)`,
which Bash 5.3 runs, while `bash_syntax.py` reads the
single-quoted substitution of an array's subscript in an assignment before a command's name or in a `${ }`, as
`a['$(x)']=1` or `${a['$(x)']}`, as Bash 5.3 runs it, and refuses an ANSI-C string spelling one in any subscript;
a process substitution in a double-quoted `${ }`'s pattern or replacement word or an unquoted here-document's
body, as `"${x#<(x)}"`, and an ANSI-C string in a nested `${ }`'s replacement inside a substring's offset, as
`${x:${a/x/$'\x24(x)'}}`, which Bash 3.2 runs; an option word a variable or a substitution fills, as
`o=-W; compgen "$o" '$(x)' x`, which the policy takes as the literal its text is; and `enable -n`, which makes a later
name run the program of that name, as `hash -p` makes one run another file. The grammar does not read a script, which the policy reports as Bash it
cannot read, holding a command that turns on a `set -o` or `shopt` option under which Bash reads the text after it otherwise, as
`bash_syntax.OPTIONS_REFUSED` names each: `expand_aliases`, `extglob`, POSIX mode, `keyword` (`set -k`), `histexpand`
(`set -H`), a compat level, or Git Bash's `igncr`, turned on by `set` or `shopt` in any spelling, behind `builtin` or
`command` too, or by an assignment to `POSIXLY_CORRECT` or `BASH_COMPAT`; and `set` or `shopt` given a word the text
does not settle. Every option Bash's `set -o` and `shopt -p` print is decided there. The policy does not follow
`xtrace`, which expands `PS4` before each traced command, running a substitution its value holds, nor an option the
script does not turn on itself, as the environment or a shell's start options set one, nor
`POSIXLY_CORRECT` or `BASH_COMPAT` set other than by NAME=value before a command, a declaration builtin's NAME=value,
or `${NAME:=word}`, as a declaration that gives no value, a `{NAME}>` redirection, `read`, `printf -v`, a loop, a name
reference, or an arithmetic assignment sets one, or `${NAME:=word}` in an array assignment's element or inside
`$(( ))` does, as `x=( ${POSIXLY_CORRECT:=1} )`; nor a set or shopt behind a glob or a brace expansion in the
command's name or in `command`'s options, as `{set,-k}` or `command -[p] set -k`. Every expansion and quoting form Bash's manual names is decided in
`bash_syntax.EXPANSIONS_READ`, `EXPANSIONS_REFUSED`, or `NOT_READ`, and the grammar does not read a script holding
Bash 5.3's `${ command; }` or `${| command; }`, which run in the shell itself; an ANSI-C string inside a double-quoted
`${ }` that spells `$`, a backquote, a quote, a backslash, or `}`, or one in arithmetic or a substring's offset that spells `$` or a
backquote, since Bash puts the text it spells into what it expands; or a `$$` before a single-quoted string holding a
backslash there, which Bash 3.2 reads as `$` and an ANSI-C string. The policy does not see a value Bash runs as code,
as `${!name}`, `${name@P}`, or arithmetic on a variable whose value holds an array subscript with a substitution, as
`y='a[$(x)]'; echo $((y))`; nor Bash 3.2's ending of a `${ }` at a `}` inside a substitution it holds, or of a
double-quoted `$( )` at a `)` inside a `${ }`, which it reads as Bash 4 and later do, or of a `${ }` at its first
`}` where an unclosed `$[` or `$((` inside it opens, which Bash 5.3 refuses as the grammar does; nor a backslash and
newline that split `$(` inside double quotes, a `${ }`'s word, or arithmetic, which Bash joins into a substitution, or
an unquoted `$` from the `(` or `{` after it, which the grammar refuses. In
PowerShell it
reads what `Start-Process` starts, with the words its `-ArgumentList` gives it, a literal string or a list of them
joined with spaces and split as the started program splits its command line, what `& (Get-Command <name>)` runs, every
command of the string `Invoke-Expression` runs, and the program a wrapper or `find`'s `-exec` runs, read through the
same table of wrappers as in Bash, since `pwsh` on Linux runs them as programs. These cmdlets' arguments are bound as
pwsh's binder binds them, by position, by name, alias, or any prefix it places, and joined by a colon, as
ejryan89-skill-core's `powershell_commands.BOUND_COMMANDS` holds; a wrapped program that is not a literal, an argument
list that is not literal where a script would stand, a parameter the cmdlet does not have or a prefix pwsh cannot
place, `--`, a splat whose hashtable the source does not settle (a splat of a variable assigned once, before it in
its script block, from a hashtable literal of constants and mentioned nowhere else is bound by its keys), a cmdlet a
pipeline feeds a parameter it would read, `Get-Command` given `-Verb`, `-Noun`, `-UseAbbreviationExpansion`,
`-UseFuzzyMatching`, or a wildcard in its name, and a member or an index taken off its result, as
`& (Get-Command git).Source`, are programs it cannot read. A command called by the name of the module that defines
it, in any case, as `Microsoft.PowerShell.Management\Start-Process`, is read as that command; one of PowerShell's own
commands qualified any other way, by another module, a module's path, or none, as `\Invoke-Expression`, is a program
it cannot read. A script that names a form that may change what a later name runs or binds is refused as a whole, as
`powershell_commands.DEFINITIONS_REFUSED` lists: `Set-Alias`, `New-Alias`, and `Import-Alias` by any name, one with
an empty module part, as `\Set-Alias`, included; `New-PSDrive` onto the Alias or Function provider, one no literal
names, or one called with an empty module part; the `alias:` or `function:` drive; `$PSDefaultParameterValues`; and a
command lookup action of `$ExecutionContext.InvokeCommand`, its `set_` method included. One named only by a value
built at run time, and the aliases a module the script imports exports, are not read
(`powershell_commands.NOT_READ`). Stated limits: every mention of those forms is refused, a read included, such as
`Test-Path Function:\X`, `$PSDefaultParameterValues.Count`, or a message holding `function:name`, although it changes
nothing; Windows PowerShell's start-up, which no runner can parse in
process, is read with pwsh's start-up parser; a splatted hashtable changed by code the source builds at run time,
or reached through `$PSCmdlet.GetVariableValue` or a drive path built from text, is read as its literal, as is a
splat in a named block that runs before the block assigning it, as `end` written before `begin`, or after a
`process` block that empty pipeline input skips; and a .NET method or static call that runs a string or starts a
process, as `[scriptblock]::Create('git push').Invoke()`, `$ExecutionContext.InvokeCommand.InvokeScript(...)`, or
`[Diagnostics.Process]::Start('git', 'push')`, runs no CommandAst and so is read as running no command. In Python it
reads every program of a command a runner gives a shell, such as `os.system`
or `shell=True`, and of the script a list such as `["bash", "-e", "-c", "<script>"]` runs, its `-c` read as in Bash
up to the list's first item that is not a literal string. In all three, a start-up of `pwsh` or Windows PowerShell
reads every command of the script its `-Command`, `-CommandWithArgs`, or Windows PowerShell's first positional word
runs, its parameters read as ejryan89-skill-core's `powershell_startup.py` reads them, in every spelling pwsh's
start-up parser takes, after a dash, a doubled dash, an en or em dash, or a slash, and padded with whitespace; an
`-EncodedCommand`, a script read from standard input, and one a word the policy cannot read holds are programs it
cannot read, while `-File -`, which reads a script from standard input, ends no reading, since pwsh reads on past it. In PowerShell it reads a Bash shell's `-c` script too, as in Bash, up to the first word that is not a
literal. The git subcommand a
Bash or PowerShell script runs, which a skill's runtime support is held to, is read the same way, in the command a
wrapper or `find`'s `-exec` family runs, up to the `;` or `{} +` that ends the action, and in the script `eval`, a
shell's `-c`, a `trap`'s action, or a PowerShell start-up runs as well as at the script's own level, a PowerShell script's commands
listed by the same parser reading as this policy's. In Bash it is read through ejryan89-skill-core's
`bash_syntax.py`, the repository's one Bash grammar, which Bash's own syntax check holds: wherever Bash starts a
command, at a line's start, after an operator, in a group, a subshell, or a substitution, in each case item after its
pattern, and in a function's body, and never in a comment or a here-document's body, of which only the command
substitutions of an unquoted one run. A script the grammar refuses, or whose `eval` or `-c` script or `trap` action it refuses, a
PowerShell script's Bash `-c` script included, fails, naming the script: Bash runs the lines before a syntax error,
so none of its git commands can be trusted as read. A here-document a shell reads as its script, as in `bash <<EOF`,
`bash -s <<'EOF'`, or `source /dev/stdin <<EOF`, is read as data, so a git command in its body goes unread, and a
brace word that eval, a shell's `-c`, a trap, or `env -S` runs, whose first alternative holds the program and a space,
as `eval {'git push',x}` or `env -S {'git push',x}`, reads its script's first program as the literal `{git`; no
script here writes either. Nesting is bounded by Python's recursion limit, not a stated depth, so where deeply nested text stops
being read, more than a hundred levels of subshells or substitutions, depends on the caller's stack. Git, a shell, a wrapper, or `find` named by a path or with `.exe` is the program its file name
names, matched as written in Bash, so `Git` is no git there, and in any case in PowerShell. One reader does it for validation and for audit-skill's
runtime-support derivation, ejryan89-skill-core's `git_subcommands.py`, on the parser script in its
`powershell_commands.py`, and `tests/audit-skill/test_audit_skill_runtime_needs.py` holds the two derivations equal on
every wrapper. A subcommand no literal names, such as `git "$sub"` or `git $sub`, may be any, one that reaches a
remote included, so the skill needs network access. So may one that is a glob or a brace expansion, which Bash makes
other words of, as `git {push,x}` or `git pu?h`, and the git a command may run whose program no reader reads: a
program's word that is a glob or a brace expansion, as `{git,x} push`, one behind a wrapper option its table does not
settle or a builtin's use that runs text no reader reads, as `timeout --sig TERM 5 git push` or `source lib.sh`, and
one a wrapper or `find`'s action runs that no literal names, as `env "$tool" push`. A wrapper's program, or what `&`
runs, held in a variable, and a program's word that is a glob or a brace expansion, are programs the policy cannot
read, and fail the declared-tool policy.
Reach for these substitutes instead:
| Instead of | Use |
|---|---|
| `jq` | Python's `json` module, or PowerShell's `ConvertFrom-Json`. A script parses `gh --json` and `gh api` output with the `json` module, adding `--paginate --slurp` to a paginated `gh api` call, and validates its shape. `gh --jq` is for a one-line command in prose, never a script; validation fails when a shipped or repository skill script passes `--jq`, `--template`, or their shorthands `-q` and `-t` to `gh`, attached or not, alone or after shorthands that take no value in the same word, as in `gh api -iq .name`, read in a shell command with the lines a trailing backslash or backtick continues it onto; a Python list, tuple, or `+` of them holds a shorthand as one beside `--json`, in `gh api`, or after `gh` with words it unpacks, and a shell command holds `-t` as one only beside `--json` or in `gh api`, since `gh pr create -t` is a title; a list built by `append`, `extend`, or `+=`, a PowerShell splat such as `gh @a`, and a Bash array expansion such as `"${args[@]}"` are not read |
| `rg` | `grep -E` in Bash, Python's `re` module, or the agent's built-in search tool |
| `yq` | JSON instead of YAML; Python's standard library cannot read YAML |
| `curl` or `wget` against the GitHub API | `gh api`, which handles authentication |
| `xmllint` | `read_xml` from ejryan89-skill-core's `xml_reader.py`, which refuses a `DOCTYPE` or `ENTITY` declaration before parsing with Python's `xml.etree.ElementTree` |
| `python` or `python3` in a Markdown example or a grant | `{{PYTHON}}` |
If a skill truly needs another tool, add it to `SKILL_TOOLS` in `deployer/tools.py` and declare it, so that `check` reports it and deployment warns when it is missing.
Declare the external tools a skill runs, beyond Git and Python, which every deployment already needs:
```json
{
"tools": ["dotnet-format"],
"optional_tools": ["gh"]
}
```
`tools` lists the tools the skill cannot work without. `optional_tools` lists those it uses only when they are installed, such as dotnet-format reading a pull request's base branch through `gh` before falling back to the remote's default branch; a tool may not be in both. The known tools are listed in `SKILL_TOOLS` in `deployer/tools.py`: currently `gh`, `copilot` (optional for every skill), `dotnet-format`, `dotnet`, and `pdftotext`, which the code-review skills declare optional because a review without it is `INCOMPLETE` rather than failed. To add one, add it there with how to find it and its minimum version, if any. `python deploy.py check` reports each declared tool and which skills use it, as optional when every skill using it declares it optional, and deploying warns when a selected skill requires a tool that is not installed. [`docs/skills.md`](skills.md) lists each skill's own declared tools.
A skill runs what its own scripts and Bash and PowerShell examples run, and what the scripts of its `skill_deps` that it reaches run: a dependency script is reached when the skill's own files import it or name its path (`${CLAUDE_SKILL_DIR}/../<dependency>/scripts/<script>.py`), and so is every dependency script a reached one imports. A tool a reached script runs is the skill's, and the skill declares it too. A dependency's other tools are not the skill's: `flag-review-finding` depends on `ejryan89-code-review-core` but reaches none of its `gh` calls, so it declares no tools. Repository validation fails when a skill's own scripts or examples run a known tool it does not declare, when a dependency script it reaches runs one it does not declare, when it declares a tool that nothing it runs or reaches runs, when it lists under `tools` a tool the catalogue makes optional for every skill, or when it runs a command that is neither standard nor declared.
Declare an atomic selection bundle in `source.json`:
```json
{
"bundles": {
"code-review-operations": {
"members": ["review-prs", "update-pr-dashboard"]
}
}
}
```
A selectable skill may belong to at most one bundle. Bundle members are hidden as individual prompts, and `--all` selects the bundle as one user-intent root. The manifest records requested bundles/root skills separately from the expanded concrete installation.
### Opt-in skills and bundles
Mark a skill or bundle opt-in when only some users need it, such as one for a single programming language. Set `"opt_in": true` in the skill's `deploy-meta/<name>.json`, or in the bundle's definition in `source.json`; for a skill inside a bundle, mark the bundle instead. Only menu items can be opt-in, so a hidden dependency cannot be.
`--all` skips opt-in items unless the user already chose them, so an existing installation keeps them. Users add one with `--all --include <name>` or by choosing it from the menu, which labels it `(opt-in)`. An opt-in skill another skill declares in `skill_deps` is installed with that skill, but that does not choose it or its bundle. `python deploy.py check` reports a tool as optional when every root that uses it is an opt-in item that is not chosen; a tool an unchosen opt-in skill runs is still needed when a chosen root pulls that skill in, and its line marks each unchosen opt-in root as `opt-in <name>`.
Every selected public skill also receives a generated thin adapter under `~/.agents/skills/<name>`. The adapter points to the authoritative rendered skill under `~/.claude/skills/<name>` and contains no copied workflow implementation. It also states that `${CLAUDE_SKILL_DIR}` in the skill stands for that directory, because those runtimes do not replace the variable and their own base directory is the adapter's, which has no `scripts/`. It carries the skill's rendered description, which Codex and Copilot match requests against and show in their skill listings and pickers, and its `argument-hint` when it has one, which Copilot shows when the user starts the skill, but not its `allowed-tools`. For a skill with `disable-model-invocation: true`, it keeps the same description and sets each runtime's own explicit-only switch, which keeps the model from starting the skill: `disable-model-invocation: true` for Copilot and `policy.allow_implicit_invocation: false` in `agents/openai.yaml` for Codex. When the skill declares a shared Markdown asset in `shared_deps`, such as `runtime-compatibility.md`, the adapter first tells the runtime to read and apply it. Hidden dependencies do not receive adapters. Adapter ownership, conflicts, retained force backups, removal, and recovery are part of the same deployment transaction and manifest. The deployment report lists an adapter as `<name> (runtime adapter, ...)` only when it needs attention or does something its skill does not; the manifest records adapters under the historical key `wrappers`. The `.agents/skills/` copies of this repository's own skills are shims that `tools/skill_shims.py` writes, not adapters.
Supported derived variables are `HOME` and `SOURCE_ROOT`, the directory containing the `deploy.py` that rendered the skill. The configured variables are `REPOS_ROOT`, `UPDATE_CHANNEL`, `REPO_CLEANUP_REGENERABLE`, `REPO_CLEANUP_REGENERABLE_FILES`, and `REPO_CLEANUP_PROTECTED`. Derived values pass an allowlist, as configured ones do: letters of any script, digits, spaces, and `/ : . @ _ ( ) -`. A deployment whose home folder or checkout path has another character stops before any change and names the character.
Every token a skill uses must appear in its `required_vars`, and every entry in `required_vars` must be used. Shared assets may use only derived variables. A configured variable that no skill requires, or a derived variable that no skill or shared asset uses, is rejected by validation, so remove it from `deployer/config.py` together with the last skill that needs it. To add one, declare its character allowlist in `CONFIGURED_VARIABLES` and its prompt in `PROMPTS` in `deployer/config.py`, its fixed set of values in `CHOICE_VARIABLES` when it has one, and its value in `DEFAULTS` when a configuration saved before it existed should take one, then require it from the skill that uses it. A variable that is not a directory needs a default, which a `--canary-home` deployment takes.
### Renaming a skill
Rename a skill by moving `skills/<name>/` and `deploy-meta/<name>.json` to the new name, updating every `skill_deps`, bundle member, and reference that names it, and recording the old name in `source.json`:
```json
{
"renamed": {
"analyze-skill-cost": "audit-skill"
}
}
```
Each key is a name the source no longer has, and its value one of the source's skills. The deployer refuses the entry before it reads ownership otherwise. On the next deployment, an unmodified skill this source deployed under the old name, and its runtime adapter, move to the new name as one journaled step that the dry run reports under `RENAME` and the deployment under `RENAMED`, and a request recorded under the old name stands for the new one, so the menu marks it and `--all` keeps an opt-in skill the user chose. A modified copy is preserved under the old name, its reason naming the new one, and one that a skipped or preserved skill still depends on is kept, as any skill the source no longer has would be. Keep the entry: an installation may skip any number of releases. A rename is a change every updater meets, so its pull request states it under `## Upgrade note`. An old name that breaks the naming rules above, such as one with consecutive hyphens, is refused as a `renamed` key, so a skill deployed under such a name is renamed with no entry: the deployment removes the old copy when it is unmodified and preserves it when it is modified, and a request under the old name is not carried over, so `--all` drops an opt-in skill until `--include <new-name>` requests it again.
## Template values
Use a declared variable as an uppercase token:
```text
{{REPOS_ROOT}}
```
Every token used by a selected skill must be available during deployment. The deployer rejects unresolved tokens after rendering.
Substitution depends on where the token appears. In `.json` and `.toml` files, and in `json` and `toml` fenced blocks in Markdown, the value is escaped as string content and the rendered file must still parse. In Bash, PowerShell, Python, and YAML files, in their fenced blocks, and in a Markdown file's frontmatter, a value containing quote, expansion, or escape characters is rejected rather than substituted. The deployer reads a fence labelled `bash`, `sh`, `shell`, `console`, `zsh`, `ksh`, or `dash` as Bash, `powershell`, `pwsh`, or `ps1` as PowerShell, `python`, `python3`, or `py` as Python, and `yaml` or `yml` as YAML, ignoring the label's case; ejryan89-skill-core's `markdown_sections.FENCE_LANGUAGES` is the table it reads the executable labels from. A `console` fence that holds a prompt is a shell session: Bash and ShellCheck check the commands after its prompts, as `markdown_sections.session_commands` reads them for audit-skill too, and never its output. A token in a fence of an executable language it knows no escaping for, `fish`, `cmd`, `bat`, `batch`, JavaScript (`javascript`, `js`, `node`, `mjs`, `cjs`), or TypeScript (`typescript`, `ts`), stops the deployment whatever its value, with `the deployer knows no escaping for a <context> fence` and the step `Write the example in a Bash, PowerShell, or Python fence.` Markdown prose, a fence with any other label, and `.txt` files receive the value unchanged. A fence is read as CommonMark reads it: three or more backticks or tildes open it, and only the same character, at least as many times, closes it, so a fence of four backticks can show an example fenced with three. The first word of its info string sets its context. The deployer, the ShellCheck extraction, and every validation rule that reads Markdown fences use the one detector, `find_fences` in ejryan89-skill-core's `markdown_sections.py`, which `deployer/render.py` imports, and which gives the fences of the one block walk `blocks` reads: a fence ends where the list item or blockquote that holds it ends, and a run opens or closes one only at most three columns past that content, so a run indented further is indented code. `{{PYTHON}}` is the one token of another class: an interpreter, which the deployer derives for the platform from a fixed set, `python` or `python3`, and refuses any other value of. It renders unquoted, as the command word it is, and a skill that uses it declares it in `required_vars` as it would `HOME`. Write it wherever a shipped skill's Markdown Bash or PowerShell, a code span in its prose that runs a command, such as a step's inline command, or a shell grant in its `allowed-tools` starts Python. Validation fails on `python` or `python3` written by hand anywhere in such a fence or grant, but it reads a code span only when the interpreter is the span's first word, followed by its options and what it runs: a span that starts Python after another word, as `cd x && python run.py` does, passes validation and still takes the token. A span that names the interpreter or an option alone, such as `python -c`, runs nothing and stays as written. A script under `scripts/` runs from the checkout in its suite, unrendered, so it names the interpreter itself, as `update.sh` does by the shell it runs in. Keep every other token inside quoted strings in executable content. A token whose value may be empty, one of `OPTIONAL_VARIABLES` in `deployer/config.py`, joins its option in one word, as `--protected="{{REPO_CLEANUP_PROTECTED}}"`: Windows PowerShell 5.1 drops an empty argument, so the option would take the next word as its value, and validation refuses such a token quoted as an argument of its own. Add an execution fixture whenever a token appears in Bash or PowerShell: a test in `tests/deployer/` whose name contains `with_spaces`. It carries the token in a string literal, binds a value containing spaces, runs the rendered result with that language's shell (`find_bash`, or `find_pwsh`) through `run_tool`, and asserts the run's output against that value. Validation fails when a token in a skill's Bash or PowerShell sits outside quotes, or when no such test covers that token in that language. It reads Bash through ejryan89-skill-core's `bash_syntax.py`, the repository's one Bash grammar: a token is quoted when every character of it stands inside quotes in the word Bash reads, a substitution's own quotes, not the ones around the substitution, and a here-document's body, which Bash never splits, quotes it. A token where the grammar keeps no text of its own, in an array's value, arithmetic, a `$'...'` string holding an escape, or an unquoted `${ }` expansion, or joined to a `$NAME` before it, fails as one validation cannot judge, and so does every token of Bash the grammar refuses. A token in a `${ }` expansion's parameter name, index, or `!` or `#` prefix, as `"${{{X}}:-a}"`, `"${!{{X}}}"`, `"${#{{X}}}"`, or `"${Y[{{X}}]}"`, is read as quoted, though a value with a space breaks it; no skill writes one. A token named only in a comment, a run whose output is never compared with the spaced value, or a test that never runs the result covers nothing.
## Shared assets
Place an owned shared file directly under `skills/` and declare it in `source.json`:
```json
{
"shared_assets": {
"runtime-compatibility.md": "owner"
}
}
```
A shared Markdown asset is runtime guidance for Codex and Copilot. Declare it in the skill's `shared_deps`, but do not mention it in `SKILL.md`: Claude runs the skill directly and would spend a read on it every run, and the generated adapter already points other runtimes to it. Validation rejects a `SKILL.md` that names one, so keep anything Claude also needs, such as a rule about posting to GitHub, in the skill itself.
`shared_assets` must be an object, and each role a string, `owner` or `dependency`; source discovery stops with an error naming the asset otherwise. Use the `dependency` role only when another installed source owns the asset. The deployer verifies the owning source and manifest hash before installing a skill that needs the dependency.
A shared asset's name is one file name of letters, digits, dots, hyphens, underscores, and spaces that does not start with a dot, end in a dot or a space, or name a Windows device such as `con` or `nul.md`. The deployer compares names as the file system does, so on Windows `Guide.md` and `guide.md` name one file: an asset may not share its name, in any case, with a skill or another asset of its source, or with an item another source has deployed. A name ending in `.deploying-bak` or containing `.tmp.` is reserved for the deployer's own files, and so is `journal.jsonl`, in any case, the name of a run's journal in the staging folder where each shared asset is staged under its own name.
The manifest records each installed skill's `shared_deps`, and its agents as `agent_deps` (see [Subagent definitions](#subagent-definitions)), and those records move with the skill during `--migrate-from`. A shared asset is installed only while a selected skill needs it. When no selected skill needs an owned asset, the deployer removes it unless a skill that stays installed still needs it: a locally modified skill that was preserved or skipped, or a skill owned by another source. In that case the asset is kept and reported as `KEEP` until nothing installed needs it.
## Subagent definitions
A Claude Code subagent a skill starts can ship with it, through the deployer and in a plugin alike. Put its definition in `agents/<name>.md`, a Markdown file whose frontmatter `name` matches the file name, and list it in the skill's `deploy-meta/<name>.json`:
```json
{
"agent_deps": ["code-review-reviewer"]
}
```
The deployer installs each agent a selected skill declares to `~/.claude/agents/<name>.md`, byte for byte but for the interpreter. Agent files take no other template value, because their frontmatter (`tools`, `model`, `effort`, `hooks`) is executable configuration; `{{PYTHON}}`, a value from a fixed set, renders in them so a hook names Python as the platform does. An agent is owned in the manifest like a skill: an unmanaged file that differs is skipped unless forced, with its backup kept, a locally modified one is preserved, and installs, removals, and recovery share the run's journal. An agent is removed when no selected skill still needs it, unless a locally modified skill that was preserved or skipped was deployed with it: the manifest records each skill's agents as `agent_deps`, their deployed file names, and such an agent is kept and reported as `KEEP` like a shared asset. A skill entry written before `agent_deps` was recorded keeps no agent until a deployment selects the skill and finds it unmodified, which records them. `agents/` holds only `<name>.md` files, and executable logic stays in a skill's `scripts/`. A hook that runs a skill's script cannot use `${CLAUDE_SKILL_DIR}` or `$HOME`: Claude Code runs a hook in Git Bash on Windows, or in PowerShell when Git Bash is not installed ([hooks reference](https://code.claude.com/docs/en/hooks), the `shell` field), and Git Bash's `$HOME` follows `HOME` rather than the profile folder the deployer installs into. Have Python find the script instead, in isolated mode so the session's working directory is not on its import path, as `code-review-reviewer` does; `expanduser` reads the profile folder on Windows and `HOME` elsewhere, the home the deployer installs into on each: `{{PYTHON}} -I -B -c "import os, runpy; runpy.run_path(os.path.expanduser('~/.claude/skills/<skill>/scripts/<script>.py'), run_name='__main__')"`. Validation fails when an agent names `$HOME`. Agents are Claude-only: Codex and Copilot follow the skill's instructions with their own subagents, so a skill that names an agent must say what to use when the agent type is not available, as happens in a Claude Code session started before `~/.claude/agents` existed, since Claude Code watches only the agent folders that existed when the session started.
The manifest records agents. The deployer reads a manifest an older deployer wrote, back to the oldest version it reads, and its next deployment saves it at the current version, which an older deployer refuses rather than rewriting a source entry without its agents; `MANIFEST_VERSION` and `OLDEST_READABLE_VERSION` in `deployer/manifest.py` give the versions. A skill entry's `agent_deps` came after agent ownership, within one manifest version: a deployer that predates it ignores the field and drops it when it rewrites the entry, which loses only the agents a preserved skill would keep, never an owned item.
In a plugin, `tools/plugin_build.py` carries the agent without its `hooks`, which Claude Code ignores for a plugin agent, and writes them into the plugin's `hooks/hooks.json`, where they run for every matching tool call of every session, not only the agent's. A hook an agent declares must therefore hold to its own agent itself, reading the `agent_type` Claude Code gives a subagent's call, as `review_guard.py` does for `<plugin>:code-review-reviewer`. A hook's command that runs a script as `os.path.expanduser('~/.claude/skills/<path>')` runs it from the plugin's own copy instead, under `CLAUDE_PLUGIN_ROOT`, and the assembler refuses a command that names the home's Claude folder any other way.
## Reference documentation
Every selectable skill has a section in [Skills](skills.md), the reference users read to start it:
1. If the skill takes arguments, declare them as `argument-hint` in its frontmatter, using the notation that page explains. A skill that reads `$ARGUMENTS` without one fails validation.
2. Run `python tools/skill_reference.py --write`. It regenerates the summary table and adds the skill's section, whose first block it fills from the frontmatter and metadata.
3. Below that block, write what each argument means, what the skill does with none, and an example invocation. For a skill without arguments, say what it acts on instead.
4. Add a row for the skill, or its bundle, to the "Included skills" table in the README, linking its section here.
Run `python tools/skill_reference.py` to see what is still missing. Validation fails while the reference is stale, a section has no hand-written part, or the README table leaves a skill out, keeps a row for a removed one, or links a section that does not exist.
## Validation
Before adding the skill to a release:
1. Rendering needs no suite of its own: the deployer's rendering suite, `tests/deployer/test_rendering_locking.py`, deploys every shipped skill into a throwaway home, which renders each template and runs the deployer's checks of the rendered Bash, PowerShell, and fences. A new opt-in skill or bundle joins that deployment's `--include`. A token in a skill's Bash or PowerShell also needs the rendered execution fixture [Template values](#template-values) describes, a `*with_spaces*` test under `tests/deployer/`.
2. If the skill contains executable files, include an executable regression suite under its `scripts/` directory. Name each test entry point `test_*`, `test-*`, `*_test`, `*-test`, or `*.test.*` and use `.py`, `.sh`, or `.ps1`. `tests/run_validation.py` discovers and runs these suites automatically, under `tests/` (outside `tests/fixtures/`, whose trees are other repositories a review reads) and each skill's `scripts/`, by name alone. A skill is `skills/<name>` holding `SKILL.md`, as the deployer reads it, or a repository skill under `.claude/skills/`: a file whose name misses the patterns never runs. The deployer leaves every file those names match out of what it deploys, so a suite runs only from the source tree and never where the skill is deployed, and a module a deployed script imports must not be named like one. It runs a Bash or PowerShell suite as a program, and a Python suite as `python -B -m pytest <suite> --basetemp <folder>`, with a base folder of its own for its temporary folders, from the repository root, under the pytest variables [Validation](../.github/CONTRIBUTING.md#validation) names, where pytest loads the root `conftest.py`; run one the same way, or one test with `python -B -m pytest '<suite>::<Class>::<test>'`. A Bash suite that sets `pipefail` hands `grep -q` or `grep -m` its text in a here-string or a file, never through a pipe: grep exits at its first match, the command writing into the pipe can then die of SIGPIPE, and `pipefail` fails a check whose pattern matched; validation fails on such a pipe. A reader behind `jobs -x`, as `... | jobs -x grep -q x`, is one it does not see, a stated limit no suite here writes. A coprocess in a pipeline is read as a reader of the pipe, so `seq ... | coproc head -1` is reported as a race; no suite here holds a coprocess. The pipe-race policy reads a suite with its own walk, so a suite that turns on `expand_aliases`, or a here-document substitution the grammar refuses, is read rather than refused; no suite here holds either. Write a Python suite as unittest test cases, plain pytest test functions, or both, with no `if __name__ == "__main__":` block: validation fails on a Python suite that defines no test, which runs nothing, and on one that holds that block, which would run the suite a second way, without the root `conftest.py`. A table of independent cases is a `@pytest.mark.parametrize` test function, so each case has its own ID, shard, and failure report. A table whose cases build on what a test case's `setUp` makes, or that checks one built artifact several ways, stays a `subTest` loop, since a parametrize list is fixed when the suite is collected, before `setUp` runs. A test function, and a helper it calls, checks with a plain `assert`, which pytest rewrites to show both sides when it fails, and a unittest test case with its own assertion methods; the lint rule set lets the suites assert and no module a skill deploys, as [Python checks](../.github/CONTRIBUTING.md#python-checks) says. Validation fails on a test module, the root `conftest.py`, or a module under `tests/` that makes a `unittest.TestCase` outside a class to check through. pytest rewrites the asserts of a suite and of `conftest.py`; a helper module the suites import by name, such as `tests/deployer/harness.py`, is named to `pytest.register_assert_rewrite` in the root `conftest.py`. The root `conftest.py`'s autouse fixtures isolate every test's git from the shell that started the run, and every class and module fixture's: each runs with a temporary `HOME` and global configuration holding the fixture identity, an empty hooks folder, and git's automatic maintenance off, so nothing git starts outlives the command that started it, no system configuration or attributes, no prompt or editor, and every other `GIT_*` variable but `GIT_EXEC_PATH` and `GIT_BASH` removed, command-scope settings and a hook's `GIT_DIR` among them. pytest runs unittest's test and class cleanups but never its module cleanups, so the module fixture runs those `unittest.addModuleCleanup` and `unittest.enterModuleContext` register at the module's teardown, after `tearDownModule`, as unittest would. A test class or a suite module adds settings, such as a default branch its fixtures name, as a `git_config` mapping of `section.key` to value, and a test reads its home as `self.git_home` on a test case or through the `git_home` fixture. Validation fails on a `conftest.py` below the root, and on a suite that defines, assigns, or parametrizes the name of one of those fixtures, any of which would take the fixture's place.
3. Python under `scripts/` passes the format, lint, and type checks that [Python checks](../.github/CONTRIBUTING.md#python-checks) in the contributing guide describes, with no file or rule exempt; neither the complexity nor the length ceiling takes a `noqa`, and validation fails on one that names C901 or PLR0915, so split a function that exceeds one into helpers of one concern. A script that imports a sibling's scripts, as `skill_deps` allows, declares `ejryan89-skill-core` too and puts both on `sys.path` before the imports they serve: the fixed line that finds ejryan89-skill-core, then ejryan89-skill-core's lookup for each other sibling:
```python
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "ejryan89-skill-core" / "scripts"))
from skill_roots import sibling_scripts
sys.path.insert(0, str(sibling_scripts("<dependency>")))
```
`sibling_scripts` in ejryan89-skill-core's `skill_roots.py` is the one place that knows where a sibling lives: beside ejryan89-skill-core, in the deployed home and the checkout alike. A sibling that is absent, or whose `scripts` are of another kind or cannot be examined, ends the script as `run_main` ends a failure, with a last line `FAILED MissingSibling: <reason>` naming it, and which of those it is, on stdout and exit code 1, though the lookup runs before `run_main` does. `python tools/new_skill.py <name> --skill-dep <dependency>` records the dependency, with `ejryan89-skill-core`, and prints the lines its scripts start with. A suite under `tests/` and a module under `tools/` reach a sibling the same way, after their own ejryan89-skill-core statement. Define any path constant after those imports: ruff's E402 accepts an import after a `sys.path` change but not after an assignment, so the pattern needs no exemption. Validation fails on a `sys.path` entry that names a sibling's `scripts` by a hand-written path, on a `sibling_scripts` call whose name is not one string literal or is `ejryan89-skill-core`, and on a script that looks up a sibling it does not declare in `skill_deps`. mypy runs on each skill's `scripts/` directory from inside it and resolves a `skill_deps` sibling's modules through `mypy_path` in `pyproject.toml`. When a skill first imports a sibling's scripts, add `$MYPY_CONFIG_FILE_DIR/skills/<dependency>/scripts` there; validation fails until the list matches the `sys.path` changes. PowerShell passes `Invoke-ScriptAnalyzer -Severity Warning,Error`: every `.ps1` under `scripts/` and every `powershell`, `pwsh`, or `ps1` fence in the skill's Markdown, as written with its tokens quoted. No rule is suppressed, by `SuppressMessageAttribute` or a settings file; fix the cause. Validation fails on a `SuppressMessageAttribute`, a ShellCheck `disable` directive, and a `PSScriptAnalyzerSettings.psd1` or `.shellcheckrc` file. A setting outside the repository can turn a checker's findings off too, so each checker starts only from its runner, which `CHECKER_RUNNERS` in `tests/validation/skill_scripts.py` names: ShellCheck from `deployer/render.py`'s `run_shellcheck` or validation's `shellcheck_job`, `bash -n` from `run_bash_syntax_check` or `bash_syntax_job`, and ruff and mypy from `ruff_job` and `mypy_job` in `tests/validation/toolchain.py`, and PSScriptAnalyzer runs only from `SCRIPT_ANALYZER_RUN` with `-Settings @{}`. Validation reads every process start in Python under `deployer/`, `tools/`, `tests/validation/`, `skills/`, and `.claude/skills/`, the repository's `run_tool` and `run_process` included, and fails on one outside a runner that may start a checker, by its program, by `-m`, or in a script it hands a shell with `-c`, and on a runner's isolating settings named outside it. Under `deployer/`, `tools/`, and `tests/validation/`, a command whose program the reader cannot read fails as it does in a skill's scripts, unless the module's `COMMANDS_ALLOWED` says why.
4. Validation also holds these rules across the repository. Each lives in a policy module under `tests/validation/`, with a fixture suite beside it, `tests/validation/test_<module>.py`, that shows a violating input failing and a conforming one passing. A new rule goes in its family's module with its fixture test.
- Keep every directory under `skills/` a skill or a shared asset `source.json` declares. A skill holds `SKILL.md` directly under `skills/<name>`, and no `SKILL.md` sits deeper; the deployer refuses one that does. Anything else is a folder whose files and suites nothing would find. Group skills with a bundle in `source.json`, not a folder.
- Do not copy a definition or a constant between files. Validation fails when a module-level function, class, or `type` statement of four or more lines, docstrings aside and one in a module-level `if`, `try`, or `with` block included, is defined identically in two non-test Python files under `skills/`, `deployer/`, `tools/`, `.claude/skills/`, or `tests/validation/`, and names every copy; two scripts of one skill count, because one can import the other, and so do two policy modules, which share a helper through `tests/validation/validation_support.py`. It fails the same way when two such files assign the same module-level value under any names: a string or bytes literal of twelve or more characters, an integer written in hexadecimal, octal, or binary, such as a Windows process-creation flag or a file mode, compared by value whatever base it is written in (a decimal integer is a count, a limit, an exit code, or a version that modules choose apart and share by chance, so none is compared), a pattern `re.compile` builds from a literal, with the same flags, or a tuple, list, or set of literals that together hold twelve or more characters, compared by its members in any order; `__all__` and the `*_ALLOWED` sanction dictionaries are not compared. Import one copy instead, from ejryan89-skill-core when more than one skill needs it. A copy that must stay, such as a deployer function a deployed skill cannot import, is sanctioned beside the code in every module that holds it, as a module-level `DUPLICATION_ALLOWED = {name: reason}` keyed by that module's own name for the copy, whose reason says why the module cannot import the other copy and names, by repository path, every other file that holds it, which validation checks; nothing sanctions a whole module, so a module more than one part of the repository needs moves to ejryan89-skill-core. Within one such file, validation fails a module-level name that a second assignment, annotated assignment, or `type` statement binds again, at the top or in a module-level `if`, `try`, or `with` block, since the later value silently replaces the first for every caller; keep one binding. Bindings in different branches of one `if`, or in a `try`'s body and its `except` handlers, are alternatives one run picks between and are not refused. Comparing by value cannot see a copy that has since drifted from the one it copied, or a value re-derived from the same rule, so validation also reads the shared facts `tests/validation/duplication.py` lists, each kept in one owner module: git's options that take a value (`GLOBAL_VALUE_OPTIONS` in ejryan89-skill-core's `git_client.py`), the suite-name patterns (`SUITE_NAME_PATTERNS` in its `suite_names.py`), the code-review configuration's default file name (`DEFAULT_CONFIG_NAME` in ejryan89-code-review-core's `review_config.py`), the skill-name length limit (`MAX_NAME` in ejryan89-skill-core's `agent_skills.py`), the Agent Skills name grammar (`NAME_PATTERN` in the same module), the key that makes a skill user-only (`USER_ONLY_KEY` in its `frontmatter.py`, read by `Frontmatter.user_only` or, for another reader's values, `user_only_value`), the codec of a pull request title or body file (`TYPED_ENCODING` in its `typed_text.py`, read by `read_typed`, which drops the byte-order mark a Windows editor may save), the home folder's spellings in an install path (`HOME_SPELLINGS` in `tests/validation/skill_layout.py`), the separator a version's numbers are read between (`SEPARATOR` in ejryan89-skill-core's `versions.py`, whose `find`, `read`, and `latest` read and order versions), the form a path is compared in (`path_key` in its `path_keys.py`), the form a name is compared in within its folder (`name_key` in the same module), and the calls that end a Python program with a code (`EXIT_CALLS` in its `exit_calls.py`, which also says what code an exit call's argument gives). It fails a restatement of one outside its owner and names its line: a tuple, list, or set literal holding three or more of git's value options, or of the exit calls by their dotted names or the last part of them, a string literal holding a suite-name pattern, such as a `test_*.py` glob, the default file name as a literal in a module that imports `review_config`, the name limit as a number in a module that imports `agent_skills` or as "at most" the number in any text, a string literal naming the range `a-z` that compiles to a regular expression judging every name in `NAME_GRAMMAR_PROBES` as `NAME_PATTERN` does, however it treats consecutive hyphens (a grammar built from several pieces, by concatenation or placeholders, is not read), the user-only key's literal passed to a call or the key compared with true or false, by an operator or a `match` statement's case, a `read_text` or `open` with a codec of its own on a path whose expression names a title or a body, a home spelling as a regular expression escapes it, `int` applied to each part of a text split on the version separator, and a path case-folded through `os.path.normcase`, named through the module's imports, other than a path's `.name`, or a path made absolute, normalized, or resolved, then case-folded through `str.casefold` or `str.lower`, and a name tested against `.git`, the literal, a module-level name bound once to it, or a module-level class's attribute bound once to it, other than through `name_key`, which asks the folder's file system: by `==` or `!=`, by membership in a list, tuple, or set literal that holds it or in `frozenset`, `set`, `tuple`, or `list` called on one, as `.git` tested for membership in anything, by `str.startswith` or `str.endswith`, or by a `match` statement on anything but `name_key`'s result with a case whose pattern holds `.git` as a value, such as `case ".git" | ".hg":`, though a comparison or membership test joined by `and` to a `name_key` comparison with `.git`, which only spares the folder a question, is not refused (a `startswith` or `endswith` call, and a case whose guard asks `name_key`, are refused even there), and membership in a collection held under a module-level name, such as a walk's skip list, is not read; a docstring is prose about a fact, not a copy of it. Where a fact is a behavior, such as the user-only reading or the byte-order-marked read, the owner is a function, and validation refuses a reimplementation of it. A fix to a fact held in two places moves it to one owner and registers it here, with a fixture that shows a diverging copy failing and an import passing, so the next fix cannot reach only one copy. Import the fact, or call what the owner offers, such as `is_suite_name`; a restatement that must stay is sanctioned in its module with a `DUPLICATION_ALLOWED` entry under the fact's name whose reason names the owner by its repository path. Validation also fails when an owner no longer holds its fact as a literal or a function, so a move cannot quietly end the check. An entry whose definition or value is no longer copied or restated fails, so the list cannot go stale.
- Shared code lives in the hidden `ejryan89-skill-core` skill, and everything in the repository imports it from `skills/ejryan89-skill-core/scripts`: skill scripts through `skill_deps`, the deployer through the one `sys.path` statement in `deployer/__init__.py`, which locates the directory from its own file, never through the configured source path, and each `tools/` module through the same statement written above its ejryan89-skill-core imports, because ruff sorts them above the deployer's. Code that a skill and the deployer or `tools/` both need moves there instead of being copied. Validation fails on a module under `deployer/`, `tools/`, or `skills/` outside ejryan89-skill-core that has an ejryan89-skill-core module's name, on a deployer or `tools/` import of an ejryan89-skill-core module with no such statement before it, on an ejryan89-skill-core module that imports from the deployer or `tools/`, on a deployer or ejryan89-skill-core module that imports anything but the standard library, the deployer, and ejryan89-skill-core, and on any other shipped skill script that imports anything but the standard library, ejryan89-skill-core, its own skill's scripts, and those of the skills its `skill_deps` reach, reading an import by `importlib.import_module` or `__import__` as a statement and refusing one whose name is not a string literal.
- Test whether a path lies in a tree only through ejryan89-skill-core's `path_containment.py`: `refusal` for an entry taken from input, which it judges as written (no NUL character, no empty or `..` segment, no segment Windows opens as a device or reads without its trailing dots and spaces, and no absolute, drive, rooted, network-share, or device form), then as resolved, then through `link_probe` for a link on its path, naming why; `within` to compare a path with its tree once the caller has made both absolute or resolved, with `strict` when the tree itself is not inside, each without Windows' extended-length or device-namespace prefix; `relative_within` for where such a path lies in its tree, taken from the same forms; `may_lie_in` for a check where inside means refuse, which folds and composes every name as a directory that folds case would, then case-folds it by Unicode's full case folding, asking none, so a spelling that differs from the tree's by case, as NTFS's letter table or Unicode's case folding maps it, or by composition lies in it; and `posix_within` for a `/`-separated repository path a listing gives. Validation, in `tests/validation/duplication.py`, reads the modules the code's universal claims are read in and fails on an `is_relative_to`; a `commonpath` or `commonprefix` of `os.path`, `ntpath`, `posixpath`, or `genericpath`; a path looked for among another's `parents`, or among the folders a `folders_up` call gives, ejryan89-skill-core's walk up a folder's parents, by `in` or `not in`, `isdisjoint`, `issubset`, `issuperset`, `intersection`, `count`, `index`, or `__contains__`, or `&`, or compared with another path by `==` or `!=`, or by a `same_path` or `samefile` call, as the name a loop or a comprehension takes from them, as `any(parent == folder for parent in path.parents)`, or as a name a `while`, `for`, or `async for` loop climbs them with by rebinding it to its own `.parent`, by `=`, an annotated assignment, or `:=`, as `while current != folder: current = current.parent` or `while (current := current.parent) != folder`, each read through the calls that give a path back in another form: `str`, `os.fspath`, `path_key`, a one-argument `same_path`, a path module's `abspath`, `normpath`, `normcase`, or `realpath`, `resolved_path`, `strictly_resolved_path`, a path class, or a path's own `resolve`, `absolute`, `as_posix`, or `expanduser`; a text built to end in a separator, whether by `+`, an f-string, `%` whose last field is `%s` or a named `%(key)s` a literal dictionary or `dict` call fills, `str.format` whose last field, by position, index, or keyword, takes it, a string's `join` or a path module's `join` whose last item ends in one or, after another item, is empty, or in a glob is wildcards alone, as `os.path.join(top, "*")` or `"/".join([top, "**"])`, held in a name the module binds, extends with `+=`, or assigns with `:=`, an attribute it assigns, a parameter's default, what a function of the module returns, an either-or of `if`-`else`, `and`, or `or`, or an item of a tuple of prefixes, given directly, made into a collection by `tuple`, `list`, `set`, `frozenset`, or `sorted`, or taken by a loop or a comprehension, when a `startswith`, `find`, or `index` takes it, a regular expression's pattern to `re.match`, `re.fullmatch`, `re.search`, or `re.compile` holds it, a glob's pattern to `fnmatch` or a path's `match` or `full_match` holds it followed by `*`, or a comparison reads what a `removeprefix` of it leaves or a leading slice of a text as long as another; a check for a separator at or after the length of a prefix; a `relpath`, or a `relative_to` given `walk_up`, whose result is compared with, starts with, or holds `..` or `os.pardir`; a `relative_to` inside a `try` whose handler catches its `ValueError`, `Exception`, or everything, or inside a `with contextlib.suppress` of one, named directly, in a tuple, unpacked by `*`, or through a name the module binds, which turns the error into an answer; or a comparison of a path's leading `parts` outside that module, since separate copies of the test drift and a fix reaches only one. Not read: a literal prefix alone, such as `"refs/heads/"`, which names a kind of name rather than a tree; a prefix with no separator, as in `name.startswith(folder)` or `name[:len(folder)] == folder`, which compares text, not folders, like any other prefix test; a `relative_to` inside a function or a lambda the `try` defines, which runs outside its handler; a function reached by its name as a string, as in `getattr(os.path, "commonpath")`; `os.path.dirname(path) == folder`, which asks whether a path is a direct child rather than whether it lies in a tree; an `rfind`, `partition`, or `split` on a prefix; a prefix a lambda returns; an item of a list changed in place, as `words[0] += "/"`; text after the separator, as `folder + "/x"`; a `str.format` field with a conversion, an attribute or an item, or a position or keyword an unpacking gives; a named `%` field with a width or a flag, as `"%(top)s%(sep)1s"`; a mapping built by `dict` from pairs, or by `locals()` or `vars()`, or one in a class attribute read through `self`; a named field's entry followed by a `**` unpacking that may replace it, as `{"sep": os.sep, **fields}`; a glob built by path division, as `str(Path(top) / "**")`; a parent unpacked from what a loop takes, as `for index, parent in enumerate(path.parents)`, or compared inside a lambda, as `filter(lambda parent: parent == folder, path.parents)`; a name spelled as the walked path but rebound after its parents were taken; a parent given to any other call before it is compared, such as a function the module defines; a folder taken from any other walk up a path's parents, such as `TreeReader.climb`; a path's parents or a walk's folders held under a name before `in`, `&`, or a set or sequence method searches it, as `ups = list(folders_up(path)); root in ups`; a climb by `os.path.dirname`, by a name rebound to another name's `.parent`, by tuple unpacking, as `current, depth = current.parent, depth + 1`, or by a conditional expression, as `current = current.parent if more else current`; a path form passed through a text method before it is compared, as `str(parent).lower() == key`; a glob built by `joinpath`; a glob join whose wildcards a further item follows, as `os.path.join(top, "*", "x.py")`, or whose last item is a wildcard other than `*`, as `os.path.join(top, "?")`; and a path's `match` through a name, an attribute, or a function's name that the module also binds, anywhere, to a compiled regular expression, as `self.root.match(...)` when another class's `root` is one. A `%` or `str.format` template built from static pieces is read whole, its last field read before a glob's trailing wildcards, and a last piece of `*` alone after the separator is read as a glob's wildcard. A `match` of the `re` module or of a regular expression the module compiles matches a text, not a path, and is not read as a path's glob. A path compared with each of its own parents searches nothing, since a path is never among them, and so does a walk's start compared with each folder `folders_up` gives, which gives that start first, and a climbing name compared with an expression of itself, as `current.parent == current` spots the file system's root, asks nothing of another folder; and a name rebound to its own `.parent` in a function or a lambda a loop defines does not climb with the loop. A test that must stay is sanctioned beside the code as a module-level `CONTAINMENT_ALLOWED = {scope: reason}`, keyed by the function's or class's qualified name or a module-level assignment's target; an entry that sanctions nothing fails.
- Read a path in `dotnet-format`'s and `dotnet-dependencies`' scripts only through ejryan89-skill-core's `tree_reader.py`, a reader bound to the tree the skill examines, which judges each path by its text and its links before it stats, opens, reads, lists, or searches it. `audit-skill` reads the skill folder it audits through a reader bound to that folder, the places outside it stated in `TREE_READ_ALLOWED`, `review-document` reads the document it reviews, the checkout around it, and the working directory `resolve` searches through readers bound to them, `audit-ai-config` reads the repository it audits through a reader bound to it, `curate-agent-memory` the memory store and the repository through a reader bound to each, and `review-insights` a guidance file's working-tree copy through a reader bound to the configured checkout, the places outside them stated there too. The tree read policy in `tests/validation/fsops_platform.py`, beside the write policy, reads each script of the skills its `TREE_READ_SKILLS` names other than their suites, through the module's imports, and refuses a direct stat, listing, walk, glob, open, or read: the `os`, `os.path`, and `glob` functions and the plain opens `call_tables.py` lists, a path method that reads, on any receiver but an imported module, `Path(__file__)`, and `self` or `cls` naming a method its class defines, those taking no argument only when given none, and each function that reads a path, of ejryan89-skill-core or of a sibling skill's scripts that a policed module loads through `sibling_scripts`, such as ejryan89-code-review-core's `review_io.read_json`, which the policy derives from those modules' own reads, transitively (`core_reads`). A function that reads only to judge a path against its tree, such as `folder_walk.followed_inside` or `path_containment.within`, is listed in the policy's `TREE_JUDGES`, and one that reads only another place, such as the program search path or the temporary directory, in its `OTHER_PLACE_READS`, each with its reason; neither counts or carries. A read that must stay, of a file the skill itself wrote under the temporary directory or of the folder a user names before any tree is bound, states why in a module-level `TREE_READ_ALLOWED = {scope: reason}`. A sanctioned function, class, or method that another scope calls or passes as a value names each such caller, as `{scope: (reason, (caller, ...))}`, a caller in another module of the scripts folder written `<module>:<scope>`: validation refuses a call it reads from a scope the entry does not name and a named caller that no longer calls it, and refuses `<module>` as an entry or a caller, since it names no one statement. It reads a call of a function or class by name, of a method called on `self` or `cls` within its class, and of either passed as a value by name; a sanctioned method reached through an instance or passed as a bound value, as `pairs.read(path)`, names no class, so its callers are not read, a stated limit the policy's comment lists with the others. The reader's one stated look beyond the tree: deciding whether a path lies in the tree asks `path_keys` how the tree's own folders and the folders above them compare names, which lists each of those folders, the tree's parent included, and looks up one entry and its case-swapped name, from their own metadata without following either, so a sibling of the tree may be looked up but is never followed, listed, or read; every `within` call does this, before the reader as after it.
- Keep relative Markdown links working. Every relative link in a `.md` file Git does not ignore, outside `.claude/worktrees/`, must resolve to a file or folder, and a `#fragment` to a heading of its target by GitHub's rule: lower-case, backticks and punctuation other than hyphens and underscores removed, each space turned into a hyphen, and a repeated heading numbered `-1`, `-2`. Links inside code, and links with a scheme such as `https:`, are not checked.
- Cite only tests that exist. In a `.md` file Git does not ignore, outside `tests/fixtures/`, `.claude/worktrees/`, and `docs/upgrade-notes.md`, each code span that is a test ID, `<file>::<test>`, `<file>::<class>`, or `<file>::<class>::<test>`, must name a test function or test class that Python file defines, and one that is a test or test class named alone, `test_*` or a class name ending in `Test` or `Tests` or starting with `Test`, must be defined in a Python file its sentence names, or anywhere when the sentence names none. A test is a function or method named `test...` and a test class one with such a method, its own or a base's in the same file, so a cited helper fails. A file named without its folder is any Python file of that name, except in the code-review contract's threat model, whose suites are under `skills/ejryan89-code-review-core/scripts/`. A code span inside an indented code block is read as a citation, so write an example citation in a fenced block.
- Import every module in a test. Each non-test Python module under a shipped or repository skill's `scripts/`, `deployer/`, or `tools/`, other than an `__init__.py`, must be imported by at least one `test_*.py`: by an `import` statement, or through `importlib`, by `import_module` or by `spec_from_file_location` from its path. Mentioning it, running it as a program, or naming a `test_<module>.py` after it does not count.
- Hold repository skills to the shipped standard. A repository skill under `.claude/skills/`, which loads into every session here as a shipped skill does, passes the same policies, applied to that tree by the same functions. Its `scripts/`, if it has one, is found, laid out, formatted, linted, and type-checked as a shipped skill's is, and its suites run with the rest. Its folder, and its shim's, is named by the rules in "Files", and the frontmatter `name` of each is that folder's name. Its Markdown is held to these rules: no fence of more than five lines, no output path left to the agent ("Working files"), scoped twin shell grants ("Granting tools") that cover each repository tool or test it runs, such as `python -B tools/runtime_canary.py`, and a description a runtime adapter accepts that says when to use it ("Description"). Its `.agents/skills` shim is what `python tools/skill_shims.py --write` writes from it: a `SKILL.md` with the same frontmatter and lines pointing at the skill, saying that its commands and paths resolve from the repository root rather than its folder, and that a write under `.agents` needs an approval under Codex's sandbox, which keeps `.agents` read-only, and, for a skill with `disable-model-invocation: true`, the `agents/openai.yaml` that a user-only skill's runtime adapter carries, so Codex never starts it implicitly. Each file is compared whole, and any other file in a shim folder, a folder with no `SKILL.md`, and any other entry under `.agents/skills` fails. A change to one runs `audit-skill` on it before the pull request, as a shipped skill's does.
- Give every description the model reads a trigger scenario. A shipped skill that does not set `disable-model-invocation: true` has a trigger scenario under `tests/fixtures/skill-evals/<name>/`, by convention its `description` scenario, in the shape [Skill evaluations](skill-evaluations.md) describes, holding at least three requests, a neighbour's near miss, and a near miss no skill serves. Validation, in `trigger_scenario_problems` in `tests/validation/skill_layout.py`, fails on a skill the model may start without one, and on a trigger scenario whose skill is not its folder's, does not exist under `skills/`, or is user-only, or that holds fewer requests, no neighbour's near miss, or no unserved one; it reads `scenario.json` itself, since no policy may import or start the evaluation, and `tests/tools/test_skill_evals.py` loads each committed trigger scenario as a run does and judges it with a stub record. It holds only that the scenario is there and well formed: whether the description starts the skill is judged by the `evaluate-skill` repository skill, which calls models, and which the `change-skill` procedure owes before the pull request whenever a description is new or changed. A repository skill has none, since `--canary-home` deploys no repository skill for a session to start.
- Hold the code's universal claims. Validation, in `tests/validation/python_checks.py`, reads each non-test Python module under `skills/`, `deployer/`, `tools/`, `.claude/skills/`, and `tests/validation/`, and `deploy.py`, `tests/run_validation.py`, and the root `conftest.py`, resolving names through its imports. It fails on a process start, any call `PROCESS_STARTS` in `tests/validation/call_tables.py` names, such as `subprocess.run`, an `asyncio` `create_subprocess_exec`, an event loop's `subprocess_exec`, `os.execve`, `os.posix_spawn`, or `os.system`, outside ejryan89-skill-core's `bounded_process.py`, whose runners clear the variables themselves, when the environment it is given, by `env=` or at the position the call takes it, or inherits, for a call that takes none, is neither a `without_repository_variables` call nor a name its function binds only to one and changes in place, by an `update`, a `setdefault`, a subscript assignment, or `|=`, only with constant keys that name none of git's repository-selecting variables, and is otherwise only read, copied, or emptied of keys, wherever in the module the name is read, a closure or another function included; a name whose mapping is handed to another name, a call, or a container, or reached through a stored or unbound method, such as `dict.update(env, ...)` or `env.__setitem__`, is not one, and a reach through `globals()` or `vars()` is not read, since every process the repository starts runs without git's repository-selecting variables; start it through `bounded_process` instead where it can. It fails on a link test outside ejryan89-skill-core's `link_probe.py`, the one test, which reads a symbolic link and a Windows junction alike: an `is_symlink`, `islink`, `is_junction`, or `isjunction`, or a read of `st_file_attributes`, by name, through a lookup of a constant name in any form of the one catalogue `attribute_lookups` in `tests/validation/validation_support.py` reads, or through a `hasattr` of one. A call of `deployer/platform_support.py`'s `is_junction`, which delegates to it, is none. It fails on an `add_argument` call, on any receiver, that gives an option the literal `default=""` or `const=""`, however quoted or joined, an f-string that fills in nothing included, since an empty value, as a caller whose variable is unset passes, then reads as the option left out or given bare, as `--canary-home ""` once deployed into the real home: default to `None` and test it with `is not None`, give a bare form a value no command line can type, or state why in a module-level `OPTION_DEFAULT_ALLOWED = {option: reason}` keyed by the call's first name as written; a call whose first name is no string literal cannot be sanctioned. It does not read a default given through a name or a call, by `set_defaults`, or to every option at once by `ArgumentParser(argument_default="")`, a blank one such as `" "`, or a `None` default read by truthiness; an `add_argument` reached through an alias, as `add = parser.add_argument`, or given its arguments by a `*` or `**` unpacking is no gap, since `policed_call_problems` refuses both. It fails on a path's resolve, in a module under `skills/`, `.claude/skills/`, `deployer/`, or `tools/`, outside ejryan89-skill-core's `path_containment.py`, whose `resolved_path` follows a path's links and `..` parts and `strictly_resolved_path` does so strictly, since Python 3.12's `Path.resolve` raises `RuntimeError` on a symbolic link loop, strict or not, past every handler of `OSError`, where `resolved_path` leaves the loop to the caller's own refusal and `strictly_resolved_path` raises `OSError` on every version: a method named `resolve` on any receiver, and pathlib's `Path.resolve` named, called or not, a resolve named to be called through a name, as `r = path.resolve`, included, except on a receiver built from `__file__`, on `self` or `cls`, and on a name an import binds to a module, such as `source_ref` whose own `resolve` function it calls: a name `import x` or `from . import x` binds, or one `from package import x` binds where the repository holds that module. A name any other from-import binds, as `from cfg import ROOT` does, may be a path, so its resolve is refused, and so is a listing that holds no module the policy reads. It leaves out, as stated limits, a resolve looked up by name, as `getattr(path, "resolve")` or `operator.methodcaller("resolve")`, and a receiver that merely contains `__file__`, as `(Path(__file__).parent / name).resolve()` or `Path(os.environ.get("X", __file__)).resolve()`, which it reads as the script's own file. It fails on a presence read whose failure is read as nothing there, outside ejryan89-skill-core's `file_presence.py` and `link_probe.py`, since from Python 3.14 each presence predicate returns False for a path it cannot stat, and from 3.15 `Path.glob` matches nothing in a folder it cannot list. A predicate's False reaches an answer by more spellings than any list holds, so the policy pins the one form it accepts and refuses every presence predicate however its answer is used, as the link-test policy refuses each link test: a method named `exists`, `is_file`, `is_dir`, `is_mount`, `is_socket`, `is_fifo`, `is_block_device`, or `is_char_device`, on any receiver, or `exists`, `lexists`, `isfile`, `isdir`, or `ismount` of `os.path`, `posixpath`, `ntpath`, or `genericpath`, or `os.access`, read through the module's imports, called, named uncalled, as `map(os.path.exists, paths)` or `check = Path.exists` hands one on, or looked up by a constant name, as `getattr(path, "exists")` or `operator.methodcaller("exists")(path)` is. `file_presence`'s `is_present` and `is_directory` given `other_is_absent` as anything but a false constant, or given a `**` that may hold it, read something of another kind as nothing there, which a reader that passes over other kinds asks for, but a refusal on their False names that kind as missing. So the policy follows such a test's answer to each refusal it reaches: through `not`, `and`, `or`, a conditional expression, a comparison with `True`, `False`, `None`, zero, or an empty container, as `len(missing) > 0` or `missing != []` is, `len` or `bool` of it, a comparison of two answers as either answer, a generator, list, set, or dictionary comprehension, a `filter` or `itertools.filterfalse` of a lambda, `any`, `all`, or `next` of one, a `list`, `tuple`, `set`, `frozenset`, `sorted`, `reversed`, or `iter` of one, and every name its scope binds to any of them, where a name its scope also binds to an empty value is, when true, true under the tests that guard its other bindings, as `missing = p` before a `break` in `if not P:` is. A reading that finds no path, as a search that found none, or more than one, refuses, names no path as missing, so it passes. A refusal is a branch that raises an error of its own, or that returns or yields a message of more than one word, the yield anywhere in a simple statement's expressions, or records one, as a call's argument, the call a statement of its own, awaited, or, unless it builds a value, assigned or returned as it is, by an augmented assignment, or by a store into an attribute or into an item keyed by anything but a string literal, as `return f"{p} is missing"`, `yield f"{p} is missing"`, `sent = yield f"{p} is missing"`, `print((yield f"{p} is missing"))`, `problems.append(...)`, `await report(...)`, `done = await report(...)`, `return await report(...)`, `done = report(...)`, `total += await report(...)`, `problems.extend([...])`, `problems += [...]`, `problems[p] = "..."`, or `print(...)` does; a call builds a value when it is a built-in other than `print`, a `str` method or a path's, as `os.path.join` or `", ".join` is, or a class, by a capitalized name, as `Path("Program Files")` is, the message given as the value itself, an arm of a conditional expression, a value of an `and` or an `or`, a method called on it, as `f"{p} is missing".strip()`, a string literal's `join` of messages, as `", ".join(f"{x} is missing" for x in paths)`, or an element, a starred element, a dictionary's key or value, a comprehension's element, key, or value, or what a subscript takes from one, at any depth, as `problems.extend(f"{x} is missing" for x in paths)` gives one; taken by an `if`, its `else`, a conditional expression, a comprehension's filter, or a `match`'s case that leaves one truth of its subject, or of an item of a tuple or list it matches, at any depth, as `match ((P, q), r):` holds one, or that a name its scope binds once to one spells, as `pair = (P, q)` before `match pair:`, once the truths its pattern may match lose those earlier unguarded cases took: `case True:` or `case 1:`, which the true answer matches as `True == 1` does, `case False:`, `case None:`, `case 0:` or `case -0:`, `case bool(False):` or `case int(0):`, `bool` and `int` read through the module's imports, `builtins.bool` included, an `|` of them, captured by `as` or not, or, for a tuple's item, a sequence pattern's item at the same place, counted from the front before a star and from the back after it, as `case (False, _):` or `case (False, *_):` of `match (P, q):`, and a `case _:` or `case bool():` after a case that took the other truth, where `case "":`, which no answer equals, matches neither, a guard read as an `and` and so as a test of its own; an `assert` given a message, read as a refusal's message is, so `assert P, p` gives none; a `while` whose body, or whose `else`, refuses, as `while not P: raise ...`; and an `if` with no `else` whose branch leaves, or a `match` whose every case leaves, and whose False goes on, through the rest of its block and any loop or block around it, to such a raise or returned message, returning no other value but under an `if` or in a loop of its own, as a lookup that tries each place in turn before it refuses does. A refusal whose test also needs `file_presence.is_occupied` or `is_there` to find something at the same path names another kind there, never nothing, so it passes; a bare `raise`, which passes on the error being handled, is none. It refuses a path's `glob` or `rglob`, and `glob.glob` or `glob.iglob`, an `os.walk` or `os.fwalk` given no `onerror`, `None`, or an unpacking, a path's `walk` given no `on_error` alike, a `shutil.rmtree` given `ignore_errors` or a `tempfile.TemporaryDirectory` given `ignore_cleanup_errors` other than a false constant, which reads a folder it could not remove as gone, and a walk or a `shutil.rmtree` whose `onerror`, `on_error`, or `onexc` is a lambda that calls nothing, a log named uncalled, as `print` or `logger.warning`, or a function of the module, by its name or as a method, that only logs or passes. It refuses an `except` clause around a stat, a listing, or a read, a path's `stat`, `lstat`, `iterdir`, `scandir`, `listdir`, `glob`, `rglob`, `read_text`, `read_bytes`, or `open`, `open`, `io.open`, `os.open`, `os.stat`, `os.lstat`, `os.scandir`, `os.listdir`, `os.walk`, `os.fwalk`, `os.path.getsize`, `os.path.getmtime`, `os.path.getatime`, or `os.path.getctime`, a presence predicate, or `file_presence`'s `is_present`, `is_directory`, `is_there`, `is_occupied`, or `matching`, when the clause takes `OSError`, `IOError`, `EnvironmentError`, `PermissionError`, `Exception`, `BaseException`, or `os.error`, alone, in a tuple, or in a tuple a name the module binds only to it holds, or is bare, and answers nothing: it returns nothing, `None`, `False`, zero, an empty string, an empty container, or a name whose last binding before the `try` is one, after statements that only log, a `print`, a `logging` or logger call, `warnings.warn` however the module imports it, a write to `sys.stderr` or `sys.stdout`, or `pass`, or bind names local to its function, by an assignment, an augmented assignment, or a tuple or list target, to a value that calls nothing, or it `continue`s or `break`s after statements that only log or bind such names that its function never reads, as `failed = True` does when nothing reads `failed`, only passes or logs where the `try` returns a value and goes on to an empty return or its function's end, or binds an empty value to a name its function returns; and a `contextlib.suppress` of one of them around such a call, in its body or in an item the `with` enters after it, as `with suppress(OSError), open(path) as handle:` does, or one an `ExitStack`'s `enter_context` enters or its `push` pushes, called on the stack, on a name bound to it, as `s = stack` before `s.enter_context(...)`, or unbound on the class with the stack first, as `ExitStack.enter_context(stack, ...)`, around the rest of the `with` that holds the stack, by its target or as its item, and the whole body of each loop around the call, which the loop's next pass runs; a suppress is read where it is called, its errors given starred included, as `suppress(*ERRORS)`, in either arm of a conditional expression, or through a name any binding of which may give one, an item of a literal tuple or list unpacked, as `quiet, other = suppress(OSError), None`, and a parameter's default, as `def f(p, quiet=suppress(OSError))`, included, in the innermost of its scope and the functions around it that binds the name, where an import binds one of another module, or at the module's level where none does, a function that declares it `global` included, as `quiet = suppress(OSError)` before `with quiet:`. `file_presence`'s `is_present`, `is_directory`, `is_there`, and `is_occupied` let a failed stat through: the first three answer whether something a reader meets is there, a link to nothing read as nothing, and `is_occupied` whether anything takes the place itself, a link to nothing included, without following a link, which a writer asks before it creates there and a reader asks where its question is whether the place is taken, as MSBuild's `File.Exists` lookups are, `Exists()`, its search for a file above a project, and an `Import`, `matching` lists what a glob pattern matches among the names a folder's listing gives, so a Windows 8.3 short alias matches no name, and a class that can spell a device name matches only listed names, never a device Windows opens, but raises for a folder it cannot list, and `refusal_reason` and `require` name why a file or folder a caller needs is not there: missing, of another kind, or not examinable, with the operating system's reason. It leaves out, as stated limits no reading of a module's syntax tree settles: a predicate looked up by a name computed at run time, as `getattr(path, name)`; a test's answer held in an attribute or another scope, as a collection one function keeps by it and its caller refuses on, or returned by a function the refusal calls; a message built in a name before the branch that records it, and a message of one word, which reads as a value; a message nested in another call's arguments, which reads as that call's value, and one stored under a key spelled as a string literal, which reads as a field's, as `cfg["title"] = "Untitled document"` does; an error callback that calls anything, which may raise; a handler's exceptions named through a name the module does not bind to one literal tuple; a returned name bound to an empty value inside the `try`; a suppress held in an attribute, returned by a function, imported from another module, as a function's own `from module import QUIET` binds one, bound through `nonlocal`, or unpacked from anything but a literal tuple or list of the same length, one entered on an `ExitStack` a `with` in another scope holds, one given to `enter_context` or `push` by keyword, and a stat after the statement that enters it in a loop's `else` or in a `try`'s handler or `finally`; a message given to a call that builds a value, assigned or returned, which reads as that value, a method of any receiver whose name is a built-in's, a `str` method's, or a path's among them, as `parser.exit(2, msg)` or `sys.exit(msg)`, and the built-ins that record, `exit`, `quit`, and `input`, assigned or returned; a yield in an `assert` or in a compound statement's test, as `if (yield msg):` or `assert (yield msg)`; a `case None:`, read as taking every false answer, as it takes a search that found nothing, though it never matches a `False`; and a `match` on a tuple holding a starred item, on a name bound to a tuple more than once or at the module's top level, or a case whose pattern is an `|` of sequence patterns, which reads no item's truth. The link tests, `is_symlink`, `islink`, `is_junction`, and `isjunction`, are no presence predicates here: the link-test policy above refuses each one outside `link_probe.py` however its answer is used, and `link_probe` lets a failed stat through. And it fails on a call of a foreign function, through a library the module loads with `ctypes.WinDLL`, `ctypes.CDLL`, `ctypes.OleDLL`, or `ctypes.PyDLL`, or the `LoadLibrary` or an attribute of `ctypes.windll`, `ctypes.cdll`, `ctypes.oledll`, or `ctypes.pydll`, or reaches as `ctypes.pythonapi`, and holds in a name, an attribute such as `self.kernel32`, or a subscript, called as an attribute of it, through a `getattr` of a constant name, or through a name bound to either, whose `argtypes` and `restype` the module does not both assign on that library's function, by an assignment, an annotated assignment, or a `setattr` of a constant name, so a declaration on `user32.CloseHandle` is none for `kernel32.CloseHandle`, since ctypes passes an undeclared function's arguments and result as C ints and so cuts a pointer-sized handle short; a function every call gives no arguments needs no `argtypes`. It also fails on an expression statement that discards the result of a process runner whose caller must judge its exit status: ejryan89-skill-core's `run_bounded`, `deployer/platform_support.py`'s `run_tool`, or `GitClient.run`, on a `GitClient` the module constructs or binds by assignment or annotation, by name or in quotes; `GitClient.output` and the `GitHubClient` methods raise on a failure, so they are not runners here. It fails on a use of `json.loads`, `json.load`, or `json.JSONDecoder`, by name or through a lookup of a constant name in any form `attribute_lookups` reads, outside ejryan89-skill-core's `json_reader.py`, the one parse of JSON, which refuses an object that repeats a key, a bare `NaN`, `Infinity`, or `-Infinity`, an integer of more digits than `whole_number`'s `DIGIT_LIMIT`, nesting past `nesting_depth`'s `DEPTH_LIMIT`, and a lone surrogate unless its caller asks to keep one, as a record whose writer a `JSON_WRITE_ALLOWED` entry sanctions does, where the `json` module keeps a repeated key's last value and reads `NaN` as a float. It fails on a use of `json.dump`, by name, through a name any binding of which may give it, or through a `getattr` of a constant name, and on a write call, a `write`, `write_text`, `write_bytes`, or `writelines`, or a `replace_text`, `replace_bytes`, `create_bytes`, `atomic_write_text`, `atomic_write_bytes`, `write_atomic`, or `append_line`, or a `print` given a `file=`, called directly or through a name any binding of which may give one, that takes JSON text, a `json.dumps` reached so or the `encode` or `iterencode` of a `JSONEncoder` or of a subclass of one at any depth, which any module the policy reads may define, reached through an import, a re-export, or a package's `__init__.py`, as an argument or through a name its function binds or adds it to, by an assignment, an annotated or augmented assignment, an assignment expression, a tuple, list, or starred target, a `for` or a comprehension target, or a `with` target, outside ejryan89-skill-core's `json_writer.py`, the one writer of JSON, which refuses a non-finite number, a lone surrogate, and what `json_reader.py` would refuse on reading the text back, where the `json` module writes `NaN` and a lone surrogate a later strict read refuses. It fails on an `add_argument`, called as an attribute, through a name any binding of which may give one, or through a `getattr` of a constant name, whose `type` is `float` or `int` and whose option string, `dest`, or `metavar` names a time by one of the words `TIME_WORDS` in `tests/validation/python_checks.py` lists, such as `--timeout`, `--wait`, `--delay`, `--interval`, `--time-limit`, or `SECONDS`, since `float` accepts `nan`, `inf`, zero, and a negative number and `int` zero and a negative number, none of them a limit; a bare `limit` or `min` names a count or a minimum as often as a time and a `day`, `week`, or `month` a calendar span, so none of them is read as one; such an option takes ejryan89-skill-core's `seconds_option.positive_seconds` as its type, which refuses them with a usage error. It fails on a one-argument `int()` or `float()` outside ejryan89-skill-core's `whole_number.py`, the one reader of a whole number from text, or a `map(int, ...)` or `map(float, ...)`, that converts a regular-expression group, a stripped one and an item of a `findall` result included, reached by an index, through a name bound to the list, by a loop or a comprehension over it, or by an index into one of its tuples, though not one a call such as `next()` returns, or a value an `isdigit()`, `isdecimal()`, or `isnumeric()` test or a regular-expression `match`, `fullmatch`, or `search` admitted, `re`'s functions read through the module's imports, a bare import, an alias, a name bound to one, and a lookup of a constant name in any form `attribute_lookups` reads included, and each name by the scope that binds it, wherever in the module it is read, a module-level name a function reads and one a later top-level statement reads included, which bounds no length, since `int()` reads a sign, spaces, underscores, and every Unicode digit, `isdigit()` passes a digit such as `²` that `int()` refuses, and past the interpreter's digit limit `int()` raises a `ValueError` that names no input, while `float()` reads the same, `nan` and `inf` among them, and gives an infinity past a float's range; `whole_number.read` takes ASCII digits alone, up to the `DIGIT_LIMIT` `json_reader` also holds, and raises its caller's own error. It also fails on an `add_argument` whose `type` is `int` or `float`, by name, through an alias, a `getattr` of a constant name, or a `functools.partial` of one, and on an `int()` or `float()` of its own parameter's text, the parameter itself, a method call on it such as `value.replace(",", "")`, an attribute or an index of it, or a local name bound to one of these, in a function or a lambda the module gives an `add_argument` as its `type`, since `int` and `float` read a sign, spaces, underscores, and every Unicode digit, and `float` reads `nan` and `inf` too; such an option takes ejryan89-skill-core's `whole_number.argument(minimum, maximum)`, which reads through `whole_number.read` within its bounds, taking a `-` only where its minimum is below zero, and refuses anything else with a usage error naming the value, or `seconds_option.positive_seconds` for a time. A type built by a call, such as a factory's inner function, and one another module defines are read only by what they resolve to. It fails on a handler, an `except` clause or a `contextlib.suppress`, around a call of a reader that an ejryan89-skill-core module names in its `CONTENT_READERS`, or the policy's `core_reader_families` names for a module of ejryan89-skill-core or ejryan89-code-review-core, made directly, through a name or a lambda the module's top level binds to it, or through a repository function, each read where the module's top level binds it, under an `if`, a `try`, a `with`, or a loop there included, a lambda, or a method of a class in the module, on any receiver, that lets the reader's errors escape, when the handler catches part of the family that module's `CONTENT_ERRORS` names, or of the class or tuple of classes `core_reader_families` names for the reader, as it names `PersistenceError` for `review_io`'s `read_json`, or the call's `OSError`, but not the rest, since the member left out escapes where the caller promised a refusal of its own, when the handler names `RecursionError` around such a call though nothing it calls recurses, neither a standard-library call that recurses in Python once per level, such as `tomllib.loads`, `re.compile`, or `copy.deepcopy`, which stop at the interpreter's recursion limit on every version, nor a callable the policy cannot read, a method of a parameter or of what a call returned included unless it is a plain method of text, a path, or a collection, nor a repository function that calls itself or one of those, since each reader refuses nesting as its own family and the handler only hides that, when the handler names `RecursionError`, with a reader or without, around a call the standard library runs in C, the json module's reader and writer, `pickle`, `marshal`, `repr`, or the parser and compiler behind `ast.parse`, `compile`, `eval`, and `exec`, made directly or through a repository function, and nothing that recurses in Python, its codec and file methods such as `encode()` and `write_text()` read as recursing into nothing, in a function that never judges the depth with `nesting_depth.nests_past`, directly or through a repository function, depth being judged per function, not per value, and a call in C reached through an instance method or through `str()`, `format()`, `print()`, or a formatted string of a container not read as one, since such a call stops at a depth that varies by Python version and platform, not at the interpreter's limit, so the handler refuses a value on one version that another writes or reads whole, and on a `core_reader_families` entry whose family names no class or whose reader a `CONTENT_READERS` already names; a function the allowance names lets no family escape, as one that reads back what it just wrote. It fails on a read of a git result's `returncode` outside ejryan89-skill-core's `git_client.py`, since a nonzero exit taken for "not there" reads a checkout or a ref git could not read as absent. A git result is what `GitClient.run` returns on a client the module holds, a `GitClient` or an instance of a subclass of it, this module's or one another module defines, at any depth, `self` and `cls` in a subclass's methods included, what a function annotated to return `GitResult`, by name or in quotes, returns, awaited or not, in any module validation reads and through every module that imports it again, at its top level or under an `if`, a `try`, a `with`, or a loop there, what a method a class annotates so returns on an instance of that class in the module that defines it, `self` or `cls` in its methods, a call of the class, or a name annotated as or bound to one, and a name annotated as one; a name is one only in the function that binds it, by an assignment, a tuple assignment from a literal tuple or list, or an assignment expression, of a result or of a name that holds one, or by a `case` that captures a held subject whole. A lookup of `returncode`, or of a name that is not a constant, by either spelling of `getattr`, `inspect.getattr_static`, `object.__getattribute__`, a bound `__getattribute__`, or an `operator.attrgetter` applied to the result, is a read, and so are a class pattern that names it by keyword, or by position on `GitResult`, and a reach of the result's fields as a whole, by `vars`, `__dict__`, `__getstate__`, `dataclasses.asdict`, or `dataclasses.astuple`. A result handed to a function, a container, or a loop, and an `attrgetter` bound to a name before it is applied, are not followed. A method of a class another module defines is not followed. The client's `rev_parse_paths`, `commit_of`, `ref_commit`, `file_at`, and `quiet_output` give found, absent as git reports it, and could not tell instead. It fails on gh's limit option, `--limit` or `-L`, passed outside ejryan89-skill-core's `github_client.py`, since gh cuts a listing at its limit and says nothing; `GitHubClient.capped_list` asks for one more and reports `cut`. It fails on the arguments of a git name listing, a call's positional arguments or a list's or tuple's items whose first string after `git` and git's own options is one `GIT_NAME_LISTINGS` in `tests/validation/python_checks.py` names: `ls-files`, `ls-tree`, `diff-tree`, `diff-index`, `diff-files`, and, given an argument, `grep`, `check-ignore`, and `check-attr`, which always list names, `diff`, `log`, or `show` with `--name-only`, `--name-status`, `--raw`, or `--numstat`, `status` with `--porcelain`, `--short`, or `-s`, or `worktree` with `--porcelain`, that hold no `-z` or grep's `--null`, unless `-q` or `--quiet` keeps it from printing any, outside `git_client.py`, since git quotes a name holding a non-ASCII byte or a newline and a reader split on lines misreads it; `GitClient.names` adds `-z`, and a call of it is not read. It fails on a `for-each-ref` or `log` format, after `--format` or `--pretty`, whose fields anything but NUL joins, `%00` for `for-each-ref` and `%x00` for `log`, since a ref name, a path, or a message can hold any other byte, and on a `strip()`, `lstrip()`, `rstrip()`, `split()`, or `rsplit()` of git's output given no separator or characters, or `None` for them, positionally or by keyword, with a `maxsplit` or not, bound or unbound, which drop or break on U+00A0, U+2028, and the other whitespace a ref name or a path can hold, so a one-line answer is read with `git_client.output_line`, which takes off only the newline that ends it. It reads git's output through what keeps the text, as `out.decode().strip()` does: a string method, a `str()` or a `bytes()` given an encoding or not, a slice, a formatted string, a `format` or a `format_map`, a `%`, a concatenation or a repetition, a `join` of a literal sequence, or a conditional expression or an `or` one of whose values does, as a call's result, its `stdout`, or a name an assignment, an annotated or augmented assignment, or an assignment expression binds to one, by the scope that binds it, wherever in the module it is read; a call of any other function is not followed. Git's output is a call's whose first string after `git` and git's own options names a subcommand that prints a ref, a path, an object, or a commit, or any subcommand of a call whose first element, the arguments read in order with each list or tuple among them read as its items, is the literal `git` or a name or attribute that says git, as `subprocess.run(["git", ...])` or `run_tool([git, "--exec-path"])`, or whose function's dotted name has the word git in it, as `runtime_support.names_git` reads it, GitHub not counting; such a call whose subcommand its arguments name only at run time, whatever their shape, as `git_in(checkout, runner, *arguments)`, `git_in(checkout, runner, command)`, or `run(["git", name])`, counts for any subcommand. It fails on a split of any program's output, git's among it, anywhere but at a line feed, outside ejryan89-skill-core's `text_lines.py` and `git_client.py`: a `splitlines()`, bound or unbound, of its text or its bytes, whatever the line-split policy below allows, or a `text_lines`, `lines_and_breaks`, or `line_starts` given no breaks of its own or `LINE_BREAK`, which break at a lone CR, since a line of a program's output can hold any other character in a name or a path the program prints; a line of it is read with `text_lines.program_lines`, or `git_client.output_lines` for git's. A program's output is what a process writes, as the module receives it: a run result's `stdout`, `stderr`, or `output`, on any receiver, a `subprocess.check_output()` or `getoutput()`, a `communicate()`, an `output()` or a `quiet_output()` as `GitClient` and `GitHubClient` give it, a `read()` of what is already a program's output, as `process.stdout.read()`, git's output as above, a `read()`, `read_bytes()`, `read_text()`, or `readline()` of a file a process start is handed as its `stdout` or `stderr`, by any name the module names that file by, as `deployer/discovery.py`'s `_close` reads back the temporary file a runtime's stderr goes to and `tools/mutation_gate.py`'s `suite_tests` the listing pytest wrote, a `read()`, `readline()`, or `errors()` of a `bounded_process.streaming` handle, a field of a class the module defines with annotated fields that a call of the class fills with output, by position or by keyword, read by its name on any receiver in the module, so an unrelated attribute of that name reads as output too, as dotnet-dependencies' `Completed.text`, and the return of a function a module-level `OUTPUT_SOURCES = {function: reason}` declares, for a function that gathers a program's output where no reading can follow it, as `deployer/discovery.py`'s `converse` does through a reader thread and a queue. A file a program writes is its output. Where a process start the module makes is handed the file, it is followed; where another process writes it, as the reviewer guard's hook writes its read log, the runtime canary's recorders their records, and the fresh-runner workflow the output of `deploy.py verify`, no reading can tell from the path which program wrote it, so an entry `function.parameter` of the same declaration names the parameter its reader is given the path by, as `review_dispatch`'s `_read_log.log`. It fails on an entry that names no function the module defines at its top level, or no parameter of one, one whose return no call reads, one whose file no read in the module reads, and a declaration that is no dictionary of reasons. A name names the same file as each name an assignment, an assignment expression, a `with` target, or a parameter a call in the module fills binds it to, through each branch of a conditional expression or of `and` or `or`, the path an `open()`, an `io.open()`, or a `Path()` is given, resolved through the module's imports, and otherwise the receiver of an `open()` method, as `with listing.open("wb") as output` names `listing`'s file. A handle is a `streaming()` call, a name a scope binds to one, a parameter annotated `Streaming`, or an attribute of `self` a method of the class binds to one. Output is followed through a name a scope binds to it, through what keeps its text as above, a `decode()` among it, through an index, a `get()`, or a part of a `split` or a `partition`, a `json.loads` or `json_reader.loads`, a regular expression's `sub()`, `subn()`, or `split()` of it, by `re` or by a pattern an `re.compile()` call gives or a name a scope binds to one, a line `program_lines` or `output_lines` gives, a loop or a comprehension over one and a literal sequence of them looped over, the return of a function the module defines once by its name, whichever call reads it, a parameter of such a function a call in the module fills by position or by keyword, and a parameter of a function another module defines at its top level that a call fills, named through the module's imports by a qualified name ending in that module's stem and the function's name. A call through a parameter calls the function its scope binds the parameter to in exactly the form `name = name or function`, and through no other. A file's or a document's own text is not a program's output: a file read from disk that no process start of the module is handed and no declaration names, a call whose function's name has the word `file` among its words, as `GitClient.file_at` and a reader of a file at a commit have, and a document a program carries, as gh's JSON carries a release's or a pull request's body or git log a commit message, which a module splits where the document's own program ends a line and states why. Not followed: a value a callable the module is given returns, but through that `or` form; the return of a function another module defines, but a declared source's; a call through that `or` form of a function another module defines, a declared source's included, which leaves the source's declaration unread and so refused; a call of any other function, `GitHubClient.json` among them; a method's parameter a call through `self` fills; a parameter an argument after a starred one fills; a file a process start in another module or in a callable the module is given writes, or one a process is handed as its stdin or by a path among its arguments, but a declared log; a file an attribute holds, as `stdout=self.log`, and one named again by an expression rather than a name, as `(folder / "out.log").read_text()`; a streaming handle a function returns, one an attribute of anything but `self` holds, one an attribute of `self` holds in another class than the one that binds it, one an annotated assignment binds to an attribute of `self`, and one a parameter annotated other than `Streaming` alone holds, as `Streaming | None`; a field of a class another module defines, but `stdout`, `stderr`, or `output`, one a class does not annotate in its body, and one a call fills through a starred argument or a mapping unpacked; a pattern a parameter or an attribute holds, and one another module compiles, imported by name; the replacement an `re.sub()` is given; and a regular expression's `match()`, `search()`, `findall()`, or `finditer()` of output, and a group of its match. It fails on a `splitlines()`, bound or unbound as `str.splitlines(text)`, outside ejryan89-skill-core's `text_lines.py`, of anything but plain bytes, a bytes literal, a `read_bytes()`, an `encode()`, or a `bytes()` call, which it breaks at CR, LF, and CRLF alone, since on text it also breaks at U+0085, U+2028, U+2029, the vertical tab, the form feed, and the file, group, and record separators, which YAML, CommonMark, .NET, Bash, and ShellCheck read as text and a program's output holds in a name or a path; a file an author writes is split with `text_lines.text_lines`, and a program's output where that program ends a line, with `text_lines.program_lines` or `git_client.output_lines`. It fails as well on a `split()` or `rsplit()` at `"\n"`, bound or unbound, positional or by `sep=`, of a file an author writes read with its CRs kept, a `read_bytes().decode()`, a `read_text()` given a `newline` other than `None`, or a `replace("\r\n", "\n")`, or of a name the same scope binds to one, through `strip()`, `lstrip()`, `rstrip()`, `removeprefix()`, or `removesuffix()` or not, since it misses a lone CR, a line end to YAML, CommonMark, and .NET; a plain `read_text()` reads with universal newlines, which turn a lone CR and a CRLF into the line feed it splits at, and a program's output is split where that program ends a line. Text a parameter, an attribute, or another call gives is not traced to a file, nor is a name bound from a traced name through a further assignment, so such a split of it is not read. A Bash script and a `.shellcheckrc`, which Bash and ShellCheck end a line of at LF alone, are split there with a stated reason. It fails on a read of a `GitError`'s `returncode` that takes no exit code for git not running, outside `git_client.py`, since the client raises one with no exit code for an answer in the wrong shape; whether git ran and finished is `GitError.answered`. Such a read is a comparison of the `returncode` with `None`, as a side or as a member of a literal tuple, list, or set it tests membership in, as `returncode in (None, 128)`, a `match` on it one of whose cases holds a `None` pattern, alone or among the alternatives of an or-pattern, or the `returncode` read as true or false: the test of an `if`, a `while`, an `assert`, a conditional expression, a comprehension's filter, or a `case` guard, the operand of `not`, the argument of `bool()`, an operand of an `and` or an `or` that one of those tests, and any operand of an `and` or an `or` but its last, as `returncode or 128`. The `returncode` is read as `error.returncode`, as a lookup given its name as a constant in any form `attribute_lookups` reads, a `getattr` with a default or not, `vars(error)["returncode"]`, or `error.__dict__["returncode"]` among them, as an assignment expression of either, or through a name an earlier assignment, chained or annotated, or assignment expression binds to one of these, a name rebound to anything else afterwards included, inside the `except` clause that catches the error, alone or among others, or a function or an async function given it as a parameter of any kind annotated `GitError`, `GitError | None`, `Optional[GitError]`, or `Union[GitError, None]`, or any of these in quotes. It does not read a `returncode` handed to another function, `operator.truth` or `operator.not_` of it, a name a tuple assignment binds, or an `Annotated` or a type alias of `GitError`. It fails on a module splitting a fact line it builds back into fields, where a value that holds a space, as a path may, moves every later field: a `split()`, `rsplit()`, `partition()`, or `rpartition()` of a name, bound or unbound as `str.split(line)`, or of a method call's result or a subscript on the name, as `line.strip().split()` or `line[4:].split()`, inside the branch of an `if` or a conditional expression whose test, alone or as an operand of an `and` or an `or` and outside a `not`, calls the name's `startswith()` with a fact word, an upper-case word and a space, given as a literal, a tuple of literals, or a name the module's top level binds once to either, or in the result, a later `if` clause, or a later `for` clause's iterable of a comprehension one of whose `if` clauses does, where the module builds a string that starts with that word and a space, a string literal or a formatted string whose first text does; carry each value beside the line where it is built instead, as `skill_inventory`'s `delegation_lines` and the `Fact` records of `tools/runtime_command_lines.py` do. A tested string, a `startswith()` argument or a comparison's operand, builds no line, nor does a docstring or the module's own `FACT_SPLIT_ALLOWED` value, so neither a test nor an allowance's reason keeps an entry alive, and a name rebound inside the branch is still read as the tested line. It does not read a split after a test that guards it by an early `continue`, `return`, or `raise` rather than a branch, a split no `startswith()` test guards, as of a line whose word the split itself reads, a line another module builds, a string whose literal holds the word without its space, as `" ".join(("WORD", value))` builds, a test or a split of an attribute, as `self.line`, rather than a name, a test through a `match` statement or a `while` loop, a split by `re.split()` or another function given the line, a `startswith()` argument built by a `+` or a formatted string, as `startswith(FACT + " ")` or `startswith(f"{FACT} ")`, a line built from a name holding the word, as `f"{FACT}{value}"`, or a split in the `else` branch of a `not` test or in the test itself, as `line.startswith("FACT ") and (parts := line.split())`. The time-option, int-parse, JSON-write, and ctypes policies read each way a call may run, through `resolved_calls` in `tests/validation/validation_support.py`, the one reader of it, and refuse a call when any way is one they refuse: a name is read as every value a binding of it may give at the read, by an assignment, an assignment expression, a literal tuple's item, or a `with` target, in both arms of a branch, a `try` and its handler, and through `global` and `nonlocal` from the scope that owns it, while a later assignment in the same statement list replaces an earlier one, and one after the read inside a loop reaches the read's next pass; a `getattr` of a constant name, an `operator.attrgetter` of one applied to an object, a `functools.partial` with its arguments ahead, a `**` of a literal dict, a `dict()` of keywords, or a name bound to either, with each constant key a subscript store, an `update`, or a `setdefault` adds to that name, and `builtins.X` read as `X`. A dict changed any other way is unread. A module-level binding is read in every function; `self.x`, `cls.x`, `ClassName.x`, and a name a class body binds are keyed by their class (`place_key`), and any other attribute or subscript by its text. They do not follow a name a `match` binds from part of its subject (a capture of the whole subject is followed; a class pattern's keyword that binds an owner-only or catalogued name is refused at the source by the rules below), text a helper returns, a library a method returns, or a `ctypes.LibraryLoader`; a `*` of option strings, a `type=` given a lambda, a `**` the resolution cannot read, a lookup through `vars()` or a module's `__dict__`, and the other indirect forms the indirection policies below refuse need no following; and, refusing on the safe side, they read a binding as reaching past an early `return` or `raise`, and a binding inside a nested block as not replacing one before the block. An exception that must stay is sanctioned beside the code as a module-level `PROCESS_ENV_ALLOWED`, `LINK_TEST_ALLOWED`, `RESOLVE_ALLOWED`, `PRESENCE_ALLOWED`, `CTYPES_ALLOWED`, `RESULT_DISCARD_ALLOWED`, `JSON_PARSE_ALLOWED`, `JSON_WRITE_ALLOWED`, `CONTENT_ERRORS_ALLOWED`, `TIME_OPTION_ALLOWED`, `INT_PARSE_ALLOWED`, `GIT_STATUS_ALLOWED`, `GH_LIMIT_ALLOWED`, `GIT_SEPARATOR_ALLOWED`, `OUTPUT_SPLIT_ALLOWED`, `LINE_SPLIT_ALLOWED`, `GIT_ANSWERED_ALLOWED`, or `FACT_SPLIT_ALLOWED = {scope: reason}`, keyed by the function's or class's qualified name or a module-level assignment's target; an entry that sanctions nothing fails.
- Report a failure as itself. A failure named by something other than its own reason sends its reader to fix the wrong thing, so validation holds two forms of it. In `tests/validation/python_checks.py`, in the modules the claim policies read, it fails on a formatted string that names the exit status a command ended with, a `returncode` read on any receiver or through a name its function binds to one, without the reason the command gave in the same message: its output, a `stdout`, `stderr`, or `output` read, ejryan89-skill-core's `flat_text` or `flat_text.reason_line` of it, a name its function binds to one of those, or the result handed whole to a call, in the formatted string or a string concatenated to it. A status named alone passes where it is the fallback for a command that printed nothing: a later value of an `or` after the output, as `reason_line(result.stderr) or f"git exited {result.returncode}"`, the branch of an `if` or a conditional expression taken when the output is empty, a message kept in a name the function later joins to the output, or one that says the command printed nothing. It also fails on an `except` clause that takes a failed read's `OSError`, as the presence policy reads that family, and answers with a message of its own, a string of more than one word anywhere in its body, without reading the error it binds, other than as a `raise ... from` cause, which the line a failure prints leaves out; a handler of a decode's `UnicodeError` alone, whose message says the text is not UTF-8, passes. A site that must stay states why in a module-level `REASON_ALLOWED = {scope: reason}`, its reason naming where the command's output does reach the reader. It leaves out, as stated limits, a status read through an attribute or a name another function binds, or through a `getattr` of a constant name, output a helper's parameter holds, a message kept in a name that one formatted string joins to the output though another returns it alone, a status formatted by `%`, `.format`, `+ str()`, or a join, a handler of an error outside the `OSError` family, such as `CalledProcessError`, a message held in a module constant or a single word, a handler that reads the error only for its type's name, and a handler that hands its message to a function that reads the error from `sys.exc_info()`. In `tests/validation/shell_targets.py`, it fails on a test of a file's presence or kind in a skill's Bash script, a `[`, `[[`, or `test` command holding one of the unary operators `-a`, `-b`, `-c`, `-d`, `-e`, `-f`, `-h`, `-L`, `-p`, `-S`, or `-s` and its operand after any `!`s, whose False reaches a `FAILED` line: the `then` branch of an `if` or `elif` after a negated test or a later branch after a plain one, or the command after a `&&` that follows a negated test or a `||` that follows a plain one, which prints a word starting `FAILED`. Such a test is false alike for nothing there, something of another kind, a link to nothing, and a path a stat cannot examine, so the script names what it found through one presence function instead, as `update-coding-agent-skills`' `update.sh` does with `file_presence`, which tells a file, nothing there, another kind, and a path it cannot examine apart, with the operating system's reason. It leaves out a compound test of `-a`, `-o`, or parentheses, a `FAILED` line printed by a function the branch calls, one a here-document holds, and one held in a variable the branch prints, and a test whose False reaches `FAILED` through `A && B || C`, a test inside `{ }` or `( )` in a condition, or a `$?` read later, none of which a shipped script writes. It names a script it cannot read, or one that is not UTF-8 text, and fails when it is given no skill's Bash script at all.
- Name every reader of a commit's tree with the bytes it promises. The code-review snapshot reads the committed bytes and `deploy.py --at` a checkout's, on purpose, as the row on readers of a commit's tree under [Decisions](design.md#decisions) says, so validation, in `tests/validation/tree_readers.py`, finds every place in a Python, Bash, or PowerShell file outside the suites and `tests/fixtures/` that runs `git archive`, `git ls-tree`, `git cat-file`, `git show`, or `git grep`, and every call of `GitClient.file_at`, and every GitHub endpoint that reads a commit's tree, and holds each, by its module and scope, to an entry of its `TREE_READERS` catalogue naming the bytes it promises: `committed`, each blob as the object store holds it; `checkout`, each file as a checkout writes it, line endings and filters applied; or `entries`, the tree's paths, modes, object names, kinds, or sizes and never a file's bytes. `archive` gives a checkout's bytes, and so does `cat-file`, `show`, or `grep` given `--filters` or `--textconv`; `ls-tree` gives entries, and so does `cat-file` given `-e`, `-s`, `-t`, or `--batch-check`; any other `cat-file`, `show`, or `grep` gives the committed bytes. GitHub's tarball and zipball endpoints and github.com's archive downloads give a checkout's bytes, since GitHub builds them as `git archive` does; its contents, readme, and blobs endpoints and its raw files give the committed bytes; and its trees endpoint gives entries. An archive gives the committed bytes only in a scope that calls the check its `CHECKED_READERS` entry names, a function its module defines, as `github_tarball_fetcher` calls `verify_github_tarball`, which refuses a tarball whose members are not exactly the blobs of the commit's tree; validation fails an entry whose scope no longer calls its check, or reads no archive. It reads git's words from each list or tuple literal, each call whose name says git, and each command a runner in `tests/validation/call_tables.py` runs through a shell, and a GitHub endpoint from the text each string expression in a Python file renders, a string literal, an f-string, or a `%`, `+`, or `.format` of one, in the scope that writes it, whatever call hands it to `GitHubClient` or `gh api`. Validation fails a reader the catalogue does not name, one whose git words give other bytes than its entry promises, a scope that gives both a checkout's and the committed bytes, a script whose git it cannot read, and an entry that names no reader. Words that spell a reader's subcommand but never reach git, such as a fixture's folders named `archive` and `checkout`, are named exactly, with the reason, in its `NOT_READERS`, which passes over a sequence of string literals that is those words in that order and never excuses an endpoint; an entry no sequence spells, or one with no reason, fails. Its stated limits, each shown by a fixture: a subcommand only a value names is not read; a `cat-file` mode only a value names is read as the committed bytes; a call named for git whose words start with a string literal before the subcommand takes that string for the subcommand; a call named for no git is read only where a list or tuple literal holds its words, and a `file_at` reached through a name bound to the method is not read; a command given as one string to a runner without a shell, or split from one string, is not read, and one run through a shell only where it is one string literal; a shell's `-c` script inside a list, and a command in a Markdown fence, are not read; a Bash or PowerShell script's git, and a command run through a shell, are read by their subcommand alone, so their options are read as giving the committed bytes; a git a shell function or array runs with the words it is given is not read at its callers; a `grep` over files rather than a commit, given `--no-index` or no commit, as `search_source`'s snapshot search runs, is read as one over a commit; `worktree add`, `checkout`, `switch`, and `restore`, which write a commit's tree into a working tree and hand their caller no bytes of their own, are not read; a sequence whose words are exactly a `NOT_READERS` entry is passed over wherever it sits, the catalogue's own `NOT_READERS` assignment aside, which is never read, though an entry added in another statement, as `NOT_READERS[words] = reason` or `NOT_READERS.update(...)`, is read and so excuses itself, so a literal `git archive checkout` would be excused anywhere; an endpoint is read in the scope that writes its text, so one a module-level name holds is read at that name, as `branch_protection`'s `ISSUE_CONFIG_ENDPOINT` is, and an archive's check is held there; an endpoint whose text no string expression spells, as one held in bytes, joined by `str.join`, built by a helper from its parts, or whose kind only a value names, is not read; a contents or readme endpoint is read as giving a file's committed bytes, even for a folder; a `gh` command other than `gh api` that reads a commit's tree, as `gh release download --archive` or `gh repo clone`, is not read, and neither is a GitHub endpoint in a Bash or PowerShell script or a Markdown fence; an endpoint after a repository path a name holds, as `f"{base}/contents/{path}"`, is not read; a file read through GraphQL's `object(expression:)`, or through github.com's `blob/<commit>/<path>?raw=true`, is not read; and a check is held by the name a call in its scope gives it, wherever in the scope, a branch that never runs or before the download included, and whatever it is given, and it holds every archive its scope reads, a second archive beside the one it checks included.
- Read each concept that has one helper only through it. A concept implemented a second time with other code escapes the duplication rule, and review passes found the copy left unfixed, so validation, in `tests/validation/one_helper.py`, holds the hub guard's place lookups, closing references, a checkout's status, a pull request's files, a repository path read from a snapshot, an owner/name pattern, a review's identity, and a Markdown escape to their helpers. The hub guard's place lookups, which its `PLACE_LOOKUPS` names (`checkout_of`, `guarded_hub_of_repository`, and `reached_hubs` in `tools/hub_guard.py`, and `checkout_of` in `tools/worktrees.py`), raise ejryan89-skill-core's `GitError` where git cannot say where a call acts, and every path that reaches one treats any `GitError`, of any kind, as an unknown place. Validation follows each call in `tools/hub_guard.py` and `tools/worktrees.py` that reaches a lookup, by a function's name, a method through `self` or `cls` or through a receiver when one class alone defines a method by that name, and a function of the other module through that module's name, and reads a call as caught in the body of a `try` whose first handler for a `GitError`, one naming it or a class it derives from, or a bare `except`, does not raise the error again; a handler that raises another error catches every kind alike. It fails a handler that treats the kinds apart, by reading of the error it caught an attribute that tells one `GitError` from another, each one a `GitError` holds that a `RuntimeError` does not, such as `kind` or `answered`, or by testing it with `isinstance` against no class `GitError` derives from; and a scope nothing in those modules calls that lets one escape, a module's own statements included. Its `PLACE_LOOKUP_SANCTIONS` names a scope held to neither, with the reason, as `hub_protected`, whose edit a git that did not run or finish allows with a note; an entry that sanctions nothing, one with no reason, a lookup module that is not there or does not parse, and a lookup its module does not define or no call in those modules reaches fail, so a path the policy cannot measure never passes. ejryan89-skill-core's `closing_references.py` is the one reader of the issues a pull request closes and holds the one copy of GitHub's closing keywords, which the policy reads from it. In every non-test module ruff formats but the helper, validation fails a string literal given as the pattern to a function of `re` that takes one, or bound once at module level to a name given so, that finds a closing keyword it spells before an issue reference in any form the helper reads, and none once the keyword's letters are replaced; a string literal holding a keyword before the start of a reference compared with `==`, `!=`, `in`, or `not in`, or given to a method of `str`; a call of the helper's `closing_references`, which reads one text, and a match of its `CLOSING_REFERENCE` over anything but the text `pull_request_text` joins from a title and a body; and a call of `pull_request_references` or `pull_request_text` not given both a title and a body, or given a literal `None` for either. Its stated limits, each shown by a fixture: a lookup handed on as a value, as `map(checkout_of, paths)`, and a call from another module are not followed, and a method reached through a receiver whose name more than one class defines is not followed, so that method reads as an entry point; a kind read through a function the handler hands the error to or through an alias of the error it caught, as `error = exc; error.kind`, and a class tested other than by `isinstance`, as `type(error) is GitError`, are read as treating every kind alike, and so is a handler that raises a new `GitError` from the one it caught; a handler that catches only a class derived from `GitError` is read as not catching, so the error is followed to the next handler, and where that is `guard`'s `except Exception` nothing is refused, though the repository defines no such class; the rule reads whether a handler tells kinds apart, never what it makes of the place, so `except GitError: hub = None` passes, and so does a lookup whose error reaches `guard`'s `except Exception`; only the lookups `PLACE_LOOKUPS` names are followed, so a git call a scope makes itself, as `own_paths` and `git_directory_holding` make theirs, is not; a `GitError` that `contextlib.suppress` catches is not read as caught; an error kept and raised after its handler, as `reached_hubs` raises its first failure once every place is looked up, is read as caught, and `reached_hubs` is a lookup, so its callers are held all the same; a pattern built from names or formatted values, joined with `+`, bound to a name inside a function, or given by keyword as `pattern=`, a keyword written as a character class, as `[Cc]loses`, and a pattern that needs text before the keyword, as `^- closes #(\d+)`, are not read, and neither is a keyword compared alone, as `word == "closes"`, since a state such as `"closed"` or a subcommand such as `resolve` is compared the same way; a module that applies the helper's own patterns, as `implement-change`'s `pull_request.py` applies `BARE_CLOSING_LINE` to a body line, reads the keywords through the helper; a title or a body given as a literal empty string is read as given; and a Bash or PowerShell script, a workflow, and a Markdown fence are not read. ejryan89-skill-core's `git_worktrees.py` is the one reader of what `git status` lists for a checkout: its `changes` passes `--no-optional-locks`, since a status otherwise refreshes the checkout's index and writes it back under its lock, which a session committing there at the same moment needs. In every non-test module ruff formats but the helper, validation fails a call given git arguments whose subcommand, as `git_client`'s `subcommand` reads it past git's own options, is `status`: a list or a tuple given by position, or a run of strings given one at a time to a wrapper that takes `*arguments`, as `git(services, root, "status", "--porcelain")`, that holds an option after the subcommand, reading an element that is neither a string literal nor a name the module binds once to one as a value. A module states why a scope runs status itself in a module-level `STATUS_READ_ALLOWED = {scope: reason}`, as the fault driver that refreshes a fixture's index on purpose does; an entry that sanctions nothing or has no reason fails. Its stated limits, each shown by a fixture: arguments bound to a name first, joined with `+`, given by keyword, or led by a starred element are not read; a run of strings given one at a time ends at the first argument that is not one, so `git("-C", path, "status")` is not read, and neither is a run with no option after `status`, as `git("status")`, since a word given alone, as `entry.get("status")`, is spelled alike; a run given to a call that is not git's, where `status` is followed by a word that starts with `-`, as `entry.get("status", "-")` or `parser.add_argument("status", "-s")`, is refused all the same, and its scope states why in `STATUS_READ_ALLOWED`, though no repository code writes one; an argument list that names the program first, as `["git", "status"]`, reads `git` as its subcommand, since every git call goes through `GitClient`; and a Bash or PowerShell script, a workflow, and a Markdown fence are not read, though no Bash or PowerShell script but the suites runs `git status` without `--no-optional-locks`, and the suites' own read throwaway repositories. The review core's `review_github.py` is the one reader of GitHub's files endpoint of a pull request: its `GitHubClient.list_pull_files` reads the pull request's count of changed files and its head before the pages, and answers with a `PullFiles` whose checks, `cut` and `moved_from`, which the policy reads from the class, tell a caller whether the listing is cut short of that count and whether the head moved. In every non-test module ruff formats but the helper, validation fails a string literal or an f-string that spells `pulls/<number>/files`, and a call of `list_pull_files` whose listing is not bound to one name, by an assignment or an assignment expression, and checked in its scope with every one of those checks. The policy's `PULL_FILES_SANCTIONS` names a scope that reads the endpoint itself, with the reason; an entry that sanctions nothing or has no reason fails. It names shepherd-pull-requests' `every_file`, which pages the endpoint through ejryan89-skill-core's gh client: the policy holds only that the scope still reads the endpoint, and the shepherd's own suite, in a test the policy names and its fixture suite holds is there, holds that it refuses a listing short of the count and one read while the head moved. Its stated limits, each shown by a fixture: an endpoint joined with `+`, built by `format()`, `%`, or `str.join`, or spelled as `/files` after a value that holds the rest is not read, and neither is gh's `--json files` or GraphQL's `files` connection; a check anywhere in the scope counts, before the read or in a branch that never runs, and one made in a function the listing is handed to does not; and a Bash or PowerShell script, a workflow, and a Markdown fence are not read. ejryan89-skill-core's `diff_paths.py` is the one reader of a snapshot's file by its repository path: its `snapshot_path` judges the name with `unsafe_snapshot_name`, then holds the joined path inside the resolved root, so a name that leads out through a link is refused too. In every non-test module ruff formats but the helper, validation fails a scope that gives a name to `unsafe_snapshot_name` and joins that same name onto a path itself, by `/`, by a `joinpath` method, or by `os.path`'s, `posixpath`'s, or `ntpath`'s `join`; a scope that judges a name without joining it passes. A module states why a scope joins one itself in a module-level `SNAPSHOT_PATH_READ_ALLOWED = {scope: reason}`; an entry that sanctions nothing or has no reason fails. Its stated limits, each shown by a fixture: a name judged in one scope and joined in another, joined under another name, or judged as anything but a name, as `entry.path`, is not read, and neither is a join by `Path(root, name)`, by `/=`, or in an f-string, a judge given the name by keyword, or a join with no judge at all. ejryan89-skill-core's `github_remote.py` holds the one spelling of the characters a repository's owner and name hold, `REPOSITORY_CHARACTERS`, and `OWNER_AND_NAME`, an owner and a name of them, which `closing_references.py`, repo-cleanup's `pr_status.py`, and the review core's `review_config.py` build on; `review_config`'s repository identity keeps its narrower rule, a login for the owner and a name never made only of dots, on top of the class. In every non-test module ruff formats but the helper, validation fails a string literal that spells an owner/name pattern with its own class: a character class that takes exactly the helper's characters, in any order, then a quantifier, a `/`, escaped or not, and the same class again, either class in a plain, non-capturing, or named group or not; a class `re` cannot compile measures as nothing. A module states why a scope spells one in a module-level `REPOSITORY_PATTERN_ALLOWED = {scope: reason}`; an entry that sanctions nothing or has no reason fails. Its stated limits, each shown by a fixture: each class is measured as written, under no flags, so a class that takes another set of characters is another class even under the flags a pattern is compiled with, as `[\w.-]` under `re.ASCII` or `[a-z0-9_.-]` under `re.IGNORECASE`, and a class whose body holds what `re` reads as a set operation, as `--`, is not read; a pattern joined with `+`, split by an f-string's formatted value, spelled with spaces around the `/` in a verbose pattern, or with a possessive quantifier, and a bytes literal are not read; and a Bash or PowerShell script, a workflow, and a Markdown fence are not read. ejryan89-code-review-core's `review_records.py` is the one reader of a review's identity: its `review_identity` gives a record's repository, pull request number, head, the base branch's tip when the review ran, and version, so a later review of one head, as a re-review on another base is, is never taken for the one before. A reader that keys reviews by the head alone states why: review-insights' verdict flips and reviewer disagreements do, since a record holds the base branch's tip, not the merge base its review diffed against. In every non-test module ruff formats but the helper, validation fails a scope that keys reviews by a record's head, `["pull_request"]["head_sha"]`, alone or beside other fields, read there or through a name the scope bound to an expression holding it: a subscript's index, the first argument of a dictionary's `setdefault`, `get`, or `pop`, a dictionary display's or comprehension's key, a set display's or comprehension's element, the left side of an `in` or `not in` test, or the key of `itertools.groupby`, given by position or by keyword. A module states why a scope keys one itself in a module-level `REVIEW_IDENTITY_ALLOWED = {scope: reason}`; an entry that sanctions nothing or has no reason fails. Its stated limits, each shown by a fixture: a head read by `.get`, through the pull request bound to a name first, or held as an attribute, as `reviewed.head`, is not read, and neither is a name bound by unpacking, by an annotated assignment, by a `for` or comprehension target, by a `match` capture, or in another scope, a head added to a set by a method, counted or deduplicated by `collections.Counter` or `dict.fromkeys`, or looked up by `list.index`, or a comparison of two heads, as `since_sha == head_sha`, which code-review-core's `pr_change.Query` decides as `one_comparison` and `same_head`; and a Bash or PowerShell script, a workflow, and a Markdown fence are not read. ejryan89-skill-core's `markdown_literal.py` is the one Markdown escaper for text a script did not write: its `markdown_literal` and `markdown_line` encode every punctuation character as a character entity, so the text can neither add a table cell nor open a comment, a link, or a mention, where a hand-written escape of one character, as a pipe escaped by a backslash or by `|`, leaves every other one live. In every non-test module ruff formats but the helper, validation fails a replacement whose result holds a pipe escaped by a backslash or a numeric character reference: the second argument of `re.sub` or `re.subn`, or their `repl`; the second argument of a `replace` method, or the third of `str.replace` called unbound; the first argument or `repl` of any other `sub` or `subn` method; or a value of a dictionary display or comprehension given to a `maketrans` or `translate` method, read as a string literal, a module-level name bound once to one, an f-string with each value it fills in read as a digit, or a lambda's body. A `replace` of a pipe by other text, which non-Markdown text also uses, is not refused. A module states why a scope escapes by hand in a module-level `MARKDOWN_ESCAPE_ALLOWED = {scope: reason}`, as an escape inside a code span, where an entity shows raw, must; an entry that sanctions nothing or has no reason fails. Its stated limits, each shown by a fixture: a named character reference, as `<`, which an HTML or XML writer writes too, an escape built outside a replacement, as a join of each character's entity, a replacement given through a local name, a call's result, or a function other than a lambda, a replacement built by an operator or an f-string's filled-in name, as `"&#%d;" % 124`, `"\\" + "|"`, or `f"{PIPE}"`, and a mapping given to a `maketrans` or `translate` method through a name, a module-level one included, are not read; and a Bash or PowerShell script, a workflow, and a Markdown fence are not read.
- Read another program's language through the module that owns it. A reader that spells a language's structure with a pattern of its own misses what the language's owner reads, as every reader moved onto an owner had, so validation, in `tests/validation/language_readers.py`, reads the pattern each `re` call is given in every non-test module under `skills/`, `deployer/`, `tools/`, `.claude/skills/`, and `tests/validation/`, resolved through its imports, and fails on one that spells a Bash function header, a `#` comment test, or a brace-depth count outside ejryan89-skill-core's `bash_syntax.py`; an ATX heading, a code span read by single backticks, or a console fence's prompt outside `markdown_sections.py`; or a prose path outside `prose_paths.py`. Read Bash through `bash_syntax`, refusing what it refuses through `refusing`; Markdown's headings through `document_headings` or `top_level_sections`, a document's spans through `prose_code_spans`, and a console session through `session_commands`; and a path in prose through `PROSE_PATH`. The policy also refuses every reference to `markdown_sections`' `code_spans`, `without_code_spans`, or `CodeSpanReader`, which `code_spans` reads each line with, outside it, called or passed as a value, under any name an import gives it, a block walk beside it included: each reads one line's spans with no block walk around it, so a line a fenced or indented code block holds reads as prose, and `prose_code_spans`, which walks a document's blocks and reads its prose lines' spans, is the one reader of a document's. A reader of one unit read alone, such as a table cell, a field, or a heading's text, or one that needs a span's columns or the line with its spans masked, on a line its own walk read as prose, states why in `LANGUAGE_READER_ALLOWED`; which lines reach it is not followed. A name a module binds more than once, as a fallback import in `try`/`except ImportError` or the same import written twice, is not resolved, so its reads are not refused; a reader re-exported through another module, as `from other import code_spans` where `other` imports it from `markdown_sections`, is read as `other`'s, not refused; and a private reader of the owner's imported by name, as `_segment_code_spans`, is not refused. A reader that must stay, such as one of a language no module owns or of a format another program writes, states why beside the code as a module-level `LANGUAGE_READER_ALLOWED = {scope: reason}` keyed by the function or the assignment that holds it, and an entry that sanctions nothing fails. Its limits, which the module states with a passing fixture for each, and which only audit-skill's cue fragments and its quoted literal model and effort, neither a reader of a language's structure, write here: it reads only the text pattern a call is given first, never a fragment joined in later through a name, a bytes or `pattern=` pattern, one built with `+`, `%`, or `.format`, a star import of `re`, an `fnmatch` glob, a `re.VERBOSE` pattern whose blanks split a spelling, or the owner's own pattern used line by line on lines no block walk read; and it reads each family in the spellings the repository writes, a bracket class that matches only blanks, characters Python's `\s` matches or a NUL, read as `\s` in the comment test and the Bash function header, and one that matches any other character, as `[^#]` does, read as no blanks, never `function` before a literal space, heading marks as `#+` in a group, `#{2,}`, or before `\s`, a comment test with more after the `#` or indented by ` *`, a prompt after `\s+`, `(?m)^`, or ` *`, a prose path with no lookbehind, folders counted `{1,}`, or a backslash separator, a span starting with literal text or a word in optional backticks, a span's class behind two lookarounds, nested groups, a group and then a lookahead, a lookaround holding a class, or holding a group, as `` `(?!(?:--))[^`]+` ``, or over 64 characters, or a conditional group, a span opened by a class or an escape holding the backtick, a header's bare `\(\)` before `\s+`, ` *`, a literal space, or no `{`, or `\( *\)`, a `function` right after an escape whose letter or digit is a word character, as `\bfunction`, `\Afunction`, `\tfunction`, `\nfunction`, or `\x20function`, where `\b` finds no boundary, or a brace count written other than as a difference of `count` calls; it reads a `function` after an escaped backslash and an `s`, as `\\sfunction`, which no code here writes, as a header. A module that does not parse is named as a problem, never read as holding no pattern.
- Reach every name as the source spells it. The policies above read a call by its name, and Python reaches a name by a value in an open set of ways, so rather than follow each one, validation, in `tests/validation/python_checks.py`, refuses them at the source in every module the claim policies read, under `indirection_problems`, `owner_only_problems`, and `policed_call_problems`, over the one catalogue in `tests/validation/validation_support.py`, and each of them refuses a module it cannot read, one that is not valid Python or not UTF-8, by its name, and a listing that holds no module to read, rather than pass having checked nothing. `indirection_problems` refuses a dynamic name lookup: a `getattr`, `setattr`, `delattr`, or `hasattr`, either spelling, given anything but one string literal for the name, and any reference to one other than a call; any reference to `vars`, `globals`, `locals`, `eval`, `exec`, `__import__` and `builtins.__import__`, `__builtins__`, `importlib.import_module`, `importlib.__import__`, `importlib.reload`, `importlib.util.spec_from_file_location`, `importlib.util.module_from_spec`, a `SourceFileLoader`, `runpy.run_path`, `runpy.run_module`, `pkgutil.resolve_name`, `operator.attrgetter`, `operator.methodcaller`, `inspect.getattr_static`, `inspect.getmembers`, `inspect.getmembers_static`, `inspect.currentframe`, `sys._getframe`, or `sys.modules`; or to the standard library's other resolvers of an object from a dotted name or a string given as a value, `pydoc.locate`, `pydoc.resolve`, `pkgutil.find_loader`, `pkgutil.get_loader`, `pkgutil.get_importer`, `pkgutil.walk_packages`, `logging.config.dictConfig`, `fileConfig`, `listen`, `BaseConfigurator`, and `DictConfigurator`, `unittest.mock.patch`, `_importer`, and `_get_target`, and `typing.ForwardRef` and `annotationlib`'s `ForwardRef` and `call_evaluate_function`; the import system's finders and loaders, `importlib.find_loader`, `importlib.util.find_spec`, `spec_from_loader`, and `LazyLoader`, `importlib.machinery`'s `SourcelessFileLoader`, `ExtensionFileLoader`, `PathFinder`, and `FileFinder`, `importlib.metadata.entry_points`, `EntryPoint`, and `EntryPoints`, `zipimport.zipimporter`, `imp`'s `find_module`, `load_module`, `load_source`, `load_compiled`, and `load_dynamic`, and `sys.meta_path`, `sys.path_hooks`, and `sys.path_importer_cache`; the unpicklers, `pickle.load`, `pickle.loads`, `pickle.Unpickler`, `shelve.open`, and `shelve`'s `Shelf`, `DbfilenameShelf`, and `BsdDbShelf`; the runners of code given as a string, `timeit`'s `timeit`, `repeat`, and `Timer`, `profile` and `cProfile`'s `run`, `runctx`, and `Profile`, `pdb`'s `run`, `runeval`, `runctx`, and `Pdb`, `code.interact`, `InteractiveInterpreter`, and `InteractiveConsole`, `trace.Trace`, and `doctest`'s `testmod`, `testfile`, `run_docstring_examples`, and `DocTestRunner`; and the walks that hand out every live object or a frame, `gc.get_objects`, `get_referrers`, and `get_referents`, `sys._current_frames`, and `inspect`'s `stack`, `trace`, `getouterframes`, and `getinnerframes`; a read of `__dict__`, `__getattribute__`, `__getattr__`, `__setattr__`, `__delattr__`, `__globals__`, `__builtins__`, `f_globals`, `f_locals`, `f_builtins`, `__subclasses__`, which hands out every subclass, or `entry_points`, a distribution's, on any receiver; a class pattern's keyword that reads and binds one of those attributes, or a catalogued callable, from a match's subject, as `case object(__dict__=d)` does; a definition of `__getattr__` or `__getattribute__`; and a module an import statement binds, held as a value rather than read as the receiver of an attribute or of a lookup of a literal name, as `m = json` holds it. `operator.itemgetter`, which reads an item rather than a name, `dir`, which lists names and reads none, `compile` and `marshal.loads`, whose code runs only through the `exec` or `eval` refused here, `typing.get_type_hints`, which evaluates the annotation text the source wrote, `str.format`, `format_map`, and `string.Formatter`, whose field reads give text rather than the object, `codecs.lookup`, which reaches only the codec registry, `importlib.util.resolve_name` and `importlib.metadata.version`, which give a string, `importlib.resources`, which reads package data, and `ast.literal_eval`, which reads literals alone, are not refused. `owner_only_problems` refuses any reference, a call, a binding, an argument, a default, a return, a container's item, a class attribute, a base class, or a lookup of a literal name, to an owner-only callable outside the modules that own it: `json.dump`, `json.dumps`, and `JSONEncoder` outside ejryan89-skill-core's `json_writer.py`, and `json.load`, `json.loads`, and `JSONDecoder` outside `json_reader.py`, a direct call included, since JSON is written and read through those two alone; `ast.parse` and `ast.literal_eval` outside ejryan89-skill-core's `python_reader.py`, the one parse of Python source and of a literal, whose `PythonRefused` is every error the parser raises on bad content, a `SyntaxError`, a `MemoryError` or `RecursionError` past its limits, a `ValueError`, or a `TypeError`, where a handler that names `SyntaxError` alone lets the rest escape; `Path.home`, `Path.expanduser`, and `os.path.expanduser` outside `executable_locator.py` and `deployer/platform_support.py`, since each reads a relative profile folder as given, a folder under the working directory, which `executable_locator.absolute_home` refuses by its variable's name, though an `expanduser()` called on a path instance names no receiver the rule resolves and is left out; the ctypes loaders, `ctypes.windll` and its kin, and `ctypes.pythonapi` outside the modules `CTYPES_OWNERS` names; a `commonpath` or `commonprefix` of any path module outside `path_containment.py`; and each process start `PROCESS_STARTS` names outside `bounded_process.py`, an event loop's `subprocess_exec` and `subprocess_shell` matched by the method's name on any receiver, since no receiver names the loop, and `bounded_process`'s own runners excepted, since they are how every other module starts a process. A name in an annotation is no reference, and a class pattern's keyword that binds an owner-only callable from a match's subject is one, as `case object(commonpath=c)` on `os.path` binds `os.path.commonpath`; positional patterns, which read the attributes a class's own `__match_args__` names and match only an instance of it, are not read. `policed_call_problems` refuses a `*` or a `**` in an `add_argument`, on any receiver, a `json.dump` or `json.dumps`, or a process start, an event loop's matched by its method's name; an `add_argument` option string, `dest`, or `metavar` that is not a string literal; and an `add_argument` `type`, the `default` of an `add_argument` whose option string, `dest`, or `metavar` names a time, or a JSON write's `cls` or `default`, that does not spell its value where it is read. A value is spelled when it is a literal, a builtin no scope rebinds, a name the module's top level binds only by imports, only by `def` or `class`, or once to a literal, an attribute of an imported module, an operation on such values, or a call of an imported, defined, or builtin callable given such arguments; the rule reads no binding further, so a parameter, a local, `self.x`, a class attribute such as `B.kind`, a module-level name bound to anything else, such as `KIND = getattr(builtins, "float")`, a lambda, and a lookup by name are refused rather than followed; and an `add_argument` read other than as the function of a call. The ctypes policy above also refuses, in its owners too, a foreign function reached by a subscript of its library, as `kernel32["OpenProcess"]`, and any read of an attribute a class binds a library to whose receiver is not a plain `self`, `cls`, or class name of a class that itself binds it, as a subclass, `super()`, `type(self)`, `self.__class__`, or any other receiver reads it, a read off ctypes's own namespaces, as `ctypes.windll.kernel32`, which loads the library by its name, aside: the policy reads a library's functions only where the class that binds it reads them, and follows no base class. A base class imported from another module counts too, followed through the imports, and through a module that only re-exports it, into the module or package `__init__.py` that defines it, a base of a base included, so a subclass's read through `self` of a library it binds is refused. A site that must stay is sanctioned beside the code as a module-level `INDIRECTION_ALLOWED`, `OWNER_ONLY_ALLOWED`, or `POLICED_CALL_ALLOWED = {scope: reason}`, keyed by the function's or class's qualified name or a module-level assignment's target; an entry that sanctions nothing fails.
- Name every text encoding. Python 3.15 made UTF-8 the default text encoding where earlier releases read the locale's, so text I/O that names none reads one way on the supported floor and another on the latest release. Validation, in `encoding_problems` in `tests/validation/python_checks.py`, reads every Python file under the format roots, suites and their support trees included, resolving names through its imports, and fails on a call that opens, reads, or writes text without an `encoding=` other than `None`: a path's `read_text`, `write_text`, or `open` in a text mode, called on the path or on its class with the path first, as in `Path.read_text(path)`, each read at the slot its class takes the encoding at, a `zipfile.Path`'s `open` its first argument after the mode and a `pathlib` path's its third, and on a receiver that may be either, refused only when neither slot names one; `open`, `builtins.open`, `io.open`, `codecs.open`, or `os.fdopen` in a text mode, or in a mode it cannot read; `io.TextIOWrapper`; a `tempfile` `TemporaryFile`, `NamedTemporaryFile`, or `SpooledTemporaryFile` in a text mode; a `gzip`, `bz2`, or `lzma` `open` in a text mode; `fileinput.input` or `fileinput.FileInput` in a text mode, unless an `openhook=` opens each file; a `logging` `FileHandler`, `WatchedFileHandler`, `RotatingFileHandler`, or `TimedRotatingFileHandler`; a `subprocess` `run`, `Popen`, `call`, `check_call`, or `check_output` given `text=True`, `universal_newlines=True`, or an `errors=`, any of which opens its pipes in text; and a start that always decodes its output, `subprocess.getoutput`, `subprocess.getstatusoutput`, or `os.popen`, which takes no encoding at all. `logging.basicConfig` and `logging.config.fileConfig`, which open a file only when given its name, and a `ConfigParser`'s `read`, a method on a receiver validation cannot place, are not read. The opens and the process starts are the one table of each in `tests/validation/call_tables.py`, which the command and write policies read too. Pass `encoding="utf-8"` for what the repository writes and git prints, and `encoding="locale"` where the locale's encoding is meant, with the reason beside it. An exception that must stay is sanctioned beside the code as a module-level `ENCODING_ALLOWED = {scope: reason}`, keyed by the function's or class's qualified name or a module-level assignment's target; an entry that sanctions nothing fails.
- Hold each policy to its whole rule. A policy is written against the case that prompted it, so a policy whose rule speaks of the repository's Python names its scope as data, and validation holds that scope to every non-test module ruff checks: it fails on a module the scope does not reach unless the policy states why it leaves that part out, and on a stated part that no longer holds a module the scope leaves out. The claim policies above and the duplication policy are held so, the suites' support trees and the modules outside the duplication rule's trees being what they leave out. A policy's fixture suite in `tests/validation/test_<module>.py` holds a table of the forms its documentation names, its paragraph here or in "Python checks" in `.github/CONTRIBUTING.md`, its `docs/design.md` row, or its lesson's **Search for**, such as each spelling of a path, an aliased import, and an attribute call, not only the form that prompted it: each row a minimal input the policy must refuse, drawn from the documentation rather than from the matcher, so a matcher narrower than its paragraph fails its own suite. A form the policy deliberately leaves out is a row that must pass, with its reason beside it, and the paragraph names that limit. A form from an API family, such as a process start or a text open, comes from the family's one table in `tests/validation/call_tables.py`, so a new member reaches both the policy and its rows. A new policy, or a change to the forms a paragraph names, adds or changes its rows in the same pull request.
- Leave no workaround in a suite. A test marked skipped or an expected failure lets its suite pass, so validation, in `tests/validation/workarounds.py`, fails on a unittest or pytest skip or expected-failure marker and a `skipTest` call, and on a `TODO`, `FIXME`, or `XXX` comment, in the Python under the format roots outside `tests/fixtures/`. A test that cannot run on a platform is skipped by a unittest `skipIf` or `skipUnless`, or a `pytest.mark.skipif`, whose condition reads the platform alone, or defined in its class or module under an `if` on the platform. A `skipif` is judged by its first positional condition, so a second condition, or a `condition=` keyword, that reads no platform is not refused; no suite here writes one. Any other skip that must stay is sanctioned beside the code as a module-level `SKIP_ALLOWED = {scope: reason}`, keyed by the function's or class's qualified name; an entry that sanctions nothing fails.
- Decide every entry of a language's published catalogue a reader covers. A reader's suite reads the catalogue from the tool where it can, as `compgen -k` for `bash_syntax.py`'s reserved words, beside a pinned copy of the newest list, and fails an entry the reader neither reads nor refuses until it is named in a module-level `NOT_READ = {entry: reason}` beside the reader; `tests/validation/workarounds.py` fails a `NOT_READ` in a module under `deployer/`, `tools/`, `skills/`, `.claude/skills/`, or `tests/validation/` that does not map each entry to its reason in its one assignment, or that a later statement writes to, and a Bash release that no longer prints a pinned word fails the pin. The module names each catalogue it decides with the one test that holds every entry of it, in a module-level `CATALOGUE_TESTS = {catalogue: "<suite path>::<test>"}` that ejryan89-skill-core's `catalogue_tests.py` reads, as the hub guard does for its builtin, git option, and PowerShell tables, though none is named `NOT_READ`; the same policy fails a module that binds `NOT_READ` and names no catalogue test, a value that is not a tracked suite's path and a test it defines that pytest collects, and a later write to the table. pytest collects a top-level function, or a method of a top-level class that is a `unittest.TestCase`, through any import of it or the suite's own subclass of it, or whose name starts with `Test` and whose lineage defines no `__init__` or `__new__`, each with a name starting with `test`, and neither class when its lineage binds `__test__`; `tests/validation/test_workarounds.py` holds that reading to what pytest itself collects. Its stated limits: a suite under `tests/fixtures/`, which no run collects, still passes as a tracked suite; a test defined under a platform `if` cannot be named; and a test bound by assignment, a method a class inherits, and a method of a class whose lineage the suite alone does not settle, through a base imported from another module or defined later in the suite, a metaclass or any other class keyword, or a decorator, cannot be named though pytest may collect it; and a test the suite defines and then rebinds or deletes (`test_x = None`, `del TestA`), decorates into something other than a function (`@property`, `@pytest.fixture`), or switches off by `__test__`, `__init__`, or `__new__` bound at module level, on the function, under an `if`, or by unpacking, is read as collected though pytest skips it. Which entries the named test holds is review's judgment, since the policy reads no test's body, and a table the module decides without a test, such as `bash_syntax.py`'s redirections, is left out of it; `implement-change`'s fix brief lists these catalogues, so an author names the test for a construct among them and lists any other by hand.
- Keep each plugin a build of its sources. `tools/plugin_build.py` assembles the Claude Code plugins from the skills, their agents, and their metadata: the source's default selection is one plugin, named for its repository, and each opt-in bundle or skill is one of its own, and `.claude-plugin/marketplace.json` describes each one and names no other. A plugin has no deployer, so each template value takes a fixed answer, and a bundle or skill is left out of every plugin when a skill it needs takes a value with no answer. Claude Code namespaces a plugin's agents, so a skill's backticked mention of an agent the plugin carries names it `<plugin>:<agent>`, and ignores a plugin agent's own hooks ([Subagents](https://code.claude.com/docs/en/sub-agents)), so they move into the plugin's `hooks/hooks.json` ("Subagent definitions"). Validation, in `tests/validation/skill_layout.py`, fails when a plugin holds a file no deployment ships, a suite or a fixture among them, a file whose bytes differ from its source's but for the answers, the mentions, and the hooks the policy pins, a template token, a manifest other than its marketplace entry, or a hooks file other than its agents' hooks, when it leaves out a file of a skill it carries, and when the checkout holds a plugin manifest of its own.
- Hold every reader to the malformed-input corpus. A function that reads and parses a file the code did not just write, a record an earlier step or another program wrote, or text a user or a repository gives, such as an argument, a Markdown line, a glob, or a condition, joins the reader table in `tests/malformed_input/` in the pull request that adds it: its area's `readers_*.py` names its format, a well-formed document it reads, how to call it on a path, the files it takes beside its own (its `prepare`), the refusals its contract names, and each case it documents accepting, with the reason; a parser of text is called on the file's text, and one whose grammar nests or takes a number names how its own input nests and where a number goes, so the suite builds its deep-nesting and long-integer cases in its own grammar. A reader of another program's output reads that program's output as captured under `tests/fixtures/captured-output/`. `tests/malformed_input/test_malformed_input.py` places every case of `tests/malformed_input/corpus.py` for that format where the reader expects its file (an empty file, bytes that are not UTF-8, a byte-order mark, truncation, wrong top-level types, an integer past Python's digit limit, nesting past the recursion limit, nesting the parser reads but a walk over its value cannot recurse through, duplicate keys, NUL bytes, a directory, a file the reader is not allowed to open where the platform can deny one, a link where the reader refuses links, and what each format adds) and fails a case that ends in anything but a named refusal or a documented acceptance, and a refusal that changed anything in the case's folder, so a step that writes before it validates fails. A JSON reader also takes the field cases, built from its own document: each field missing, each object `{}`, and each field, and each list's first item, holding a value of another type. A missing field or an empty object may end in an acceptance, since whether a field is required is the reader's own contract; a value of another type ends in a refusal unless the reader documents taking it, as one whose fields it never reads or one that returns the document whole for its caller to read by kind, since a reader that answers past a shape it does not know answers on what it never read. None ends in an escaped `KeyError`, `TypeError`, or traceback. A recursive parser of such input carries an explicit depth bound, ejryan89-skill-core's `nesting_depth.deeper`, and ends input nested past it in its own refusal. A reader that fails a case today is listed in `tests/malformed_input/known_failures.json` with the open issue that fixes it, never marked as an expected failure: the suite fails a listed case that passes and an unlisted one that fails, so the list only shrinks, and `tests/validation/known_failures.py` holds each entry to its issue and refuses a pull request whose title or body closes an issue an entry or `PENDING` still names, by `#<number>`, by this repository's `<owner>/<repo>#<number>`, by `GH-<number>`, or by the issue's URL. A reader not yet in a table is named in `PENDING` in `tests/malformed_input/readers.py` with the open issue whose pull request adds it, a literal dict the module assigns once and names nowhere else but its `__all__`, so the table read without running it is the one it runs with, which `tests/known_failure_issues.py` holds to being an open issue, never a pull request, as it holds each entry's. `tests/malformed_input/reader_scan.py` finds, by reading the code, every function of `tools/`, `deployer/`, `tests/validation/`, and a skill's or repository skill's `scripts/` that calls a shared reader (`json_reader.loads`, `raw_decode`, or `read_file`, `frontmatter.read`, `parse`, `split`, or `Frontmatter`, or `xml_reader.read_xml`, on its module or by a name imported from it), and the suite fails one that no table holds, that no held reader of its own module reaches through the module's own functions or a module-level table of them, that `PENDING` does not name, and that `NOT_READERS` in the same module does not name with why it is no reader, as a function that reads only what the same run just wrote, the repository's own committed text, or text a held reader of another module passes it; and it fails a `PENDING` or `NOT_READERS` name the scan does not find so, and a name in both or in a table and `NOT_READERS`, so a reader added without an entry fails validation.
- Hold every entry point to its refusals under environment faults. `tests/malformed_input/test_faults.py` finds the entry points as `tests/validation/exit_tables.py` does, by reading the code, and each argparse subcommand of one, and fails one that its area's driver table, `tests/malformed_input/faults_*.py`, neither drives nor names in its `NOT_RUN` with the reason the harness cannot drive it, so an entry point or command joins a table in the pull request that adds it. A driver (`tests/malformed_input/fault_table.py`) gives the command's arguments in a throwaway fixture, with its home, its work folder, and a committed copy of this checkout for a command that reads the repository it lies in; the files it reads; whether it runs git or gh; and the outputs it writes. The suites `tests/malformed_input/test_faults_<group>.py`, one per group of faults so each runs on a leg of its own, run every driver through `tests/malformed_input/fault_check.py`, and `tests/malformed_input/fault_runner.py` runs the command as its own program under one fault at a time: each file it reads unreadable, a directory, missing, a symbolic link to nothing, or with a stat that raises `PermissionError` and `os.path` presence checks that answer `False`, and every git command exiting 128 or timing out and every gh command failing, through the shared clients' runners; a member of a record of another type is the content corpus's. The runner stops a run, past any handler, that starts a program other than git or the process probe `/bin/ps` (`PROBE_PROGRAMS` in `tests/malformed_input/fault_runner.py`), opens a network connection, or writes outside the temporary folder and the runtime folder `private_folder.base()` names, where a script keeps its state across runs, or inside this checkout, which it never writes in even where the temporary folder holds it, as it does in the mutation gate's throwaway worktrees. Each run must reach its fault and end with a nonzero code its exit table names, no traceback, output that names what failed (git's reason, the time limit, gh's answer, or the file's name) on a line that is its refusal, a `FAILED` line, one led by an upper-case word its docstring names, such as `ERROR`, or, at exit 2, argparse's usage error, which a remedy line may follow, as the deployer's does, and its home, work folder, and outputs as it found them. A link to nothing, which `tests/malformed_input/test_faults_link.py` runs on every platform but Windows, reads as the file missing: where the command refuses a missing file it is held to that refusal, never naming the link as another kind, and where `not_run` names the missing fault, so the command reads a missing file as an answer, it is held only to an exit its table names and no traceback, unless the driver's `handed_to_writer` names the input as one the command hands to a writer, which must refuse the link; no run may create the file the link leads to. A driver names a fault it does not run, in its `not_run`, only where the fault cannot apply or the contract makes it its empty case. A run whose refusal is a line of another form is named in its driver's `refusal_gaps`, a literal dict, with the open issue that gives it a refusal line, as `#<number> <what it lacks>`: it is held to every other check, and fails once its refusal takes a form above, so the gaps only shrink, and its issue is held open, and a pull request that closes it refused, as a known failure's is. A shipped skill's command that deletes, renames, or rewrites several files, or one in place, lists them in its driver's `changes`, in the order it changes them: `tests/malformed_input/test_faults_unchangeable.py` makes each of them but the first, or the one file a command that changes one lists, read-only, one at a time, or, on Linux and macOS, puts it in a read-only folder, and `test_faults_directory.py` puts a directory in its place, and each run is held as above, the read-only file itself compared too, so a command that changes a file before it checks a later one fails; a command whose docstring refuses such a file alone and changes the rest, as `csharp_layout.py check --fix` does, names the fault in `refused_alone`, and is held to that file as it found it, a refusal naming it, and no `FAILED` line. A run with no fault must change every file `changes` lists. `tests/malformed_input/test_change_places.py` reads, through `tests/malformed_input/change_scan.py`, every function of a shipped skill's scripts that calls a change step, such as `replace_text`, `atomic_write_json`, `unlink`, or `rmtree`, and fails one its `HELD` table does not hold to such a driver's command and its `NOT_HELD` table does not name with why it changes no file of the user's, such as a file of the review run's own or a throwaway one, so a script that starts changing files through one of those steps is listed in the pull request that makes it. A change a program the script starts makes, such as dotnet format, git, or a shell script, is no call the scan reads, and neither is a Bash or PowerShell script: its `STARTED` table names each command that changes files that way, with why the harness does not drive it, a stated limit. A stated limit: a command that changes a file only after gh answers, as `github-activity-report`'s `--history`, `review-prs`' `enumerate`, and `update-pr-dashboard`'s `collect` do, lists no `changes`, since the harness never lets gh answer, and its `NOT_HELD` row says so.
- Hold every writer to its reader in a round trip. Code that saves a plan, a record, a configuration, or another document a later step or program reads takes a test in `tests/malformed_input/test_round_trip.py`, or in a suite of its own beside it when it needs a fixture of its own, as repo-cleanup's needs git, in the pull request that adds the pair. The test builds documents with the writer's own code over the edge values in `tests/malformed_input/edge_values.py` that the field's source can produce (text that is empty, blank, only Unicode whitespace, non-ASCII, or long, names and repository paths of each such kind, and lists of none, one, and several), and holds each to one of two outcomes: the writer refuses the value before it writes anything, or the reader accepts the document and returns what was written. A writer that saves what its own reader refuses fails, as a sweep that saved a plan naming a branch of Unicode whitespace once did.
- Drive every catch of a refused write. A place that catches ejryan89-skill-core's `json_writer` refusal, `JsonWriteRefused` or its `CONTENT_ERRORS`, in an `except` clause, a `contextlib.suppress`, or a module-level tuple of the errors an entry point ends as a `FAILED` line, takes a row in `REFUSALS` in `tests/malformed_input/test_write_refusals.py` in the pull request that adds it. The row names the step inside the handler that it makes refuse, `json_writer.dumps` where the place calls it directly and otherwise the call in the `try` that reaches it, how it drives the place, and the outcome it must end with, as a literal: the exit code and the lines an entry point prints, the error a converting function raises, or what a place that goes on past the refusal, as a `contextlib.suppress` does, returns or leaves behind. A row whose place writes again past the refusal, as a fallback does, refuses the step's first call alone. `tests/malformed_input/refusal_scan.py` finds every such place by reading the code, and the suite fails a place with no row, a row whose place it no longer finds, and a row whose step the place never called.
5. Add failure cases for any new parsing, path, or execution behavior. A regex, substring, or parser that reads another program's output, a runtime's, git's, GitHub CLI's, or a changelog's, is tested against that program's real output, captured under `tests/fixtures/captured-output/` with its provenance in that folder's `provenance.json`: the version of each runtime, or of `gh` or `git`, whose output it holds, the date, and how it was captured, the command or page it came from and what was cut or replaced. A sample names no machine's paths, the throwaway folder written `<temp>` and the profile folder `<home>`, no token or email address, no account but a public GitHub login, and no machine or internal name; `tests/tools/test_captured_samples.py` holds that every sample has its provenance, names no profile, home, token, or email address. A shape the reader does not know is reported as unknown, as a refusal or a reason that names what it could not read, never as a confident verdict such as a skill missing or a script that never ran. The weekly `runtime-changelogs.yml` and `runtime-command-lines.yml` runs list as `SAMPLE_BEHIND` each sample whose runtime has moved past its recorded version, so it is captured again rather than left to age; no watch reads `gh`'s or `git`'s releases, so a sample of their output is captured again in the pull request that changes its reader. A hand-written reader of another program's syntax is held to that program's own parser on every fixture, as `tests/tools/bash_agreement.py` holds the hub guard's Bash reader to `bash -n`, and a hand-written reader of another program's options to what that program does with them, as `tests/tools/test_command_wrapper_catalogues.py` checks the installed `env`, `nice`, `nohup`, `stdbuf`, `timeout`, and `xargs`, and the installed BSD builds of `chroot` and `time` on macOS. The suite holds other wrappers and other builds of `chroot` and `time` to their checked-in catalogues alone. A guard, gate, verdict, count, or measurement also has a test in which its evidence never existed: no log, no manifest, no report file, an empty set to iterate, or a path that is missing or cannot be read. That test, in the guard's own suite, asserts a refusal, `INCONCLUSIVE`, or a named "could not measure", never a pass or an empty success, so it fails if the guard is changed to pass on absence.
6. Run the local checks the change touches; continuous integration runs the full sequence. For a skill's files those are the skill's own suites, one at a time, as in `python -B -m pytest skills/<name>/scripts/test_<module>.py`, the deployer's rendering suite, `tests/deployer/test_rendering_locking.py`, for a shipped skill, each new regression test with the fix reverted, ruff and mypy on the changed scripts, and, before the pull request, the title and body checks. "Validation" in `docs/implementing-changes.md` gives the commands, says when the optional `--changed` run earns its place, and when a full local run is warranted.
7. If debugging a failure, run the affected Bash, ShellCheck, PSScriptAnalyzer, or Python command directly.
8. When the change touches how the skill names its own files, its `allowed-tools`, its runtime adapter, or its agents, run the `runtime-canary` repository skill. `tools/runtime_canary.py` deploys into a throwaway home with `deploy.py --canary-home`, starts Claude Code, Codex, and Copilot CLI there, and reports whether each found the skill and ran its script from the deployed copy. Each run calls a model, so it never runs inside validation; record its result in the pull request.