.agents/skills/project-init/SKILL.md
Initialize AI context for an existing project — deep scan the codebase, detect tech stack, identify subprojects and major modules, generate root `AGENTS.md`, `ARCHITECTURE.md`, `TESTING.md`, and directory-scoped `AGENTS.md` files for subprojects and significant directories. Works with monorepos, polyglot projects, and large codebases via iterative scanning.
npx skillsauth add avav25/ai-assets project-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Deep-scan an existing project and generate AI context files (AGENTS.md, ARCHITECTURE.md, TESTING.md) for the root and all significant subprojects. After completion, the runtime has the context it needs: tech stack, conventions, structure, setup, testing, security.
// turbo
ls -la # or Get-ChildItem on Windows
Identify stack signals:
| Signal | Indicates |
|---|---|
| package.json, tsconfig.json | Node.js / TypeScript |
| pom.xml, build.gradle | Java / Spring |
| pyproject.toml, requirements.txt | Python |
| go.mod | Go |
| *.csproj, *.sln | .NET |
| Cargo.toml | Rust |
| Dockerfile, docker-compose.yml | Containerized |
| terraform/, *.tf | Infrastructure as Code |
| helm/, k8s/, charts/ | Kubernetes |
| Multiple package.json / pom.xml | Monorepo |
| nx.json, turbo.json, pnpm-workspace.yaml, lerna.json | Monorepo tooling |
| content/blog/, posts/, .mdx files with frontmatter | Blog / file-based content |
| llms.txt | AI search optimization |
Identify project boundaries — directories that are independent units:
apps/, packages/, services/, libs/ with own config filessrc/, app/, internal/)Build a project map:
Project Root
├── [subproject-1] (type: service, stack: Java Spring Boot)
├── [subproject-2] (type: frontend, stack: Next.js + TypeScript)
├── [subproject-3] (type: infra, stack: Terraform)
└── [shared-lib] (type: library, stack: TypeScript)
// turbo
find . -name "AGENTS.md" -o -name "ARCHITECTURE.md" -o -name "TESTING.md" -o -name "FEATURES.md" | head -20
If files exist — read them, note gaps. Create missing files, update outdated ones (with user confirmation).
Process one boundary at a time. Scan limits: max 10 boundaries, 20 files per boundary, 3 levels deep. For 100+ file boundaries, summarize from directory listing and configs only.
For each subproject or the root project:
package.json, pom.xml, pyproject.toml, go.mod, *.csproj, tsconfig.json, .eslintrc, Dockerfilemain.ts, App.tsx, main.py, Main.java, main.go, Program.cs.github/workflows/, Jenkinsfile, .gitlab-ci.yml, cloudbuild.yamlREADME.md, docs/, CONTRIBUTING.mdstatic-content/, data/ dirs with TS/JS exports. Map content file → sections → consuming pagescontent/blog/, posts/, MDX/MD directories. Read 1-2 sample files to extract: frontmatter format (all fields, types, required/optional), file naming convention, cover image path pattern, tags/categories, discovery assets (llms.txt, sitemap config, RSS feed)lucide, solar, phosphor), animation libs (framer-motion, gsap), component libs (shadcn, radix, mui), icon registries.codeiumignore, .cursorignore, .gitignore — paths AI tools cannot accessIdentify directories warranting their own scoped AGENTS.md. Criteria (any one): 10+ files with distinct responsibility, clear architectural layer, different conventions than parent, public API surface, generated code, infrastructure code.
Common significant directories:
| Stack | Significant Directories |
|---|---|
| Java Spring Boot | controller/, service/, repository/, model/, config/, exception/ |
| Next.js / React | app/, components/, lib/, hooks/, api/, middleware/ |
| FastAPI / Python | routers/, services/, models/, schemas/, dependencies/ |
| Go | cmd/, internal/, pkg/, handler/, store/, middleware/ |
| .NET | Controllers/, Services/, Models/, Data/, Middleware/ |
Use the matching stack-specific template from .codex/templates/ as a starting point. If no stack matches, use .codex/templates/universal-agents.template.md. Fill in all sections based on deep scan results from Step 2.
Critical rules:
ARCHITECTURE.md and TESTING.md in the Architecture reference and Testing Instructions sectionscode_search during content editsblog-post skill workflowApply system-architect role for this step. The system architect owns the ARCHITECTURE.md file — creation, updates, and reviews.
Use templates/architecture.template.md as the starting point. Fill in all 11 sections based on the deep scan results from Step 2.
Rules:
Apply qa-engineer role for this step. The QA engineer owns the TESTING.md file — creation, updates, and reviews.
Use templates/testing.template.md as the starting point. Fill in all sections based on the deep scan results from Step 2.
Create TESTING.md at the project root using templates/testing.template.md (root template section). Fill in all placeholders based on deep scan results from Step 2. All sections in the template are required — remove only those marked with <!-- Remove ... --> comments.
Key data sources: test config files → test types and commands; CI pipeline → pipeline stages; directory listing → test organization; .env.example → credential structure.
For each subproject/service identified in Step 1b, create a scoped TESTING.md using templates/testing.template.md (per-service template section at the bottom of the file).
Rules:
.env for credentials (test_ prefixed vars), do not duplicateFor single-project repos, create only root TESTING.md (no per-service files). Include all service-level detail directly in the root file.
For each significant directory identified in Step 2b, create a scoped AGENTS.md:
# AGENTS.md
## Purpose
[1 sentence: what this directory contains and its role in the architecture]
## Conventions
[Directory-specific patterns, naming, file organization]
## Key Files
[Important files with brief descriptions]
## Patterns
[Code patterns used in this directory — how to add new items]
## Testing
[How to test code in this directory specifically]
## Do NOT
[Directory-specific anti-patterns and constraints]
Rules for scoped AGENTS.md:
src/controllers/AGENTS.md — Purpose, naming convention ({Resource}Controller.java), injection rules (constructor, never repositories directly), validation (@Valid), "Adding a New Controller" steps.
Present a summary of all files to be created:
## Project Init Summary
### Files to create:
- [ ] AGENTS.md (root) — [X lines]
- [ ] ARCHITECTURE.md (root) — [X lines]
- [ ] TESTING.md (root) — [X lines]
- [ ] [service-1]/TESTING.md — [X lines] (monorepo only)
- [ ] [service-2]/TESTING.md — [X lines] (monorepo only)
- [ ] src/controllers/AGENTS.md — [X lines]
- [ ] src/services/AGENTS.md — [X lines]
- [ ] ...
### Project map:
[project boundary diagram from Step 1b]
### Tech stack detected:
[list of technologies, frameworks, tools]
Wait for user APPROVE before writing files. User may skip directories, add undetected ones, or adjust content.
After approval, create all files. For each file:
If updating existing files — show the diff and request confirmation.
After all files are created:
// turbo
find . -name "AGENTS.md" -o -name "ARCHITECTURE.md" -o -name "TESTING.md" | sort
Verify:
AGENTS.md exists and contains correct tech stackAGENTS.md links to TESTING.md in Testing Instructions sectionARCHITECTURE.md files existTESTING.md exists with all test types, commands, infrastructureTESTING.md files exist for each subproject (monorepos)AGENTS.md.env test values).codex/templates/*-agents.template.md, .codex/templates/architecture.template.md, .codex/templates/testing.template.mdsystem-architect role (ARCHITECTURE.md creation/review), qa-engineer role (TESTING.md creation/review), cloud-architect role (cloud infrastructure context), devops-architect role (CI/CD architecture context)test-strategy skill (test strategy, coverage targets)feature-plan skill, feature-dev skill, bugfix skill, test-local skill, run-tests skilldevelopment
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.