agentic-setup
/agentic-setup
Sets up or upgrades a repository for AI coding agents (Claude Code, Codex, Cursor) with current best practices — AGENTS.md as an index, topic docs, a decision log, shared skills, PR-template hooks, CI with required checks, branch protection and deploy-from-main. Use when the user asks to "set up the repo for agents", "add AGENTS.md", "make this repo agent-ready", bootstrap a new repo, or audit/upgrade an existing agent setup.
- Author
- hustyladislav ↗
- Repository
- agentic-setup ↗
- Licence
- MIT
- Last repository change
- 02.11.2026
Assessment and security
- Files in this package
- 24
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 02.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: assets/claude/hooks/pr-body-check.sh, assets/claude/hooks/pr-body-refresh.sh
What it does and when to use it
Sets up or upgrades a repository for AI coding agents (Claude Code, Codex, Cursor) with current best practices — AGENTS.md as an index, topic docs, a decision log, shared skills, PR-template hooks, CI with required checks, branch protection and deploy-from-main. Use when the user asks to "set up the repo for agents", "add AGENTS.md", "make this repo agent-ready", bootstrap a new repo, or audit/upgrade an existing agent setup.
Triggers from the description
Original author description
Sets up or upgrades a repository for AI coding agents (Claude Code, Codex, Cursor) with current best practices — AGENTS.md as an index, topic docs, a decision log, shared skills, PR-template hooks, CI with required checks, branch protection and deploy-from-main. Use when the user asks to "set up the repo for agents", "add AGENTS.md", "make this repo agent-ready", bootstrap a new repo, or audit/upgrade an existing agent setup.
How it works
- 0. New repository? Bootstrap first
- 1. Inspect before writing
- 2. Refresh "latest" — never assume
- 3. Install, adapting as you go
- 4. Repository settings — ask first
- 5. Verify and hand off
SKILL.md preview
---
name: agentic-setup
description: Sets up or upgrades a repository for AI coding agents (Claude Code, Codex, Cursor) with current best practices — AGENTS.md as an index, topic docs, a decision log, shared skills, PR-template hooks, CI with required checks, branch protection and deploy-from-main. Use when the user asks to "set up the repo for agents", "add AGENTS.md", "make this repo agent-ready", bootstrap a new repo, or audit/upgrade an existing agent setup.
---
# Agentic repo setup
Installs a proven agent setup into the current repository and **adapts** it to the repo's real stack.
Never overwrite the user's existing instructions blindly — merge them. Files to copy live in
[`assets/`](assets/) (stored without leading dots; the target path is given below). Why each piece exists:
[`references/practices.md`](references/practices.md).
Work on a branch named for the task (e.g. `agentic-setup`). Prefer writing files with your file-editing tool over
shell here-docs (some sandboxes refuse here-docs next to `sed`/`gh`).
## 0. New repository? Bootstrap first
If there is no repo yet (empty folder, or the user asks for a new project):
- Ask for the name, visibility and stack only if they can't be inferred; default to private.
- Scaffold the app with its framework's **current** official starter (check its docs/CLI version first, step 2), set
`packageManager`, `.nvmrc` with the current Node LTS, and scripts `dev`, `build`, `test`, `e2e` (if any) and one
pre-push bundle (`check`: typecheck + lint + unit).
- `git init -b main`, first commit, then `gh repo create <owner>/<name> --private --source . --push` — creating a
remote is outward-facing: confirm the owner and visibility with the user first.
- Then run steps 1–5 below on it (commit straight to `main` for this first setup; PRs from then on).
## 1. Inspect before writing
Read, don't guess. Record findings in a short list you will show the user:
- Package manager and runtime (`packageManager`, lockfiles, `.nvmrc`), language(s) and **versions** (TypeScript major!),
framework, test runners, linter/formatter and what it scans.
- Monorepo? Where apps, shared UI and config live (`apps/*`, `packages/*`, `components.json` location).
- Exact script names for typecheck / lint / unit / e2e / build / dev and the **one "verify" command** that runs the
pre-push bundle (often `check`, `verify` or `ci`). Use these names everywhere below — never invent `pnpm verify`.
- Existing agent files: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursor/rules`, `.github/copilot-instructions.md`,
`.claude/`, `.agents/skills`, `skills-lock.json`. Existing docs (`docs/*.md`, ARCHITECTURE, DOMAIN, ADRs).
- CI (`.github/workflows`: job names, which are required, action versions, where security scans live), hosting/deploy
config (`vercel.json` incl. `ignoreCommand`, `netlify.toml`, Dockerfile…), database/migration tool.
- UI stack (Tailwind? shadcn, Radix or Base UI?), user-facing language, auth/tenancy model, anything touching money or real people.
- **Kind of repo.** No app (a skills/docs/config package, a library)? Then the app-shaped parts below don't apply:
skip `ui.md`, `environment.md`, `security.md`, `domain.md`, `launch.json`, the LSP plugin and the `e2e`/deploy bits, and write
the repo's own checks (a validation script) as the `check` job. Say in the PR which pieces you skipped and why.
## 2. Refresh "latest" — never assume
Your training data is outdated by definition. Before writing versions or config:
- Tool versions you reference: `npm view <pkg> version` (read-only lookups via `npm`/`npx` are fine even in pnpm repos).
- GitHub Actions: `gh api repos/<owner>/<action>/releases/latest --jq .tag_name` — **re-pin every `uses:` in the CI
asset**; keep the repo's own pins when they are newer.
- Current Claude Code settings/hooks/skills/plugin schema and Codex `AGENTS.md`/skills behaviour from the official docs;
adjust the assets if a field was renamed or a better mechanism exists.
- Skills CLI: `npm view skills version`.
## 3. Install, adapting as you go
| Asset | Target | Adapt |
|---|---|---|
| `AGENTS.md` | `AGENTS.md` | Fill every `<…>` from step 1 with the repo's real commands (replace `pnpm verify` with the actual verify script); delete "Before you touch…" lines whose topic file you don't create; merge existing instructions into a section or topic file (nothing lost). Keep it an index (< ~120 lines). |
| `CLAUDE.md` | `CLAUDE.md` | `@AGENTS.md` only. If a `CLAUDE.md` exists, move its content into `AGENTS.md`/topic files first. |
| `docs/agents/*.md` | `docs/agents/` | Keep `delivery.md` (trim deploy/DB lines the repo doesn't have), `domain.md`; adapt `environment.md`, `security.md`; `ui.md` only with a UI (use the repo's real paths — monorepos keep primitives in e.g. `packages/ui`). Add a topic file for any repo-wide rule that doesn't fit (e.g. `api.md`). Env var **names** only, never values. A glossary may live inline in `domain.md` instead of `GLOSSARY.md`. |
| `docs/decisions/*` | `docs/decisions/` | Set the date in `0001`. Back-fill entries for decisions already visible in the code that pass the README bar. When git history doesn't record the alternatives, keep "Rejected" thin and mark it "to confirm by the owner" — never invent reasons. |
| `claude/settings.json` | `.claude/settings.json` | Merge with an existing file. Fill `autoMode.environment` with the real repo/host/DB. Keep the PR hooks. |
| `claude/hooks/*` | `.claude/hooks/` | `chmod +x`. They need `jq` and `gh`. |
| `claude/marketplace/…` | `.claude/marketplace/` | TypeScript repos only. Rename `claude-plugin/` → `.claude-plugin/` (both levels), `lsp.json` → `.lsp.json`. TypeScript ≤ 6: `typescript-language-server --stdio` (add it as a devDependency). TypeScript ≥ 7 (native, no `tsserver`): command `node_modules/.bin/tsc`, args `["--lsp", "--stdio"]`. |
| `claude/launch.json` | `.claude/launch.json` | Real dev command and port (the app's package in a monorepo). |
| `github/*` | `.github/` | See "Merging CI" below. Drop `actions/pnpm` if not pnpm. |
| `gitignore` | `.gitignore` | Append missing lines only. |
**Existing docs.** Link still-valid docs (architecture, domain rules, design system, security audits) from the matching
topic file so they stay live; leave the rest as archive. Fix lines that contradict decisions you just recorded (e.g. a
doc promising preview deployments when previews are off).
**Merging CI.** Keep existing job names, required checks and newer action pins. Add only what is missing:
- the docs-only fast path to **every required job** (`check`, `e2e`, …), so a docs/agent-config PR still reports
them as passing; the path set is Markdown, `.claude/**`, `.agents/**`, `skills-lock.json`. Use the portable scope
test from the asset (`grep -vE … | grep -q .`, works with BSD and GNU grep). Skip it when Markdown *is* the product
(skills/docs repos): there every PR runs the checks;
- `gitleaks` only if no workflow runs it yet (it often lives in a `security.yml`);
- the composite pnpm action only if pnpm setup is slow or flaky — otherwise keep `pnpm/action-setup`.
Mirror the same skip in the host's deploy-ignore rule (e.g. Vercel `ignoreCommand`) so agent-config commits don't
burn deploy quota.
**Ignore lists.** Add `.agents/` and `.claude/` to the linter/formatter ignore (Biome `files.includes`/`ignore`,
ESLint/oxlint ignores, Prettier) and to typecheck/test globs if they would scan them — installed third-party skills
are not your code.
**Skills** — install from their sources with the skills CLI (it writes them into `.agents/skills` and the agent's own
directory and pins them in `skills-lock.json`, so `skills update` keeps them current). Use the repo's package runner
(`pnpm dlx` / `npx` / `bunx`), one agent per call (`-a claude-code`, then again with `-a codex`) — several `-a` flags
at once fail, and without `-a` it may prompt:
- always: `skills add hustyladislav/agentic-setup -s pr -y` and `skills add mattpocock/skills -s writing-for-agents -y`
- with a UI: `skills add anthropics/skills -s frontend-design -y`; with shadcn: `skills add shadcn/ui -s shadcn -y`
(without `-s` it also installs migration skills you may not want)
- others only if the repo clearly uses the tool (list a repo's skills with `skills add <repo> -l`).
An install can print "Installation failed" and still have worked, or fail transiently: check `skills-lock.json` and
the `SKILL.md` files, retry once. Commit the lockfile and installed files so clones work offline. The managed `pr`
skill refers to "the verify command" generically — don't edit it (it would drift from its source); the repo-specific
command lives in `AGENTS.md`.
## 4. Repository settings — ask first
These change shared/outward-facing state, so confirm with the user before running — unless the request already asks
for them (e.g. the owner says "apply it"). Skip what is already set:
- Branch protection on `main`: required checks `check`, `gitleaks` (+ `e2e` if it exists), strict up-to-date, no required
reviews for a solo owner, `enforce_admins` off — `gh api -X PUT repos/<o>/<r>/branches/main/protection --input -` with
`{"required_status_checks":{"strict":true,"contexts":["check","gitleaks"]},"enforce_admins":false,"required_pull_request_reviews":null,"restrictions":null}`.
- Allow auto-merge and delete merged branches: `gh api -X PATCH repos/<o>/<r> -F allow_auto_merge=true -F delete_branch_on_merge=true`.
- Hosting: production deploys from `main` via Git integration; turn off per-branch previews if the plan has a deploy quota.
## 5. Verify and hand off
- JSON files parse (`jq . .claude/settings.json`); hooks are executable; `.claude/skills/pr/SKILL.md` resolves.
- Simulate the PR hook: `echo '{"tool_input":{"command":"gh pr create --body x"}}' | .claude/hooks/pr-body-check.sh` must deny.
- Run the repo's verify command, and e2e if you touched CI or scripts. Restore files that tests rewrite as a side
effect (generated examples, snapshots) before committing.
- Open a PR with the `pr` skill (keep any attribution footer the session asks for). In the summary, list what was
installed, adapted and merged from existing files, which `<…>`/"to confirm" items still need the owner, and what you
did not verify.
Files in this package (24)
- SKILL.md 10 KB
- assets/AGENTS.md 5 KB
- assets/CLAUDE.md 1 KB
- assets/gitignore 1 KB
- assets/claude/launch.json 1 KB
- assets/claude/settings.json 1 KB
- assets/claude/hooks/pr-body-check.sh 1 KB
- assets/claude/hooks/pr-body-refresh.sh 1 KB
- assets/claude/marketplace/claude-plugin/marketplace.json 1 KB
- assets/claude/marketplace/typescript-lsp/lsp.json 1 KB
- assets/claude/marketplace/typescript-lsp/claude-plugin/plugin.json 1 KB
- assets/docs/agents/delivery.md 3 KB
- assets/docs/agents/domain.md 2 KB
- assets/docs/agents/environment.md 1 KB
- assets/docs/agents/security.md 1 KB
- assets/docs/agents/ui.md 1 KB
- assets/docs/decisions/0001-agent-first-repo.md 1 KB
- assets/docs/decisions/README.md 2 KB
- assets/docs/decisions/examples.md 2 KB
- assets/github/dependabot.yml 1 KB
- assets/github/pull_request_template.md 1 KB
- assets/github/actions/pnpm/action.yml 1 KB
- assets/github/workflows/ci.yml 3 KB
- references/practices.md 3 KB
Versions
The database has no other skills named agentic-setup.
Database snapshot: 13.11.2026 · package version ed3056949085 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100create-agents-md
Use when the user asks to create AGENTS.md, generate agent instructions for a repository, set up CLAUDE.md, or wants to document project conventions for coding agents. Also use when user says "create agents md", "setup agent docs", or "initialize repo for agents". - 90repo-setup
Set up or audit a repo's working baseline for people and agents. Public AGENTS.md plus a gitignored AGENTS.local.md, ignore rules, one verify command that CI also runs, and a worktree setup script. Migrates an existing CLAUDE.md without losing a line. Use for "set up this repo… - 95agents-contributing-setup-repo
Set up a repository to receive help from AI agents under the AGENTS-CONTRIBUTING spec. Use when a repository owner asks to accept agent contributions, add AGENTS-CONTRIBUTING.md, or open their repo to donated AI capacity. - 100agent-experience
Make a code repository agent-ready with state-of-the-art AX (Agent Experience): audit and set up AGENTS.md / CLAUDE.md and agent docs, wire verification sensors with self-correction messages, and build docs-as-memory (architecture docs, ADRs, exec plans). Use when the user wants… - 100cc-stack-setup
Deploy or audit the full 5-layer Claude Code stack (CLAUDE.md + skills + hooks + agents + memory) in a repository. Use this skill whenever the user runs /cc-setup, asks to "set up Claude Code on this repo", "configure a new repo for Claude", "audit my Claude Code setup",… - 90setup-agent-md
Use when a repository needs one canonical instruction file shared by coding agents, when AGENTS.md or CLAUDE.md is missing, or when their guidance has diverged.