- 対象: AWS CDK v2 (TypeScript) でインフラを管理し、GitHub でホストしているアプリケーションのリポジトリ
- コーディングエージェント (Claude Code / Codex / Devin など) をリポジトリのルートで起動し、区切り線から下を丸ごと貼り付けてください
- 事前にあるとスムーズなもの (無くてもエージェントがセットアップ手順を出力します):
- GitHub Actions から OIDC で assume できるデプロイ用 IAM ロール
- デプロイ先アカウント/リージョンで
cdk bootstrap済み
- 生成されたコードは、マージ前に必ず
cdk diffの内容とワークフローの権限設定をレビューしてください
| name | simplify-classic |
|---|---|
| description | Review changed code for reuse, quality, and efficiency, then fix any issues found. Launches three parallel review agents (reuse / quality / efficiency) and applies the fixes directly. |
Review all changed files for reuse, quality, and efficiency. Fix any issues found.
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
| #!/bin/bash | |
| # Put this file in ~/.claude/statusline.sh | |
| # Read JSON input once | |
| input=$(cat) | |
| # Helper functions for common extractions | |
| get_model_name() { echo "$input" | jq -r '.model.display_name'; } | |
| get_current_dir() { echo "$input" | jq -r '.workspace.current_dir'; } | |
| get_project_dir() { echo "$input" | jq -r '.workspace.project_dir'; } |
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
| import os | |
| import boto3 | |
| from botocore.auth import SigV4Auth | |
| from botocore.awsrequest import AWSRequest | |
| import requests | |
| import json | |
| def send_event(channel_path: str, payload: any) -> None: | |
| """ |
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
| import { Handler } from 'aws-lambda'; | |
| type Input = { | |
| /** | |
| * AWS Region name to call the service | |
| */ | |
| targetRegion: string; | |
| /** | |
| * AWS service name (must be in AWS SDK for JS v3 style) |
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
| use std::fmt::Debug; | |
| use std::sync::Arc; | |
| use async_trait::async_trait; | |
| use aws_sdk_rdsdata::error::ProvideErrorMetadata; | |
| use futures::{stream, Sink, SinkExt, StreamExt}; | |
| use tokio::net::TcpListener; | |
| use pgwire::api::auth::noop::NoopStartupHandler; | |
| use pgwire::api::portal::Portal; |
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
| import { BedrockRuntimeClient, InvokeModelCommand } from '@aws-sdk/client-bedrock-runtime'; | |
| const client = new BedrockRuntimeClient({ region: 'us-east-1' }); | |
| const sendPrompt = async (prompt) => { | |
| const command = new InvokeModelCommand({ | |
| modelId: 'anthropic.claude-instant-v1', | |
| body: JSON.stringify({ | |
| prompt, | |
| temperature: 0.6, |
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
| { | |
| "CDK Construct": { | |
| "prefix": "cdk-constructv2", | |
| "body": [ | |
| "import { Construct } from 'constructs';", | |
| "", | |
| "export interface ${1:ConstructName}Props {", | |
| "", | |
| "}", | |
| "", |
- リポジトリの作成 (app, infra)
- リポジトリをローカルに pull
- AWSアカウントにログイン
- ターミナルのウィンドウ配置
具体的なコマンドはこちらに: https://github.com/tmokmss/isucon12q-infra
- 環境のセットアップ
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
| const https = require('https') | |
| exports.handler = async (event) => { | |
| console.log(event) | |
| const req = event.requestContext.http; | |
| const sourceIp = req.sourceIp; | |
| // can perform IP address restriction here | |
| // e.g. if (sourceIp != "11.4.51.4") throw new Error() |
NewerOlder