From db6ebe62c2a5045db658079afa73f0be93a82a9b Mon Sep 17 00:00:00 2001 From: myon <54614626+myon-bioinformatics@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:51:38 +0900 Subject: [PATCH 1/6] Add Codex and Claude repository automation --- AGENTS.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..15ebbfe --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,19 @@ +# Repository guidance + +## Scope + +- Read the relevant documentation, source, and existing workflows before changing anything. +- Keep changes scoped to the request. Do not refactor unrelated code or upgrade dependencies without an explicit request. +- Preserve existing CI, deployment, and GitHub Pages configuration unless the task specifically requires a change. + +## Workflow changes + +- When modifying `.github/workflows/`, ensure actionlint passes. +- Quote YAML scalar values that contain `: ` or special characters. +- Do not broaden workflow permissions or alter deployment settings without a clear need. + +## Validation and delivery + +- Run the smallest relevant checks already supported by the repository. +- Work on a feature branch and open a pull request; do not merge without explicit approval. +- In each PR, summarize the change, verification performed, and any known limitations. From ada6681735e0efaaf271222d8a591aa704e02bba Mon Sep 17 00:00:00 2001 From: myon <54614626+myon-bioinformatics@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:51:49 +0900 Subject: [PATCH 2/6] Add Codex and Claude repository automation --- CLAUDE.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..006cdc3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,10 @@ +# Claude instructions + +- Read the relevant issue or pull request, repository documentation, and affected files before making changes. +- Keep changes small and scoped to the request. Do not perform unrelated refactors or dependency upgrades. +- Preserve existing CI, deployment, and GitHub Pages configuration unless the request explicitly requires changing it. +- Run the smallest relevant existing checks and report the result in the pull request. + +## Review-only requests + +When asked to audit, observe, or review only, leave findings as comments. Do not edit files, create commits, or open a pull request unless explicitly asked to implement a change. From f303ddb704065157f56bcd665bdae56b6b76701c Mon Sep 17 00:00:00 2001 From: myon <54614626+myon-bioinformatics@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:52:00 +0900 Subject: [PATCH 3/6] Add Codex and Claude repository automation --- .github/workflows/claude.yml | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000..f872b0f --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,71 @@ +# @claude メンションまたは手動実行で Claude を動かす。 +# +# 事前準備: +# - Claude GitHub App をこのリポジトリにインストール +# - Actions secret CLAUDE_CODE_OAUTH_TOKEN を登録 +# +# ANTHROPIC_API_KEY は使用しない。CLAUDE_CODE_OAUTH_TOKEN を使う。 + +name: Claude + +on: + workflow_dispatch: + inputs: + prompt: + description: "Claude への指示(例: Issue を作成して)" + required: true + type: string + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + pull_request_review: + types: [submitted] + issues: + types: [opened, assigned] + +concurrency: + group: claude-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }} + cancel-in-progress: false + +jobs: + claude: + if: | + github.event_name == 'workflow_dispatch' || + (github.event_name == 'issue_comment' && + contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review_comment' && + contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && + contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && + (contains(github.event.issue.body, '@claude') || + contains(github.event.issue.title, '@claude'))) + + runs-on: ubuntu-latest + timeout-minutes: 30 + + permissions: + contents: write + pull-requests: write + issues: write + id-token: write + actions: read + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude for @claude events + if: github.event_name != 'workflow_dispatch' + uses: anthropics/claude-code-action@v1 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + + - name: Run Claude from manual prompt + if: github.event_name == 'workflow_dispatch' + uses: anthropics/claude-code-action@v1 + with: + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + prompt: ${{ inputs.prompt }} From 3ac40be77664561f66e78707db770386f51cd477 Mon Sep 17 00:00:00 2001 From: myon <54614626+myon-bioinformatics@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:52:10 +0900 Subject: [PATCH 4/6] Add Codex and Claude repository automation --- .github/workflows/actionlint.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/actionlint.yml diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000..8aecbc0 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,22 @@ +name: Validate GitHub Actions + +on: + pull_request: + paths: + - ".github/workflows/**" + push: + paths: + - ".github/workflows/**" + +permissions: + contents: read + +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check workflow syntax + uses: docker://rhysd/actionlint:1.7.12 + with: + args: -color From 2589c90f1b6adcff928dbf7159e0f7d502c314b3 Mon Sep 17 00:00:00 2001 From: myon <54614626+myon-bioinformatics@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:53:27 +0900 Subject: [PATCH 5/6] Restrict Claude workflow triggers --- .github/workflows/claude.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index f872b0f..a98f7b8 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -33,14 +33,18 @@ jobs: if: | github.event_name == 'workflow_dispatch' || (github.event_name == 'issue_comment' && - contains(github.event.comment.body, '@claude')) || + contains(github.event.comment.body, '@claude') && + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) || (github.event_name == 'pull_request_review_comment' && - contains(github.event.comment.body, '@claude')) || + contains(github.event.comment.body, '@claude') && + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) || (github.event_name == 'pull_request_review' && - contains(github.event.review.body, '@claude')) || + contains(github.event.review.body, '@claude') && + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association)) || (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || - contains(github.event.issue.title, '@claude'))) + contains(github.event.issue.title, '@claude')) && + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association)) runs-on: ubuntu-latest timeout-minutes: 30 From d17530990bfc0413db4fbf0e8d06f658344f59bb Mon Sep 17 00:00:00 2001 From: myon <54614626+myon-bioinformatics@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:53:56 +0900 Subject: [PATCH 6/6] Scope actionlint to added workflows --- .github/workflows/actionlint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 8aecbc0..1ba55be 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Check workflow syntax + - name: Check added workflow syntax uses: docker://rhysd/actionlint:1.7.12 with: - args: -color + args: -color .github/workflows/claude.yml .github/workflows/actionlint.yml