Skip to content

Add the Claude Agent SDK Sample#139

Merged
poad merged 1 commit intomainfrom
feat/agent-sdk
Nov 9, 2025
Merged

Add the Claude Agent SDK Sample#139
poad merged 1 commit intomainfrom
feat/agent-sdk

Conversation

@poad
Copy link
Copy Markdown
Owner

@poad poad commented Nov 9, 2025

概要

概要を記述。

変更点

追加・変更・削除したファイル (リポジトリルートからの相対パス) 変更内容 事由
変更したファイルのリポジトリルートからの相対パス どんな変更を行なったのか? 何故、変更が必要だったのか?

確認事項

  • (Typescriptの場合) pnpm audit --fix で脆弱性を修正済みか?
  • (Typescriptの場合) pnpm lint-fix でコードスタイルは修正済みか?
  • (Markdownの場合)markdownlint-2 で Markdown の lint は修正済みか?

特記事項

@amazon-q-developer
Copy link
Copy Markdown
Contributor

Code review in progress. Analyzing for code quality issues and best practices. You can monitor the review status in the checks section at the bottom of this pull request. Detailed findings will be posted upon completion.

Using Amazon Q Developer for GitHub

Amazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation.

Slash Commands

Command Description
/q <message> Chat with the agent to ask questions or request revisions
/q review Requests an Amazon Q powered code review
/q help Displays usage information

Features

Agentic Chat
Enables interactive conversation with Amazon Q to ask questions about the pull request or request specific revisions. Use /q <message> in comment threads or the review body to engage with the agent directly.

Code Review
Analyzes pull requests for code quality, potential issues, and security concerns. Provides feedback and suggested fixes. Automatically triggered on new or reopened PRs (can be disabled for AWS registered installations), or manually with /q review slash command in a comment.

Customization

You can create project-specific rules for Amazon Q Developer to follow:

  1. Create a .amazonq/rules folder in your project root.
  2. Add Markdown files in this folder to define rules (e.g., cdk-rules.md).
  3. Write detailed prompts in these files, such as coding standards or best practices.
  4. Amazon Q Developer will automatically use these rules when generating code or providing assistance.

Example rule:

All Amazon S3 buckets must have encryption enabled, enforce SSL, and block public access.
All Amazon DynamoDB Streams tables must have encryption enabled.
All Amazon SNS topics must have encryption enabled and enforce SSL.
All Amazon SNS queues must enforce SSL.

Feedback

To provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository.

For more detailed information, visit the Amazon Q for GitHub documentation.

Footnotes

  1. Amazon Q Developer uses generative AI. You may need to verify generated code before using it in your environment. See the AWS Responsible AI Policy.

@poad
Copy link
Copy Markdown
Owner Author

poad commented Nov 9, 2025

/oc レビューして

Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビュー概要

Claude Agent SDKサンプルの追加について、以下の重要な問題を特定しました:

🔴 重要な修正が必要な項目

  1. セキュリティ脆弱性: src/index.tsでハードコードされたプロンプトとallowedTools: ["Write"]の組み合わせが任意のファイル書き込みを許可し、コードインジェクション攻撃のリスクがあります
  2. 環境ファイルの保護: .gitignore.env*パターンを使用してすべての環境ファイルを除外する必要があります

🟡 修正推奨項目

  1. 設定ファイルの整合性:

    • package.jsonのmainフィールドがビルド後のファイルを指していない
    • tsconfig.jsonで存在しないlambdaディレクトリを参照
    • eslint.config.tsで存在しないディレクトリパターンを使用
  2. プロジェクト情報: package.jsonのdescriptionフィールドが空

✅ 確認事項

PRの説明に記載されている確認事項(pnpm audit --fixpnpm lint-fix)の実行状況を確認してください。

セキュリティ関連の修正を優先的に対応していただき、その他の設定ファイルの整合性も併せて修正をお願いします。


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

Comment thread agents/agent-sdk/src/index.ts
Comment thread agents/agent-sdk/package.json Outdated
Comment thread agents/agent-sdk/package.json Outdated
Comment thread agents/agent-sdk/tsconfig.json Outdated
Comment thread agents/agent-sdk/tsconfig.json Outdated
Comment thread agents/agent-sdk/.gitignore Outdated
Comment thread agents/agent-sdk/eslint.config.ts Outdated
@poad poad force-pushed the feat/agent-sdk branch 5 times, most recently from 85def35 to 175cdd3 Compare November 9, 2025 04:41
@poad
Copy link
Copy Markdown
Owner Author

poad commented Nov 9, 2025

/opencode レビューして

@opencode-agent
Copy link
Copy Markdown

opencode-agent Bot commented Nov 9, 2025

APIError:

opencode session  |  github run

@poad poad marked this pull request as ready for review November 9, 2025 06:24
@poad poad merged commit 69b8cdb into main Nov 9, 2025
6 checks passed
@poad poad deleted the feat/agent-sdk branch November 9, 2025 06:24
poad added a commit that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant