AgentSkillsCN

project-analyzer

分析代码库并创建 CLAUDE.md 文档。在分析项目、理解代码库,或创建文档时使用。

SKILL.md
--- frontmatter
name: project-analyzer
description: "Analyze codebase and create CLAUDE.md documentation. Use when analyzing project, understanding codebase, or creating documentation."
allowed-tools: [Task]

ABOUTME: Automated codebase analysis and CLAUDE.md generation

ABOUTME: Project structure mapping, convention detection, documentation creation

Project Analyzer

Analyzes a codebase via a specialized agent (Haiku) that generates comprehensive CLAUDE.md documentation.

When to Use

  • Starting work on a new project
  • Need to understand project structure
  • Creating/updating project documentation

Agent Invocation

Use the Task tool with:

code
subagent_type: "project-analyzer"
prompt: "Analyze the project in [directory] and create comprehensive CLAUDE.md documentation"

The agent will:

  1. Scan directory structure
  2. Identify language and framework
  3. Analyze code patterns with ast-grep
  4. Detect conventions
  5. Generate CLAUDE.md

Language Detection

Indicator FileLanguage/FrameworkKey Config Files
go.modGogo.sum, Makefile
pyproject.tomlPythonuv.lock, setup.py, .python-version
GemfileRuby/RailsGemfile.lock, config/routes.rb
Package.swiftSwift*.xcodeproj, *.xcworkspace
build.gradle.ktsKotlin/Androidsettings.gradle.kts, AndroidManifest.xml
package.jsonNode/Reactnext.config.*, tsconfig.json
*.tfTerraform*.tfvars, terragrunt.hcl
Cargo.tomlRustCargo.lock
docker-compose.ymlDockerDockerfile, .dockerignore

Also check: .gitignore, .env.example, .github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile

Quality tools: .golangci.yml (Go), ruff.toml (Python), .rubocop.yml (Rails), .eslintrc (JS)


Framework Detection

PatternFramework
config/routes.rbRails
next.config.*Next.js
angular.jsonAngular
nuxt.config.*Nuxt
fastapi in depsFastAPI
django in depsDjango
gin or echo in go.modGo web
Vapor in Package.swiftVapor

CLAUDE.md Required Sections

  • Project purpose (1-2 sentences)
  • Tech stack + versions
  • Build/test/lint commands
  • Architecture overview (directory structure)
  • Key conventions and patterns
  • Environment setup
  • Vault Context (if vault is configured; see _VAULT_CONTEXT.md)

Resources

Related Skills:

  • Language analysis: _AST_GREP.md
  • Go projects: golang/SKILL.md
  • Python projects: python/SKILL.md
  • Rails projects: rails/SKILL.md
  • Terraform: terraform/SKILL.md