- 対象: AWS CDK v2 (TypeScript) でインフラを管理し、GitHub でホストしているアプリケーションのリポジトリ
- コーディングエージェント (Claude Code / Codex / Devin など) をリポジトリのルートで起動し、区切り線から下を丸ごと貼り付けてください
- 事前にあるとスムーズなもの (無くてもエージェントがセットアップ手順を出力します):
- GitHub Actions から OIDC で assume できるデプロイ用 IAM ロール
- デプロイ先アカウント/リージョンで
cdk bootstrap済み
- 生成されたコードは、マージ前に必ず
cdk diffの内容とワークフローの権限設定をレビューしてください
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 json | |
| import os | |
| import subprocess | |
| import sys | |
| from typing import Any, Optional | |
| STATE_DIR = "/tmp/claude-statusline-state" | |
| BOLD = "\033[1m" | |
| YELLOW = "\033[33m" |
| name | cognitive-rhythm-writing |
|---|---|
| description | 説明的な文章に緩急を設計するための規範。緩急を装飾ではなく認知モードの切替(観察→逡巡→断定→再観察)と未回収の緊張の管理として扱い、文の拍、段落の密度波形、節の入り方、緩みと駄文の判別、執筆後の機械的な点検手順を定める。読み物として読ませたい章・記事・解説文を生成するとき、または「密度はあるが平坦でおもしろくない」文章を診断・修正するときに使用する。 |
密度の高い文章が退屈になるのは、情報が多いからではなく、全文が同じ認知モードで書かれているからである。 この規範は、読者の認知モード(観察する、迷う、確信する、確かめ直す)を意図的に切り替え、常に「続きを読む理由」を維持することで、読み進める推進力を作る。
| name | Serverless Framework GitHub Actions Deployment |
|---|---|
| description | Set up GitHub Actions workflow for Serverless Framework or oss-serverless projects. Enables secure deployment using AWS OIDC authentication without storing IAM credentials locally. Supports multiple environments (dev/prod) with manual workflow dispatch. |
- role: system content: |- You help add secure GitHub Actions deployment workflows to Serverless Framework (or oss-serverless) projects. The goal is to eliminate IAM user credentials from local machines by using OIDC-based AWS authentication.
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 { Construct } from 'constructs'; | |
| import * as cdk from 'aws-cdk-lib'; | |
| import * as iam from 'aws-cdk-lib/aws-iam'; | |
| import * as s3 from 'aws-cdk-lib/aws-s3'; | |
| const app = new cdk.App(); | |
| const stack = new cdk.Stack(app, 'ExampleStack'); | |
| const role = new iam.Role(stack, 'ExampleRole', { | |
| assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'), |
著者: 青い鴉(ぶるくろ)さん @bluecrow2
これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。
今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。
昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。
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 * as cdk from 'aws-cdk-lib'; | |
| import * as ecs from 'aws-cdk-lib/aws-ecs'; | |
| import * as ecr from 'aws-cdk-lib/aws-ecr'; | |
| import * as iam from 'aws-cdk-lib/aws-iam'; | |
| import { Construct } from 'constructs'; | |
| interface MyStackProps extends cdk.StackProps {} | |
| export class MyStack extends cdk.Stack { | |
| constructor(scope: Construct, id: string, props: MyStackProps) { |
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
| ## 重要事項 | |
| `git status` を使って、現在開いているワークスペースが git で管理されているかどうか確認します。現在の git コンテキストを確認し、もし指示された内容と無関係な変更が多い場合は、現在の変更からユーザーに別のタスクとして開始するように提案をしてください。ユーザーが無視してよいと指示した場合はそのまま続行します。 | |
| ## セキュリティ | |
| ファイル名に次の規則を持つものは、参照しないでください。 |
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/zsh | |
| # Check if jq is installed | |
| function check_jq() { | |
| if ! command -v jq &> /dev/null; then | |
| echo "Error: jq is not installed. Please install jq to use this script." | |
| return 1 | |
| fi | |
| } |
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
| # blog(jp): https://zenn.dev/hassaku63/articles/b026266e5a82b4 | |
| alias jq-dotenv="jq -R 'split(\"\n\") | map(split(\"=\")) | flatten | {\"name\": .[0], \"value\": .[1]}'" | |
| function dotenv-to-json () { | |
| filename=$1 | |
| grep -v '^\s*#' ${filename} |grep -v '^\s*$' | \ | |
| jq -R 'split("\n") | map(split("=")) | flatten | {"name": .[0], "value": .[1]}' | |
| } |
NewerOlder