When the user explicitly requests project-scan, scanning the project, generating project-level AGENTS.mdgenerating or refreshing README.md, or refreshing the project-level Codex context, use this skill.
Do not use for:
- feature development or bug fixes
- overwriting existing
AGENTS.md、README.md、Dockerfileor scripts without confirmation
List of files that must be generated
After scanning is complete, by default fill in the project scaffolding all at once according to the following list (for each existing one, ask "overwrite / skip / incremental update"):
| No. | File | Purpose |
|---|---|---|
| 1 | AGENTS.md |
Project-level Codex context |
| 2 | README.md |
Project description |
| 3 | restart.sh |
Frontend and backend packaging + startup script |
| 4 | .claudeignore |
Claude Code ignore |
| 5 | .geminiignore |
Gemini CLI ignore (content copied from .claudeignore) |
| 6 | .gitignore |
Git ignore |
| 7 | .dockerignore |
Docker ignore |
| 8 | Dockerfile |
Container build |
| 9 | docker-compose.yml |
Container orchestration |
The list cannot be reduced; align with the output of the same-named command in Claude /project-scan, Cursor.
Core approach
- First scan the key signal files and directories in the repository, distinguishing facts that are "clearly identified" from "inferences based on structure".
- By default ensure project-level
.codex/tasks/、.codex/tasks/archived/、.codex/templates/exists; if writing to the project root triggers a permission boundary, go through platform approval first, do not silently skip. - Read the existing root directory
AGENTS.md、README.md、.claude/CLAUDE.md, and reusecc-project-init/assets/AGENTS.project.mdas theAGENTS.mdtemplate source. - First output a scan summary (including a tech stack identification table + file existence table), then ask 3-5 key questions: one-sentence project description, whether to generate the full scaffolding set, handling strategy for existing files (overwrite / incremental / skip), Docker exposed ports, API contract confirmation.
- AGENTS.md / README.md writing strategy:
- Does not exist → generate based on template
- Already exists and contains
<!-- AUTO:* -->block → prioritize incremental update of the automatic block, preserve handwritten content - Already exists but has no automatic block → must first let the user choose "first-time full rebuild / append automatic block / skip"
- Scaffolding file writing strategy(restart.sh / ignore / Dockerfile / docker-compose):
- Does not exist → from
cc-project-init/assets/select a template, render it according to the tech stack, and write it to disk - Already exists → ask "overwrite / skip", do not silently overwrite
.geminiignorecontent must be consistent with.claudeignoreStay consistent
- Does not exist → from
restart.shafter writing to disk mustchmod +x。- For template selection rules see
cc-project-init/references/template-selection.md; for ignore file content specifications seereferences/scaffold-files.md。 - After completion output a summary: generated files, skipped files, completed
.codexskeleton, and project facts that still need to be supplemented by the user.
Collaboration constraints
- Project-level
AGENTS.mdtemplate asset reusecc-project-init/assets/AGENTS.project.md - Scaffolding template reuse
cc-project-init/assets/(restart-go.sh.tmpl、Dockerfile-go.tmpl、docker-compose-*.yml.tmpl、gitignore-go.tmpl、dockerignore.tmpletc.) README.mdgeneration and updates followreferences/readme-update.md- Subsequent feature task persistence depends on
new-feature - If it involves interface contract summarization or judgment of list/pagination/filter structures, follow
cc-api-contract-safetyin a way that does not speculate about the response structure
Output requirements
- Clearly distinguish between "scan recognition" and "items to be confirmed"
- Clearly state which of "create new / incremental update / first-time full rebuild / append automatic block / overwrite / skip" is used for each file
- If completed
.codex/tasks/、.codex/tasks/archived/、.codex/templates/, it must be clearly stated - If the user chooses to skip an existing file, explain the subsequent risks
- If the interface contract cannot be determined from code or documentation, in
AGENTS.mdmark "pending user confirmation"; do not fabricate specifications - If the startup method, port, deployment method, or license cannot be reliably confirmed,
README.mdmust be marked "pending confirmation"; do not fabricate commands - If the repository has no
Cargo.toml、go.mod、pom.xml、package.jsonone of which can infer the tech stack, you must first confirm the target tech stack with the user, then choose a template, to avoid generating scaffolding for the wrong stack
Expand as needed
- Scan items:
references/scan-checks.md - Automatic block:
references/agents-blocks.md - Rebuild strategy:
references/rebuild-strategy.md - README update:
references/readme-update.md - Scaffold file list and ignore file specifications:
references/scaffold-files.md - Template selection:
cc-project-init/references/template-selection.md