generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add aws-amplify plugin #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
must1d
wants to merge
18
commits into
awslabs:main
Choose a base branch
from
must1d:aws-amplify
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ff35428
add aws-amplify plugin
93a50a7
apply Copilot AI comments
7ac5484
fix formatting issues + add code owners
b1854c6
Merge remote-tracking branch 'upstream/main' into aws-amplify
5a3b869
fix: adjust codeowners to new format
caa6b02
fix: small formatting issue
cdbc181
fix: formatting in CODEOWNERS
e8aacc8
Apply suggestions from code review
must1d 05b1190
feat: add deployment skill
88a57af
feat: improve plugin
ab98be0
fix: revert changes in deploy to aws plugin
cf07a23
revert: change of deploy to aws description
2e1b504
chore(docs): add new plugin to README
53a352b
fix: build error
574d7c4
improve fix
0d590cd
align link in README for deploy on aws plugin
dd84e6f
Merge branch 'main' into aws-amplify
krokoko cfdf6a7
Merge branch 'main' into aws-amplify
krokoko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "author": { | ||
| "name": "Amazon Web Services" | ||
| }, | ||
| "description": "Build full-stack apps with AWS Amplify Gen 2 using guided workflows and SOPs", | ||
| "homepage": "https://github.com/awslabs/agent-plugins", | ||
| "keywords": [ | ||
| "aws", | ||
| "amplify", | ||
| "fullstack", | ||
| "gen2", | ||
| "workflows" | ||
| ], | ||
| "license": "Apache-2.0", | ||
| "name": "aws-amplify", | ||
| "repository": "https://github.com/awslabs/agent-plugins", | ||
| "version": "1.0.0" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "mcpServers": { | ||
| "aws-mcp": { | ||
| "command": "uvx", | ||
| "timeout": 100000, | ||
| "type": "stdio", | ||
| "args": [ | ||
| "mcp-proxy-for-aws@latest", | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "--log-level", | ||
| "ERROR", | ||
| "https://aws-mcp.us-east-1.api.aws/mcp" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| # AWS Amplify Claude Plugin | ||
|
|
||
| Build full-stack applications with AWS Amplify Gen 2 using TypeScript code-first development. | ||
|
|
||
| ## Overview | ||
|
|
||
| This plugin provides a workflow orchestrator for AWS Amplify Gen 2 development. It validates prerequisites, analyzes project state, retrieves official AWS SOPs via MCP, and guides you through backend creation, deployment, and frontend integration. | ||
|
|
||
| ## Features | ||
|
|
||
| - **SOP-Driven**: Uses official AWS Amplify Standard Operating Procedures via MCP | ||
| - **Phased Workflow**: Backend → Sandbox → Frontend → Testing → Production | ||
| - **Framework Support**: React, Next.js, Vue, Angular, React Native, Flutter, Swift, Android | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - **Gen 2 Only**: TypeScript code-first (`defineAuth`, `defineData`, `defineStorage`, `defineFunction`) | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Node.js 18.x or later | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - AWS credentials configured (`aws configure` or `aws sso login`) | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - `uv` package manager for MCP server: https://docs.astral.sh/uv/getting-started/installation/ | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Option 1: Marketplace (recommended) | ||
|
|
||
| ```bash | ||
| /plugin marketplace add awslabs/agent-plugins | ||
| /plugin install aws-amplify@awslabs-agent-plugins | ||
| ``` | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Option 2: Load locally (for testing) | ||
|
|
||
| ```bash | ||
| git clone https://github.com/awslabs/agent-plugins | ||
| claude --plugin-dir ./agent-plugins/plugins/aws-amplify | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Slash Command | ||
|
|
||
| ``` | ||
| /aws-amplify:build I want to create a todo app with authentication | ||
| ``` | ||
|
|
||
| ### Auto-Invoked Skill | ||
|
|
||
| The `amplify-workflow` skill is automatically invoked when you ask Claude to build, modify, or deploy an Amplify Gen 2 backend or full-stack app, for example: | ||
|
|
||
| - "Create a new Amplify backend with auth and a todo data model" | ||
| - "Add S3 storage and a Lambda function to my existing Amplify project" | ||
|
|
||
| The `amplify-deploy` skill is the mandatory entry point for all Amplify deployments (sandbox and production). It is automatically invoked for deployment requests, for example: | ||
|
|
||
| - "Deploy my Amplify sandbox environment" | ||
| - "Promote my sandbox to production" | ||
| - "Release my Amplify app" | ||
|
|
||
| When `amplify-workflow` reaches its deployment phases (Phase 2: Sandbox, Phase 5: Production), it delegates to `amplify-deploy` automatically. | ||
|
|
||
| These skills are **not** used for conceptual questions about Amplify, comparisons with other frameworks, or troubleshooting existing projects—ask those as normal questions without expecting the workflow to start. For build/create/deploy tasks, just describe what you want in natural language. | ||
|
|
||
| ## Workflow Phases | ||
|
|
||
| | Phase | Description | Handled By | | ||
| | ---------- | ------------------------------- | ------------------------------------- | | ||
| | Backend | Create/modify Amplify resources | SOP: `amplify-backend-implementation` | | ||
| | Sandbox | Deploy to sandbox for testing | `amplify-deploy` skill | | ||
| | Frontend | Connect frontend to backend | SOP: `amplify-frontend-integration` | | ||
| | Testing | Local verification | Manual | | ||
| | Production | Deploy to production | `amplify-deploy` skill | | ||
|
|
||
| **Common Patterns:** | ||
|
|
||
| - New app: Backend → Sandbox → Frontend → Testing → Production | ||
| - Add feature: Backend → Sandbox | ||
| - Redeploy: Sandbox only | ||
| - Connect UI: Frontend → Testing | ||
| - Go live: Production only | ||
|
|
||
| ## Plugin Structure | ||
|
|
||
| ``` | ||
| aws-amplify/ | ||
| ├── .claude-plugin/ | ||
| │ └── plugin.json # Plugin manifest | ||
| ├── commands/ | ||
| │ └── build.md # /aws-amplify:build command | ||
| ├── skills/ | ||
| │ ├── amplify-deploy/ | ||
| │ │ └── SKILL.md # Deployment skill (sandbox & production) | ||
| │ └── amplify-workflow/ | ||
| │ └── SKILL.md # Auto-invoked orchestrator | ||
| ├── .mcp.json # AWS MCP server config | ||
| └── README.md | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## AWS Credentials | ||
|
|
||
| Must be configured before use: | ||
|
|
||
| ```bash | ||
| # Option 1: Access keys | ||
| aws configure | ||
|
|
||
| # Option 2: SSO | ||
| aws sso login | ||
|
|
||
| # Verify | ||
| aws sts get-caller-identity | ||
| ``` | ||
|
|
||
| ## MCP Server | ||
|
|
||
| This plugin requires the AWS MCP server for SOP retrieval. It's automatically configured via `.mcp.json`. | ||
|
|
||
| Verify it's working: | ||
|
|
||
| ``` | ||
| /mcp | ||
| ``` | ||
|
|
||
| Should show `aws-mcp` as active. | ||
|
|
||
| **If MCP is unavailable**, the plugin will STOP and ask you to configure it. It will not proceed without MCP. | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| **Note:** The MCP endpoint (`us-east-1.api.aws`) is the API location for SOP | ||
| retrieval only. It does not affect which region your Amplify resources deploy | ||
| to — deployment region is controlled by your AWS credentials and CLI configuration. | ||
|
|
||
| ## License | ||
|
|
||
| Apache-2.0 | ||
|
|
||
| ## Resources | ||
|
|
||
| - [AWS Amplify Docs](https://docs.amplify.aws/) | ||
| - [Amplify Gen 2 Guide](https://docs.amplify.aws/react/start/) | ||
| - [Claude Code Plugins](https://code.claude.com/docs/en/plugins) | ||
| - [Model Context Protocol](https://modelcontextprotocol.io/) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| description: Build full-stack apps with AWS Amplify Gen 2 - describe what you want to build | ||
| argument-hint: "[description of what to build]" | ||
| --- | ||
|
|
||
| # Build with AWS Amplify Gen 2 | ||
|
|
||
| **Request:** $ARGUMENTS | ||
|
|
||
| ## Input Validation | ||
|
|
||
| If `$ARGUMENTS` is empty or unclear, ask: | ||
|
|
||
| ``` | ||
| What would you like to build? For example: | ||
| - "A todo app with user authentication" | ||
| - "Add a GraphQL API to my existing Next.js app" | ||
| - "Deploy my app to production" | ||
| ``` | ||
must1d marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Execution | ||
|
|
||
| Delegate to the `amplify-workflow` skill and follow its complete workflow. | ||
| The skill handles prerequisite validation, phase planning, SOP retrieval, | ||
| and user confirmation gates. | ||
|
|
||
| Gen 2 ONLY — no Gen 1 patterns (`amplify init`, `amplify push`). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| name: amplify-deploy | ||
| description: Deploy AWS Amplify Gen 2 applications to sandbox (development) or production environments. MUST be used when user wants to DEPLOY, RELEASE, PROMOTE, or PUBLISH an Amplify app. Handles both sandbox deployment for testing and production deployment for going live. This is the mandatory entry point for all Amplify deployment operations. | ||
| --- | ||
|
|
||
| # Amplify Deploy | ||
|
|
||
| Deploy an AWS Amplify Gen 2 application to sandbox or production. | ||
|
|
||
| ## When to Use This Skill | ||
|
|
||
| Use for any Amplify deployment: | ||
|
|
||
| - Deploy to sandbox for development/testing | ||
| - Deploy/promote to production | ||
| - Redeploy after code changes | ||
| - Any request involving "deploy my Amplify app" | ||
|
|
||
| --- | ||
|
|
||
| ## Invocation Context | ||
|
|
||
| This skill may be invoked standalone or from the `amplify-workflow` orchestrator. | ||
|
|
||
| - **From orchestrator:** The deployment type (sandbox or production) is specified | ||
| by the caller. Do not re-ask the user. Prerequisites (Node.js, npm, AWS | ||
| credentials) were already validated — skip the SOP's dependency verification step. | ||
| - **Standalone:** Determine deployment type from the user's request. Validate | ||
| prerequisites per the SOP. | ||
|
|
||
| ## Mapping Deployment Targets to SOP Parameters | ||
|
|
||
| The SOP uses the parameter name `deployment_type` with values `sandbox` or `cicd`. | ||
| Map user/caller intent as follows: | ||
|
|
||
| - "sandbox", "development", "testing" → SOP deployment_type: **sandbox** | ||
| - "production", "prod", "live", "release", "cicd" → SOP deployment_type: **cicd** | ||
|
|
||
| --- | ||
|
|
||
| ## Retrieve and Follow the SOP | ||
|
|
||
| The **"amplify-deployment-guide"** SOP must be retrieved **at least once** | ||
| during the conversation using the SOP retrieval tool from `aws-mcp`. | ||
|
|
||
| **All steps in the SOP must be followed** for any type of deployment | ||
| (sandbox or production). The SOP contains the latest and most accurate | ||
| deployment procedures. Do not improvise or skip steps. | ||
|
|
||
| ### Critical Rules | ||
|
|
||
| 1. **Follow the SOP completely** - Do not improvise or skip steps | ||
| 2. **If you encounter an error:** | ||
| - Fix the immediate issue | ||
| - Return to the SOP and continue from where you left off | ||
| - Do NOT abandon the SOP | ||
| 3. **If you lose track of where you were:** | ||
| - Retrieve the SOP again | ||
| - Identify which step you completed last | ||
| - Continue from the next step |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.