Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Ai Init

ASecurity

Survey an existing production codebase and build the .ai/ agentic engineering infrastructure around it — knowledge base, policies, risk tiers, workflows, agent contracts — then write an initial assessment. Read-only with respect to application code. Use on "set up agentic infrastructure", "analyse this project for AI work", "/ai-init", before the first /ai-task in a repository.

3 stars
0 votes
0 copies
0 views
Added 9/27/2026
ai-agentspythongophpbashdockertestinggitapidatabaseci/cd

Works with

claude codecliapimcp

Security Analysis

A100/100

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

Scanned 9/27/2026

$npx -y skills add vanssata/claude-agentic-sdlc-module --skill ai-init --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Init?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Ai Init
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vanssata-ai-init/badge)](https://www.skillsdirectory.com/skills/vanssata-ai-init)

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

Download with Pro
Files
SKILL.md
---
name: ai-init
description: Survey an existing production codebase and build the .ai/ agentic engineering infrastructure around it — knowledge base, policies, risk tiers, workflows, agent contracts — then write an initial assessment. Read-only with respect to application code. Use on "set up agentic infrastructure", "analyse this project for AI work", "/ai-init", before the first /ai-task in a repository.
argument-hint: [--survey light|full] [team/CI/tracker context, optional]
---

# /ai-init $ARGUMENTS

Build the agentic infrastructure for **an existing production project**. This is
not a greenfield setup: the repository already contains legacy code,
undocumented rules, historical workarounds and behaviour that customers depend
on right now.

The skill is the same under Claude Code and under Codex. Only the install root
differs, so resolve it once instead of hard-coding `~/.claude`:

```bash
for AI_HOME in "${CLAUDE_CONFIG_DIR:-$HOME/.claude}" "${CODEX_HOME:-$HOME/.codex}"; do
  [ -d "$AI_HOME/skills/ai-init" ] && break
done
```

Either copy of the scripts does the same thing — they operate on the project's
`.ai/` tree, not on the install — so which one resolves first does not matter.

## The rule for this entire skill

**Do not modify application code.** Not a rename, not a formatting fix, not a
"while I'm here". The only files this skill creates or edits are `.ai/**`, the
instruction file of each runtime in scope (`CLAUDE.md`, `AGENTS.md`, or both),
`.gitignore`, and (through the routing scaffold, if installed) `docs/sdlc/**`.
If you find problems — and you will — you document them. You do not fix them.

## Steps

### 1. Scaffold

Run the SDLC scaffold first, so `docs/sdlc/` and the runtime directory exist:

```bash
"$AI_HOME/hooks/project-scaffold.sh" "$PWD"
```

Then the agentic scaffold:

```bash
"$AI_HOME/skills/ai-init/scaffold-ai.sh" "$PWD"
```

Both take `--runtime auto|claude|codex|both`, and `auto` follows what the project
already declares (`CLAUDE.md`/`.claude/` → Claude, `AGENTS.md`/`.codex/` →
Codex), falling back to the runtime this copy was installed for. Pass `--runtime
both` when the repository is worked on from both, so one `.ai/` tree ends up with
two instruction files pointing at it.

Both are idempotent and never overwrite. Note which files they report creating.

If `.ai/project/overview.md` was **not** created, this project was already
initialised, and running `/ai-init` again means bringing it up to date: follow
`$AI_HOME/skills/project-update/SKILL.md` from step 1. When it is done, ask
whether the survey in `.ai/project/` should be refreshed as well; if not, stop
here. A refresh continues with step 2 below and must not overwrite a
`.ai/project/` file a human has edited without saying so first.

### 2. Detect the stack yourself

This is a handful of `ls` and `grep -n` calls, not a delegation. Look for:
`composer.json` (read `require` and `scripts`), `package.json`, `Makefile`,
`pyproject.toml`, `go.mod`, `docker-compose*.yml`, `Dockerfile`, `.github/workflows`,
`.gitlab-ci.yml`, `Jenkinsfile`, `Chart.yaml`, `charts/`, `argocd/`, `phpunit.xml*`,
`phpstan.neon*`, `psalm.xml`, `ecs.php`, `rector.php`, `.php-cs-fixer*`,
`playwright.config.*`, `cypress.config.*`, `sonar-project.properties`.

One command does the part of this that the sensors will need later — the lint
and type-check lines `testing.md` asks for. It proposes and runs nothing:

```bash
python3 "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/ai-task/sensors.py" --root . detect
```

Write what it proposes into the **Verification** block of
`.ai/policies/testing.md`, or write `none` where the project genuinely has no
such tool. A line left empty is read as "not written down yet" and keeps every
review — which is the safe reading, but it is not the same as saying there is
nothing to run.

For a Symfony or Sylius project also check, when present: `config/bundles.php`,
`config/packages/`, `src/Entity`, `src/Repository`, state machines and workflows,
Messenger transports and handlers, a command bus, event subscribers and
listeners, grids, form types and extensions, Twig templates and hooks, API
Platform resources, Sylius resources, payment methods, shipping, tax calculation,
promotions, channels, the customer/order/payment model, installed plugins,
custom state machines, and ERP, accounting or fiscal integrations.

### 3. One inventory pass, then a survey sized to what is already known

Run `ai-indexer` once for a repository-wide inventory: top-level layout, file
counts per area, the largest files, entry points, and a summary of recent commit
subjects. It is on the cheapest model precisely so this pass is free.

Then choose the survey. `$ARGUMENTS` may say `--survey light` or
`--survey full`; the default is **light**.

**light** — the default, for a developer who knows this project. Their knowledge
is the cheapest and most reliable source there is, so ask for it first: a
ten-minute brain dump of the entry points, the modules that matter, the
integrations, the business rules nobody wrote down, and the areas nobody dares
touch. Confirm every claim with `grep -n` and label it — **KNOWN FACT** with
`file:line` when the code agrees, **INFERENCE** when it does not quite. That
fills `project/overview.md`, `architecture.md`, `modules.md`, `integrations.md`,
`business-rules.md` and `glossary.md`. Then fan out exactly **two**
`ai-discovery` agents, in one message, on the areas where memory is least
reliable:

1. legacy, risks and code that looks unused — what is old, strange, or
   load-bearing by accident;
2. tests, CI/CD, data and configuration — what actually runs, the schema,
   migrations, queues, and how secrets are supplied (never their values).

**full** — for a codebase new to you, or a knowledge base a team will share.
Fan out `ai-discovery` agents **in parallel, in one message**, one per area,
each handed the slice of the inventory it needs so it does not glob the
repository itself:

1. architecture and entry points — routes, commands, consumers, cron, webhooks;
2. domain modules — entities, repositories, services, state machines, workflows;
3. dependencies and integrations — payment, ERP, accounting, fiscal, shipping,
   any external API, and how failures are handled;
4. business rules and legacy — the rules the code enforces, the areas that are
   old or strange, and code that looks unused;
5. tests, CI/CD and tooling — what runs, where, and what it actually checks;
6. data and configuration — schema, migrations, queues, caches, environment
   configuration and how secrets are supplied (never their values).

Either way the fan-out stays on the cheap tier. Do not raise it.

### 4. Synthesise into `.ai/project/`

Write the discovery output into the knowledge base, preserving every label
verbatim: **KNOWN FACT** with `file:line`, **INFERENCE** with what it rests on,
**UNKNOWN** with what would answer it, **RISK** with what could go wrong. Never
promote an inference to a fact while summarising.

Where documentation and code disagree, use the four-line form:

```
Documented behaviour:
Observed behaviour:
Evidence:
Risk:
```

Do not resolve the contradiction. Record it.

Fill the "project specifics" sections of `.ai/policies/coding.md`,
`testing.md`, `database.md`, `tooling.md` and `release.md` **only if those files
were created in step 1**. If they already existed, someone has edited them: leave them alone.

In `testing.md`, fill the **Verification** section: the three commands, and
two or three lines of what healthy output looks like.

- `verify_command` — the full fast suite, with the e2e group or tag **excluded**.
  Every `/ai-task` runs it once, after the last step, before reporting done.
- `step_test_command` — the same runner scoped to a path or a filter, so one
  implementation step can run its own tests and nothing else.
- `e2e_command` — the end-to-end suite, run once at the end of a task. Write
  `none` when the project has no such suite, so the next task stops looking.

Without them there is no feedback loop. Say which group, tag or directory marks
the e2e tests and how `verify_command` excludes them. Put the same commands
under `## Verification` in the project `CLAUDE.md`.

In `tooling.md`, fill **Project specifics**: which MCP servers this repository
enables for every task and why, which ones are deliberately off, and any tool a
task must ask for explicitly. The default is none — a server nobody can justify
in one line does not belong there. Check `.claude/settings.json` keeps
`"enableAllProjectMcpServers": false`, and that anything in a checked-in
`.mcp.json` is listed in `enabledMcpjsonServers` only if it earned it, in
`disabledMcpjsonServers` otherwise.

Set `pipeline_profile` in `risk-tiers.json`: `solo` (the default) when one
developer who knows the codebase will run the tasks — T0–T2 directly, the full
pipeline from T3 — `team` when several people or an unfamiliar codebase need
every stage delegated.

Adjust `.ai/policies/risk-tiers.json` to this project — the tier examples should
name this codebase's actual critical areas, not generic ones. If you change the
JSON, update `risk-tiers.md` and its `sha256` comment to match.

Then fill `docs/sdlc/constitution.md` from the survey. C1–C5 ship prefilled and
are not this project's to invent; C6 onwards are, one line each, drawn from what
the code and the tests already enforce — a rule nobody can point at in the
codebase is not a principle. Leave a slot empty rather than writing a platitude,
stay under fifteen, and show the list to the user for confirmation:
`render_instructions.py constitution docs/sdlc/constitution.md` checks the cap.

### 5. Write the initial assessment

`.ai/project/initial-assessment.md`, with these sections:

1. project overview; 2. architecture discovered; 3. important modules;
4. critical business areas; 5. legacy hotspots; 6. high-risk integrations;
7. test maturity; 8. CI/CD maturity; 9. security observations;
10. missing documentation; 11. areas agents should not modify casually;
12. recommended risk-tier customisations; 13. recommended model routing;
14. recommended next improvements.

Section 14 is a list of recommendations. **Do not implement any of them.**

This is synthesis a human reads, so write it in the main session. Do not delegate.

### 6. Dry walkthrough of the pipeline

Take the first task you would suggest and narrate it through the stages —
DISCOVERY, CONTEXT, IMPACT, RISK, PLAN, IMPLEMENTATION, TEST, ADVERSARIAL
REVIEW, SECURITY REVIEW, RELEASE REPORT, HUMAN APPROVAL — saying at each stage
which agent would run, at which model tier, and which gate applies, according to
`.ai/policies/risk-tiers.json`.

Do the same, in two or three lines each, for the five shapes of change: a small
admin tweak, an isolated feature, a change to legacy order logic, a
payment/accounting change, and a database or infrastructure migration.

State plainly, in the output: **this is a dry walkthrough. No agent executed the
pipeline and nothing was validated by running it.** Then say how to actually run
it: `/ai-task <the suggested first task>`.

### 7. Report

Close with:

1. files created (a tree, from the scaffold output);
2. project-specific findings that surprised you;
3. the agent roster that now applies;
4. model routing for this plan;
5. the risk model, with any project-specific adjustment you made;
6. the context strategy;
7. safety restrictions now in force, and which are mechanical (hooks) versus
   policy;
8. existing tooling that the workflows will reuse rather than replace;
9. assumptions you made;
10. unresolved questions, and who can answer each;
11. the suggested first real task, and why that one.

Do not claim anything was validated that was not actually run.

## Rules

- No application code changes. None.
- Never read `.env`, secrets, dumps or production logs — the path guard refuses,
  and it is right to.
- Prefer deterministic tools to model tokens: `rg`, `git log`, `jq`, the framework
  CLI, the test runner.
- Do not install anything, add a dependency, or "modernise" a tool. Document what
  exists and how the workflows will use it.
- Suggest `git add .ai .gitignore` plus whichever instruction files the scaffold
  reported (`CLAUDE.md`, `AGENTS.md`) at the end; do not commit.

Attribution

vanssatavanssata
View sourceSee grades on GitHubMore from vanssata →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →