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.json with "name": "@adobe/aem-boilerplate" or contains @adobe/aem-boilerplate
Presence of scripts/aem.js file
blocks/ directory structure
References to aem.live, hlx, or helix in the code
If AEM/EDS project detected :
Check if gh-upskill is available: gh upskill --version or upskill --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.md with the fetched content (change header from "# AGENTS.md" to "# CLAUDE.md")
Create AGENTS.md with the fetched content (keep header as "# AGENTS.md")
Install skills using gh-upskill:
gh upskill adobe/helix-website -b main
OR if gh extension not available but upskill binary is:
upskill adobe/helix-website -b main
This will automatically:
Create .claude/skills/ with all 6 skills
Create .agents/discover-skills script
ADD skills section to existing AGENTS.md (preserves all existing content)
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.md AND AGENTS.md with 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.
AEM Skills Installation Using gh-upskill
When an AEM/EDS project is detected:
Step 1: Ensure gh-upskill is installed
gh upskill --version || upskill --version
If not found, install it automatically:
gh extension install trieloff/gh-upskill
Verify installation succeeded before continuing.
Step 2: Create CLAUDE.md and AGENTS.md
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
Step 3: Install skills with gh-upskill
gh upskill adobe/helix-website -b main
This automatically:
Creates .claude/skills/ with all 6 skills (24 files)
Creates .agents/discover-skills script (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.
Step 3b: Add skills section to CLAUDE.md
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
Step 4: Verify installation
Check that:
CLAUDE.md exists at project root
AGENTS.md exists at project root (created/updated by gh-upskill)
.claude/skills/ contains 6 skill directories
.agents/discover-skills exists and is executable
Directory Structure:
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