Skip to content
Back to skills

Ci And Agent Config

ASecurity

Checklist for a change to `.github/workflows/`, a hook in `tools/hooks-rs`, `.claude/settings.json` or a shell script: the parser cases, the macOS against ubuntu gotchas and the live-run rule that the shell check cannot see. Use when editing one of them.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 28, 2026
ai-agentsgoshellbashexpressgit

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add AlexisBalayre/claude-code-config --skill ci-and-agent-config --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ci And Agent Config?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ci And Agent Config
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexisbalayre-ci-and-agent-config/badge)](https://www.skillsdirectory.com/skills/alexisbalayre-ci-and-agent-config)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ci-and-agent-config
description: Checklist for a change to `.github/workflows/`, a hook in `tools/hooks-rs`, `.claude/settings.json` or a shell script: the parser cases, the macOS against ubuntu gotchas and the live-run rule that the shell check cannot see. Use when editing one of them.
---

# CI and agent-config changes

Follow-up fixes on CI, hook and shell PRs fall into three classes: a command shape the parser missed, a macOS against ubuntu difference, and runner state only a live run shows. `.claude/bin/claude-hooks verify` runs `check-agent-config`: `bash -n` on the changed `*.sh` files, the conventions docs against their rule symlinks and the plugin check; the `Quality` workflow runs it again on every PR, on ubuntu. This skill covers the three classes that check cannot see. Work through each section the change touches.

## 1. Test case first

A hook that reads a command line (`push-gate`) gets a red test case in `tools/hooks-rs/tests/` for each shape the change can meet, before the fix:

- quoting: the word bare, single-quoted, double-quoted, nested, and backslash-escaped;
- chains: `&&`, `||`, `;`, a pipe, a newline, a backslash continuation, a subshell;
- prefixes: `git -C <dir>` and `git -c key=value`, repeated, before the subcommand;
- expansions: `$VAR`, `${VAR}`, `$(...)`, backticks, `{a,b}` braces;
- option forms: combined short flags (`-fu`), abbreviated long ones (`--forc`), `--opt=value` against `--opt value`;
- text that only mentions the command: a heredoc, a commit message, an `echo` argument.

`claude-hooks pre-push` reads git's ref lines on stdin instead: it gets a case for each of several refs in one push, a branch delete, a tag and a new branch.

A new test is a file in `tools/hooks-rs/tests/`, which `cargo test` finds, a shell script's too: `setup.rs` runs `setup.sh` against a fake `curl` and `cargo`. Its fixtures come from `tests/common`: a `TempDir` removed on drop, and `hook`, `git` and `git_command`, which empty the environment and turn the user's git config off. The two git helpers also set a fixed identity, so fixture commits never reach the user's signing or hooks.

Done when every shape on the list the change can meet has a case that was red before the fix.

## 2. Portability

Workers run macOS: `/bin/bash` 3.2 and BSD tools. CI runs ubuntu: bash 5 and GNU tools, as the non-root `runner` user. Write each line for both, using the repo's existing answers:

- A `set -u` error inside `$((...))` exits 0 under bash 3.2: a script that must fail closed guards with `trap 'exit 1' EXIT`.
- File times: try GNU `stat -c` first, then BSD `stat -f`.
- macOS has no `timeout` and no `flock`: take turns with `.claude/bin/claude-hooks gate-lock <cmd>`.
- `jq` may be missing on a worker machine. A shell script that parses JSON keeps working without it.
- Root ignores permission bits, so a case that makes a path unwritable fails in a root container.

Done when every tool and builtin the change calls is on the safe side of this list, or its test passes on macOS and in the CI job.

## 3. Workflows

- A `${{ }}` expression holding PR, issue or comment text reaches `run:` only through `env:`, read as `"$VAR"`.
- `uses:` pins a full commit sha with the version as a trailing comment.
- A new job joins the `needs` of the job branch protection requires, when the workflow funnels its jobs into one; otherwise its failure never reaches the required check.
- A step that depends on runner state (an installed tool, a cache, an artifact id, a token's permissions, a fetched ref) gets a live run before review: the PR's own run, opened as a draft, or `workflow_dispatch`.

Done when the job log shows each changed step doing its work, rather than only a green tick.

## 4. Hooks and settings

Edit hooks in `tools/hooks-rs` in your worktree. `.claude/settings*.json` is the user's: the Edit and Write tools are denied on it, so hand the user the exact change. The user reviews the diff on the PR before merge. Change the tests in `tools/hooks-rs/tests/` with them, and the row of the hook table in `.claude/README.md` and the file `.claude/hooks/commands/<name>.md` whose behaviour the change moves; a new command also gets an index line in `.claude/hooks/README.md`.

Done when `.claude/bin/claude-hooks verify` passes and those docs match the new behaviour.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.