Skip to content
Back to skills

Playbook Setup

ASecurity

Use once per machine or project to configure the agent playbook - when ~/.agents/playbook.conf is missing, the user asks to set it up or reconfigure it, or the harness, models or test commands changed. Not for ordinary coding.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 16, 2026
ai-agentsrustgoshellbashgit

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 17, 2026

npx -y skills add NLMDang22520190/agent-playbook --skill playbook-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Playbook Setup?

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

Security grade badge for Playbook Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nlmdang22520190-playbook-setup/badge)](https://www.skillsdirectory.com/skills/nlmdang22520190-playbook-setup)

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: playbook-setup
description: Use once per machine or project to configure the agent playbook - when ~/.agents/playbook.conf is missing, the user asks to set it up or reconfigure it, or the harness, models or test commands changed. Not for ordinary coding.
---

# Playbook setup

**Why:** the other skills run real commands and pick real capabilities; guessed values make
gates run the wrong thing silently.

Goal: one short round of questions that produces `~/.agents/playbook.conf` (global) and, inside a
project, `<project>/.agents/playbook.conf`.

Scripts live at `~/.agents/playbook/scripts/`. If that directory is missing, stop and tell the
user to run `install.sh install` from their agent-playbook repo; do not improvise an installation.

## Steps

1. **Current state.** Run `bash ~/.agents/playbook/scripts/conf.sh list`. If a config exists and
   the user did not ask to reconfigure, report it and stop.

2. **Identify the harness from your own tools.** Use the tools you actually have, not the
   model name. Tool names change, so these are hints:

   | Harness | Typical signals | Sub-agents |
   |---|---|---|
   | Claude Code | `Skill`, `Agent` (or `Task`), `AskUserQuestion` tools; `~/.claude/` | native: the `Agent`/`Task` tool |
   | Codex CLI | shell + `apply_patch`; `~/.codex/` | only when the multi-agent feature is enabled in `~/.codex/config.toml` (check `codex --help` / Codex docs for the current flag name); otherwise manual |
   | OpenCode | `task`, `skill`, `question` tools; `~/.config/opencode/` | native: the `task` tool |
   | Other | read the harness docs | ask the user |

   State your conclusion. `bash ~/.agents/playbook/scripts/conf.sh check-harness` warns when the stored `harness` differs from the running one.

   On Windows, `bash --version` must say `msys`/`mingw` (Git Bash); `C:\Windows\System32\bash.exe` is
   the WSL launcher (wrong home): call Git Bash by its full path (usually
   `"C:\Program Files\Git\bin\bash.exe"`) and say so in the summary.

3. **Inspect the project before asking** (skip outside a project):
   - test/lint/typecheck commands: `package.json` scripts, `Makefile`, `justfile`, `pyproject.toml`
     / `tox.ini` / `noxfile.py`, `go.mod`, `Cargo.toml`, `build.gradle*` / `pom.xml`, `composer.json`,
     `*.csproj`, CI workflow files (they show what CI really runs);
   - whether it is a git repo (role gates need git);
   - existing `AGENTS.md`, `CLAUDE.md`, `.agents/LEARNINGS.md`;
   - where the tests live (to confirm the test-path pattern; see `references/questions.md`).
   Present every detection as a proposed default, with the file it came from.

4. **Ask once, batched.** Use `references/questions.md`: at most 8 questions, each with a
   default and why it matters. Use the harness's question tool when it has one
   (Claude Code `AskUserQuestion`, OpenCode `question`); otherwise send one numbered message and
   accept "defaults" as an answer. Skip questions inspection already answered. The humanizer suggestion is an optional extra line in that same message, outside the 8.
   Claude Code only: an optional line outside the 8 offers the hooks (default on): guard warns on irreversible
   actions, blocking them headless; learnings adds the lessons of trusted projects at session start. Yes:
   `bash ~/.agents/playbook/scripts/claude-hooks.sh install` (into `~/.claude/settings.json`, backup first;
   `claude-hooks.sh uninstall` removes them); no: `conf.sh set hooks_optout yes --global`.
   For learnings, offer once (default no) to trust the current project:
   `bash ~/.agents/playbook/scripts/learn.sh trust`, run on a yes. Non-interactive: installs the hooks, never trusts a project.

   **Models per role** (question 4): list the models the harness reports (Claude Code: the model
   choices of the `Agent` tool and the ids you know; OpenCode: run `opencode models`; Codex: its
   configured models in `~/.codex/config.toml`). Rank only from what the harness or the
   user says; never call a model "strongest" without that basis. Print a recommendation table:
   reviewer = strongest available or another vendor, implementer = mid-tier, tester = mid- or
   low-tier, each with a reason and its relative cost. Label any sample table "example". The user
   accepts or picks others. Store each pick with
   `conf.sh set model_<role>_<harness> <model> --global` (roles: tester, implementer, reviewer, plus the optional `spec_reviewer` for the Full-weight spec reviewer sub-agent (falls back to the reviewer), `reviewer_light` for diffs that only touch tests, docs or skill text and `mechanical` for release prep, counts and formatting).
   Never write generic `model_<role>` keys: they apply to every harness on this machine. Also
   never write keys not documented in step 6.

5. **Non-interactive run** (CI, `claude -p`, `codex exec`, `opencode run`, or no reply possible):
   do not block. Write the defaults, add `setup=defaults-noninteractive`, and list every
   assumption in your final message.

6. **Write the values.**
   ```bash
   C=~/.agents/playbook/scripts/conf.sh
   bash $C set harness claude --global            # per-machine values: --global
   bash $C set test_cmd "pnpm test" --project     # per-project values: --project
   bash $C set setup done --global
   ```
   Global keys: `language`, `harness`, `subagents`, per-harness `model_<role>_<harness>` (including `model_spec_reviewer_<harness>`, `model_reviewer_light_<harness>` and `model_mechanical_<harness>`)
   (the generic `model_tester`, `model_implementer`, `model_reviewer`, `model_spec_reviewer`, `model_reviewer_light`, `model_mechanical` are legacy: read as a fallback, not written), `autonomy`, `humanizer` (ask | always | never, default ask), `hooks_optout` (yes/no; no = hooks on), `confirm_models` (always | on-change | never, default on-change), `feedback_repo`, `feedback_interval_days`, `setup`. Project keys: `test_cmd`, `lint_cmd`,
   `typecheck_cmd`, `test_path_regex` (only if the default is wrong), `test_infra_regex` (test runners and
   shared helpers that get their own role; empty = off), `learnings_path`. `leak_literals` (comma-separated private strings, such as an email address or private repo name) and `leak_patterns` (ERE) work in both files; `leak-check.sh` reads them.

7. **Verify and report.**
   - `bash $C list`, output pasted.
   - `bash ~/.agents/playbook/scripts/role-model.sh check`: it must say "no generic model keys";
     otherwise name the generic keys and offer to move them to per-harness keys.
   - Check the always-on block: look for the `<!-- BEGIN agent-playbook` line in this harness's global file
     (`~/.claude/CLAUDE.md`, `~/.codex/AGENTS.md` or `~/.config/opencode/AGENTS.md`, falling back to
     `~/.claude/CLAUDE.md`). If missing, recommend `install.sh doctor`.
   - For Codex: if `~/.codex/AGENTS.override.md` is non-empty, warn that it shadows `AGENTS.md`.

8. **Project bootstrap (ask first).** Offer:
   `bash ~/.agents/playbook/scripts/learn.sh init --link-agents` (creates `.agents/LEARNINGS.md`,
   ignores `.agents/handoff/`, and adds a pointer to `AGENTS.md`). Without the learnings hook (not installed, or
   Codex/OpenCode), the pointer is how agents find the file. If the project has no
   `CLAUDE.md` and the user uses Claude Code, add `--link-claude` (creates `CLAUDE.md` containing `@AGENTS.md`).

   Also offer the leak guard: ask for private strings the public repos must never contain and store them with
   `conf.sh set leak_literals "you@example.com,private-repo-name" --global`; then offer
   `bash ~/.agents/playbook/scripts/leak-check.sh install-hooks` in the project (pre-commit and pre-push hooks that
   refuse tokens, keys and those strings in added lines). An existing user hook is left alone. Linked git worktrees do not see a project conf that is git-excluded,
   so a `leak_literals` kept only in the project conf is not read there: keep private literals in the global conf.

9. **Summary** in at most 10 lines: what was written where, the assumptions, and how to change
   them later.

## Do not
- install packages, change harness settings or edit global instruction files without consent;
- run long test suites during setup (checking the command exists is enough).

Files in this skill

  • SKILL.md7.8 KB
  • references/questions.md4.5 KB

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.