| description |
|---|
Analyze codebase and create CLAUDE.md, AGENTS.md, and skills with project-specific guidance |
Please analyze this codebase and create documentation files and skills for AI coding assistants.
-
First, check if this is an AEM/EDS project by looking for:
package.jsonwith"name": "@adobe/aem-boilerplate"or contains@adobe/aem-boilerplate- Presence of
scripts/aem.jsfile blocks/directory structure- References to
aem.live,hlx, orhelixin the code
-
If AEM/EDS project detected:
-
Check if
gh-upskillis available:gh upskill --versionorupskill --version -
If NOT available, install it automatically:
gh extension install trieloff/gh-upskill
Then verify it was installed successfully before proceeding.
-
Once available, proceed:
- Fetch the standard template from:
https://raw.githubusercontent.com/adobe/aem-boilerplate/refs/heads/agents-md/AGENTS.md - Create
CLAUDE.mdwith the fetched content (change header from "# AGENTS.md" to "# CLAUDE.md") - Create
AGENTS.mdwith the fetched content (keep header as "# AGENTS.md") - Install skills using gh-upskill:
OR if gh extension not available but upskill binary is:
gh upskill adobe/helix-website -b main
upskill adobe/helix-website -b main
- This will automatically:
- Create
.claude/skills/with all 6 skills - Create
.agents/discover-skillsscript - ADD skills section to existing
AGENTS.md(preserves all existing content)
- Create
- Fetch the standard template from:
-
Inform the user that standard AEM/EDS documentation and skills were installed
-
-
If NOT an AEM/EDS project:
- Follow the standard init process to analyze the codebase
- Create both
CLAUDE.mdANDAGENTS.mdwith the same custom contents based on analysis - Include:
- Build/lint/test commands from package.json
- High-level architecture requiring multiple files to understand
- Important patterns from README.md, CONTRIBUTING.md, .cursor/rules, .cursorrules, .github/copilot-instructions.md
- Avoid obvious instructions or listing every file
- Focus on "big picture" architecture and commonly-used commands
- Do NOT install AEM-specific skills
Both files should start with:
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Or for AGENTS.md:
# AGENTS.md
This file provides guidance to AI coding assistants when working with code in this repository.
When an AEM/EDS project is detected:
gh upskill --version || upskill --versionIf not found, install it automatically:
gh extension install trieloff/gh-upskillVerify installation succeeded before continuing.
Fetch the official Adobe template:
curl -s "https://raw.githubusercontent.com/adobe/aem-boilerplate/refs/heads/agents-md/AGENTS.md"Create CLAUDE.md:
- Write the fetched content to
CLAUDE.md - Change the first line header from "# AGENTS.md" to "# CLAUDE.md"
- Keep all other content identical
Create AGENTS.md:
- Write the fetched content to
AGENTS.md - Keep the header as "# AGENTS.md" (original)
- Keep all content identical to CLAUDE.md except the header
gh upskill adobe/helix-website -b mainThis automatically:
- Creates
.claude/skills/with all 6 skills (24 files) - Creates
.agents/discover-skillsscript (executable) - ADDS skills section to existing
AGENTS.md(using markers, doesn't replace)
Important: gh-upskill only updates AGENTS.md. We need to manually add the skills section to CLAUDE.md as well.
After gh-upskill completes, copy the skills section from AGENTS.md to CLAUDE.md:
- Extract the content between
<!-- upskill:skills:start -->and<!-- upskill:skills:end -->markers from AGENTS.md - Append this content to the end of CLAUDE.md
- This ensures Claude Code knows about and uses the skills
Check that:
CLAUDE.mdexists at project rootAGENTS.mdexists at project root (created/updated by gh-upskill).claude/skills/contains 6 skill directories.agents/discover-skillsexists and is executable
Directory Structure:
.agents/and.claude/must be at the SAME LEVEL (both in project root)- Do NOT create
.agents/inside.claude/ - Correct structure:
project-root/ ├── .agents/ ← At root level │ └── discover-skills ├── .claude/ ← At root level │ └── skills/ │ ├── building-blocks/ │ ├── content-driven-development/ │ ├── content-modeling/ │ ├── testing-blocks/ │ ├── block-collection-and-party/ │ └── docs-search/ ├── CLAUDE.md ← At root level └── AGENTS.md ← At root level
Other Notes:
- Create BOTH CLAUDE.md and AGENTS.md so the documentation works with Claude Code AND other AI assistants like Cursor
- For AEM projects, install all skills to enable advanced development workflows
- Keep the content identical in both documentation files for consistency
- Don't repeat obvious instructions
- Don't include generic development practices
- Focus on project-specific commands and architecture