Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@
},
"category": "Development"
},
{
"name": "codebase-documentor",
"source": {
"source": "local",
"path": "./plugins/codebase-documentor"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Documentation"
},
{
"name": "databases-on-aws",
"source": {
Expand Down
21 changes: 21 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@
],
"version": "1.0.0"
},
{
"category": "documentation",
"description": "Analyze AWS-deployed services and codebases to generate structured technical documentation, architecture diagrams, and business documentation — all with source-of-truth citations linking every finding back to code. Delegates diagram generation to the aws-architecture-diagram skill (deploy-on-aws plugin) for professional draw.io output. Supports CDK, CloudFormation, and Terraform.",
"keywords": [
"aws",
"aws agent skills",
"documentation",
"architecture",
"diagram",
"draw.io",
"codebase-analysis",
"cdk",
"cloudformation",
"terraform",
"onboarding"
],
"name": "codebase-documentor",
"source": "./plugins/codebase-documentor",
"tags": ["aws", "documentation", "architecture", "diagram"],
"version": "0.1.0"
},
{
"category": "database",
"description": "Expert database guidance for the AWS database portfolio. Design schemas, execute queries, handle migrations, and choose the right database for your workload.",
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tools/ @awslabs/agent-plugins-admins
plugins/amazon-location-service @awslabs/agent-plugins-admins @awslabs/agent-plugins-maintainers @awslabs/agent-plugins-amazon-location-service
plugins/aws-amplify @awslabs/agent-plugins-admins @awslabs/agent-plugins-maintainers @awslabs/agent-plugins-amplify
plugins/aws-serverless @awslabs/agent-plugins-admins @awslabs/agent-plugins-maintainers @awslabs/agent-plugins-aws-serverless
plugins/codebase-documentor @awslabs/agent-plugins-admins @awslabs/agent-plugins-maintainers
plugins/databases-on-aws @awslabs/agent-plugins-admins @awslabs/agent-plugins-maintainers @awslabs/agent-plugins-dsql
plugins/deploy-on-aws @awslabs/agent-plugins-admins @awslabs/agent-plugins-maintainers @awslabs/agent-plugins-deploy-on-aws
plugins/migration-to-aws @awslabs/agent-plugins-admins @awslabs/agent-plugins-maintainers @awslabs/agent-plugins-migrate-to-aws
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ To maximize the benefits of plugin-assisted development while maintaining securi
| **amazon-location-service** | Add maps, geocoding, routing, places search, and geospatial features to applications with Amazon Location Service | Available |
| **aws-amplify** | Build full-stack apps with AWS Amplify Gen 2 using guided workflows for auth, data, storage, and functions | Available |
| **aws-serverless** | Build serverless applications with Lambda, API Gateway, EventBridge, Step Functions, and durable functions | Available |
| **codebase-documentor** | Analyze AWS-deployed services and codebases to generate structured technical documentation with source-of-truth citations | Available |
| **databases-on-aws** | Database guidance for the AWS database portfolio — schema design, queries, migrations, and multi-tenant patterns | Some Services Available (Aurora DSQL) |
| **deploy-on-aws** | Deploy applications to AWS with architecture recommendations, cost estimates, and IaC deployment | Available |
| **migration-to-aws** | Migrate GCP infrastructure to AWS with resource discovery, architecture mapping, cost analysis, and execution planning | Available |
Expand Down Expand Up @@ -90,6 +91,12 @@ or
/plugin install sagemaker-ai@agent-plugins-for-aws
```

or

```bash
/plugin install codebase-documentor@agent-plugins-for-aws
```

### Codex

Codex supports repo-local marketplaces and plugin manifests through
Expand Down Expand Up @@ -227,6 +234,23 @@ Design, build, deploy, test, and debug serverless applications with AWS Lambda,
| --------------------------- | --------------------------------------------- | --------------------------------------------- |
| **SAM template validation** | After edits to `template.yaml`/`template.yml` | Runs `sam validate` and reports errors inline |

## codebase-documentor

Analyzes codebases to generate structured technical documentation with source-of-truth citations linking every finding back to the exact code that produced it. Uses an outline-driven pipeline to systematically analyze codebases of any size with a persistent task board for resumability.

### Agent Skill Triggers

| Agent Skill | Triggers |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **document-service** | "analyze this codebase", "generate documentation", "document this service", "I inherited this code", "help me understand this system", "draw the architecture", "what does this system look like" |

### MCP Servers

| Server | Purpose |
| ---------------- | -------------------------------------------------------------------- |
| **awsknowledge** | AWS service descriptions, architecture guidance, documentation links |
| **awsiac** | CDK/CloudFormation resource schema validation and IaC best practices |

## databases-on-aws

Database guidance for the AWS database portfolio. Design schemas, execute queries, handle migrations, build applications, and choose the right database for your workload. Currently includes Aurora DSQL — a serverless, PostgreSQL-compatible distributed SQL database.
Expand Down
24 changes: 24 additions & 0 deletions plugins/codebase-documentor/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"author": {
"name": "Amazon Web Services"
},
"description": "Analyze AWS-deployed services and codebases to generate structured technical documentation, architecture diagrams, and business documentation — all with source-of-truth citations linking every finding back to code. Delegates diagram generation to the aws-architecture-diagram skill (deploy-on-aws plugin) for professional draw.io output. Supports CDK, CloudFormation, and Terraform.",
"homepage": "https://github.com/awslabs/agent-plugins",
"keywords": [
"aws",
"aws agent skills",
"documentation",
"architecture",
"diagram",
"draw.io",
"codebase-analysis",
"cdk",
"cloudformation",
"terraform",
"onboarding"
],
"license": "Apache-2.0",
"name": "codebase-documentor",
"repository": "https://github.com/awslabs/agent-plugins",
"version": "0.1.0"
}
47 changes: 47 additions & 0 deletions plugins/codebase-documentor/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "codebase-documentor",
"version": "0.1.0",
"description": "Analyze AWS-deployed services and codebases to generate structured technical documentation, architecture diagrams, and business documentation — all with source-of-truth citations linking every finding back to code. Delegates diagram generation to the aws-architecture-diagram skill (deploy-on-aws plugin) for professional draw.io output. Supports CDK, CloudFormation, and Terraform.",
"author": {
"name": "Amazon Web Services",
"email": "aws-agent-plugins@amazon.com",
"url": "https://github.com/awslabs/agent-plugins"
},
"homepage": "https://github.com/awslabs/agent-plugins",
"repository": "https://github.com/awslabs/agent-plugins",
"license": "Apache-2.0",
"keywords": [
"aws",
"aws agent skills",
"documentation",
"architecture",
"diagram",
"draw.io",
"codebase-analysis",
"cdk",
"cloudformation",
"terraform",
"onboarding"
],
"skills": "./skills/",
"mcpServers": "./.mcp.json",
"interface": {
"displayName": "Codebase Documentor",
"shortDescription": "Analyze codebases and generate structured technical documentation with citations.",
"longDescription": "Analyze AWS-deployed services and codebases to generate structured technical documentation with source-of-truth citations linking every finding back to code.",
"defaultPrompt": [
"Analyze this codebase and generate documentation.",
"I inherited this code — help me understand and document it.",
"Document the architecture and components of this service."
],
"developerName": "Amazon Web Services",
"category": "Documentation",
"capabilities": [
"Read"
],
"websiteURL": "https://github.com/awslabs/agent-plugins",
"privacyPolicyURL": "https://aws.amazon.com/privacy/",
"termsOfServiceURL": "https://aws.amazon.com/service-terms/",
"brandColor": "#FF9900"
}
}
15 changes: 15 additions & 0 deletions plugins/codebase-documentor/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"mcpServers": {
"awsknowledge": {
"type": "http",
"url": "https://knowledge-mcp.global.api.aws"
},
"awsiac": {
"args": [
"awslabs.aws-iac-mcp-server@latest"
],
"command": "uvx",
"type": "stdio"
}
}
}
68 changes: 68 additions & 0 deletions plugins/codebase-documentor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Codebase Documentor

Analyze codebases — especially legacy and AWS-deployed services — to produce structured technical documentation and architecture diagrams with source-of-truth citations linking every finding back to the code. Understands CDK, CloudFormation, Terraform, and enriches output with AWS service context. Delegates architecture diagram generation to the `aws-architecture-diagram` skill (from the `deploy-on-aws` plugin) for professional draw.io output with official AWS4 icons, or falls back to inline Mermaid.

## How It Works

Unlike ad-hoc "explain this code" prompts, codebase-documentor uses an **outline-driven pipeline** to systematically analyze codebases of any size — from small microservices to large legacy monoliths. The entire process runs autonomously after initial context gathering.

**The pipeline:**

1. **Build file tree** — Recursively list all files, filter out noise, detect the project type and entry points
2. **Generate outline** — Analyze the file tree, README, and entry points to produce a documentation outline mapping each section to source files
3. **Analyze** — Two parallel paths: (A) application code analysis (APIs, data models, integrations) and (B) infrastructure-as-code analysis (CDK, CloudFormation, Terraform resources and relationships)
4. **Generate diagram** — Delegate to the `aws-architecture-diagram` skill (deploy-on-aws plugin) for draw.io output, or fall back to inline Mermaid
5. **Assemble** — Combine all sections into `CODEBASE_ANALYSIS.md` (single file with business context included)

**For large codebases**, the outline sections are tracked on a persistent `.codebase-documentor-progress.md` task board, making the process **resumable** — if a session is interrupted, a new session reads the progress file and continues from where it left off.

## Skills

| Skill | Purpose |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `document-service` | Analyze codebases to produce `CODEBASE_ANALYSIS.md` with architecture diagrams (via `aws-architecture-diagram` skill, Mermaid fallback), business context, and source citations. Two core analysis paths: application code (APIs, data models, integrations) and IaC (CDK, CloudFormation, Terraform). |

## MCP Servers

| Server | Type | Purpose | When Used |
| -------------- | ----- | -------------------------------------------------------------------- | ----------------------------------------- |
| `awsknowledge` | HTTP | AWS service descriptions, architecture guidance, documentation links | When AWS services detected in code or IaC |
| `awsiac` | stdio | CDK/CloudFormation resource schema validation and IaC best practices | When CDK or CloudFormation files detected |

## Installation

```bash
/plugin install codebase-documentor@agent-plugins-for-aws
```

Or test locally:

```bash
claude --plugin-dir ./plugins/codebase-documentor
```

## Examples

**Analyze an inherited codebase:**

```text
I inherited this codebase and need to understand it. Analyze and document it.
```

**Document a specific service:**

```text
Analyze the order-processing service and generate documentation.
```

**Analyze with existing context:**

```text
Analyze this service. Here's an existing design doc: [link]
```

**Understand a legacy system:**

```text
Help me understand this legacy system. What does it do and how is it architected?
```
Loading
Loading