Writes the general context of the project in AGENTS.md, imported by CLAUDE.md, and the README.md from its templates. It runs only when the user asks for it.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Initialize?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mlophez-initialize)
---
name: initialize
description: >
Writes the general context of the project in AGENTS.md, imported by CLAUDE.md, and the README.md from its templates.
It runs only when the user asks for it.
user-invocable: true
disable-model-invocation: true
---
# Initializing the project context
Write `AGENTS.md` from [context.md](context.md) with the project facts and `CLAUDE.md` with the line `@AGENTS.md`.
Write `README.md` from [readme.md](readme.md) for human readers.
## Requirements
- The templates next to this file: [context.md](context.md) and [readme.md](readme.md).
Without them, stop and tell the user.
## Input
- **Project**: the current `AGENTS.md` when present, `README.md`, the folder tree and `Justfile`/`Makefile`.
Also the manifests (`package.json`, `pyproject.toml`, `go.mod`, `pom.xml`...) and test configurations.
Also the CI pipelines (`.github/workflows/`, `.gitlab-ci.yml`, `bitbucket-pipelines.yml`...).
Also the folder of the AI when present, with its `rules/`, `plans/`, `reports/` and `tasks/`.
It is the one the project names in `AGENTS.md`, `CLAUDE.md` or the session, `ai/` below the root by default.
Also the files at the root that configure the agents, such as their hooks or their workflow.
## Output
- **Files**: `AGENTS.md` with its number of lines, `CLAUDE.md` and `README.md`.
- **Pruned**: the details cut from `AGENTS.md` at Step 4, or "none".
- **Pending**: the sections of each file left as `TBD`, or "none".
## Limits
- Write facts that describe the project as it is; never rules on how to write its code.
- Never write an inferred value the user did not confirm.
- Only write `AGENTS.md`, `CLAUDE.md` and `README.md`.
## How to operate
Copy this checklist and track your progress:
```text
Init progress:
- [ ] Step 1: Explore the project and propose the content of each section (see Step 1).
- [ ] Step 2: Interview the user (see Step 2).
- [ ] Step 3: Write `AGENTS.md`, `CLAUDE.md` and `README.md` (see Step 3).
- [ ] Step 4: Prune the details of `AGENTS.md` (see Step 4).
```
### Step 1: Explore the project and propose the content of each section
Read the project read-only (see `Input`).
Propose the content of each section of [context.md](context.md) and [readme.md](readme.md).
State the origin of each proposal (e.g. "inferred from pyproject.toml").
### Step 2: Interview the user
- Show the proposals and ask for what the project does not answer, never one question at a time.
Use `AskUserQuestion` for closed questions, at most 4 per call, and grouped free text for open ones.
- List the sections of the current `AGENTS.md` that [context.md](context.md) lacks, and ask which ones to keep.
- Confirm once before writing, listing the existing files that will be overwritten.
### Step 3: Write `AGENTS.md`, `CLAUDE.md` and `README.md`
- Follow [context.md](context.md) and [readme.md](readme.md): keep their headings and fixed text.
- Replace every `<...>` with what it describes.
- Replace every `<!-- ... -->` guidance comment with its content, following the conditions it states.
- Write no comment in `AGENTS.md` nor `README.md`: the guidance comments are for this skill only.
- Keep verbatim, after the last section, the sections of the current `AGENTS.md` the user kept at Step 2.
A tool may have added one, such as how to install it; they are the only sections outside [context.md](context.md).
- Write in English; cut every word that adds no fact.
- Write every list item of `AGENTS.md` and `README.md` as a short summary on one line of at most 120 characters.
Never wrap it; the detail belongs in `docs/`.
- Fill `README.md` from the facts of `AGENTS.md`, with the valid content of the current `README.md` as the proposal.
Ask only for what they do not cover: requirements, setup steps and usage examples.
- A section without content holds `TBD`; one that does not apply to the project holds `Not applicable.`
### Step 4: Prune the details of `AGENTS.md`
- Reread `AGENTS.md` item by item, the kept sections included, and ask of each: would the next feature make it stale?
- Cut what would: versions, libraries, files inside a folder, lists that grow, counts and how a command works inside.
- Keep the exact commands, the folders and their conventions, and point to `docs/` for the rest.
- Report the items cut in `Output`.