Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .claude/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"mcpServers": {
"ols-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"ols-mcp"
],
"env": {}
},
"pubmed": {
"type": "http",
"url": "https://pubmed.mcp.claude.com/mcp"
}
}
}
14 changes: 14 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"permissions": {
"allow": [
"Bash(*)",
"Edit",
"MultiEdit",
"NotebookEdit",
"FileEdit",
"WebFetch",
"WebSearch",
"Write"
]
}
}
29 changes: 21 additions & 8 deletions .github/actions/claude-code-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ inputs:
required: true
anthropic_api_key:
description: "Anthropic API key"
required: true
required: false
cborg_api_key:
description: "CBORG API key"
required: true
required: false
claude_code_oauth_token:
description: "Claude Code OAuth token"
required: false
prompt:
description: "The prompt to send to Claude Code"
required: false
Expand Down Expand Up @@ -90,6 +93,7 @@ runs:
shell: bash
id: prepare_prompt
run: |

# Check if either prompt or prompt_file is provided
if [ -z "${{ inputs.prompt }}" ] && [ -z "${{ inputs.prompt_file }}" ]; then
echo "::error::Neither 'prompt' nor 'prompt_file' was provided. At least one is required."
Expand Down Expand Up @@ -125,6 +129,14 @@ runs:
shell: bash
id: run_claude
run: |

if [ ! -z "${{ inputs.claude_code_oauth_token }}" ]; then
echo CLAUDE AUTH TOKEN IS NOT SET
else
echo CLAUDE AUTH TOKEN IS SET
export ANTHROPIC_API_KEY=
Comment on lines +134 to +137
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The logic in this conditional check is inverted. The condition checks if the token is NOT empty (! -z means "not zero length"), but then echoes "IS NOT SET". When the token exists, it should say "IS SET", and when it doesn't exist, it should say "IS NOT SET". Additionally, line 137 sets ANTHROPIC_API_KEY to empty without a value assignment operator, which will cause a syntax error.

Suggested change
echo CLAUDE AUTH TOKEN IS NOT SET
else
echo CLAUDE AUTH TOKEN IS SET
export ANTHROPIC_API_KEY=
echo CLAUDE AUTH TOKEN IS SET
else
echo CLAUDE AUTH TOKEN IS NOT SET
export ANTHROPIC_API_KEY=""

Copilot uses AI. Check for mistakes.
fi

ALLOWED_TOOLS_ARG=""
if [ ! -z "${{ inputs.allowed_tools }}" ]; then
ALLOWED_TOOLS_ARG="--allowedTools ${{ inputs.allowed_tools }}"
Expand All @@ -135,15 +147,15 @@ runs:

if [ -z "${{ inputs.output_file }}" ]; then
# Run Claude Code and output to console
timeout $timeout_seconds claude \
claude \
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The timeout command has been removed from this line. This means Claude Code will run without a timeout, potentially causing the workflow to hang indefinitely if Claude doesn't complete. The timeout_seconds variable is still calculated but no longer used, making the timeout_minutes input parameter ineffective.

Copilot uses AI. Check for mistakes.
-p \
--verbose \
--output-format stream-json \
"$(cat ${{ env.PROMPT_PATH }})" \
${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }}
else
# Run Claude Code and tee output to console and file
timeout $timeout_seconds claude \
claude \
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The timeout command has been removed from this line. This means Claude Code will run without a timeout, potentially causing the workflow to hang indefinitely if Claude doesn't complete. The timeout_seconds variable is still calculated but no longer used, making the timeout_minutes input parameter ineffective.

Copilot uses AI. Check for mistakes.
-p \
--verbose \
--output-format stream-json \
Expand All @@ -160,8 +172,9 @@ runs:
fi

env:
ANTHROPIC_API_KEY: "."
ANTHROPIC_AUTH_TOKEN: ${{ inputs.cborg_api_key }}
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }}
# ANTHROPIC_AUTH_TOKEN: ${{ inputs.cborg_api_key }}
CLAUDE_CODE_OAUTH_TOKEN: ${{ inputs.claude_code_oauth_token }}
Comment on lines +175 to +177
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The environment variable configuration has changed from using ANTHROPIC_AUTH_TOKEN with cborg_api_key to using ANTHROPIC_API_KEY with anthropic_api_key and CLAUDE_CODE_OAUTH_TOKEN with claude_code_oauth_token. However, both anthropic_api_key and claude_code_oauth_token are marked as optional (required: false), which means the action could run without any authentication credentials. At least one authentication method should be required to prevent the action from failing at runtime.

Copilot uses AI. Check for mistakes.
GITHUB_TOKEN: ${{ inputs.github_token }}
ANTHROPIC_BASE_URL: "https://api.cborg.lbl.gov"
DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1"
# ANTHROPIC_BASE_URL: "https://api.cborg.lbl.gov"
# DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1"
10 changes: 7 additions & 3 deletions .github/actions/claude-issue-summarize-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ inputs:
default: "5"
anthropic_api_key:
description: "Anthropic API key"
required: true
required: false
cborg_api_key:
description: "CBORG API key"
required: true
required: false
claude_code_oauth_token:
description: "Claude Code OAuth token"
required: false
github_token:
description: "GitHub token with repo and issues permissions"
required: true
Expand All @@ -22,7 +25,7 @@ runs:
- name: Checkout repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Create prompt file
shell: bash
Expand Down Expand Up @@ -70,5 +73,6 @@ runs:
install_artl_mcp: "true"
timeout_minutes: ${{ inputs.timeout_minutes }}
anthropic_api_key: ${{ inputs.anthropic_api_key }}
claude_code_oauth_token: ${{ inputs.claude_code_oauth_token }}
cborg_api_key: ${{ inputs.cborg_api_key }}
github_token: ${{ inputs.github_token }}
8 changes: 6 additions & 2 deletions .github/actions/claude-issue-triage-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ inputs:
default: "5"
anthropic_api_key:
description: "Anthropic API key"
required: true
required: false
claude_code_oauth_token:
description: "Claude Code OAuth token"
required: false
cborg_api_key:
description: "CBORG API key"
required: true
Expand All @@ -22,7 +25,7 @@ runs:
- name: Checkout repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Create prompt file
shell: bash
Expand Down Expand Up @@ -87,5 +90,6 @@ runs:
install_github_mcp: "true"
timeout_minutes: ${{ inputs.timeout_minutes }}
anthropic_api_key: ${{ inputs.anthropic_api_key }}
claude_code_oauth_token: ${{ inputs.claude_code_oauth_token }}
cborg_api_key: ${{ inputs.cborg_api_key }}
github_token: ${{ inputs.github_token }}
22 changes: 22 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# CLAUDE.md for

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Comment on lines +1 to +3
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The file is named "copilot-instructions.md" but the header says "CLAUDE.md for". This appears to be copied from a Claude-specific file without updating the header. The header should either reference GitHub Copilot or be more generic to match the filename.

Suggested change
# CLAUDE.md for
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Copilot Instructions
This file provides guidance to GitHub Copilot when working with code in this repository.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The file provides guidance for "Claude Code" but is placed in a file specifically named for GitHub Copilot instructions. This creates confusion about which AI tool the instructions are intended for. Either the content should be made generic to cover both tools, or separate instruction files should be created for each tool.

Copilot uses AI. Check for mistakes.

WARNING: read this closely as it gets a bit meta.

This is a repo for a copier project intended to allow people to set up their github repo with AI github actions.

- template files are in `template/`
- all other files are for this repo itself

So for example

- template/.github/workflows/claude.yml - A template that is copied into a users target repo to set up claude gh actions
- .github/workflows/claude.yml - The actual github actions for this repo itself.

This repo eats its own dogfood! We will occasionally run

`copier copy template .`



78 changes: 78 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@beta
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514"

# Direct prompt for automated review (no @claude mention needed)
direct_prompt: |
Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage
Be constructive and helpful in your feedback.
# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
# use_sticky_comment: true

# Optional: Customize review based on file types
# direct_prompt: |
# Review this PR focusing on:
# - For TypeScript files: Type safety and proper interface usage
# - For API endpoints: Security, input validation, and error handling
# - For React components: Performance, accessibility, and best practices
# - For tests: Coverage, edge cases, and test quality

# Optional: Different prompts for different authors
# direct_prompt: |
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}

# Optional: Add specific tools for running tests or linting
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"

# Optional: Skip review for certain conditions
# if: |
# !contains(github.event.pull_request.title, '[skip-review]') &&
# !contains(github.event.pull_request.title, '[WIP]')

27 changes: 27 additions & 0 deletions .github/workflows/claude-issue-summarize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Claude Issue summarize
description: "Automatically summarize GitHub issues using Claude Code"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The 'description' field is not valid in GitHub Actions workflow syntax at the top level. This field should be removed as it's only valid within action.yml files, not workflow files.

Suggested change
description: "Automatically summarize GitHub issues using Claude Code"

Copilot uses AI. Check for mistakes.

on:
issues:
types: [opened]

jobs:
summarize-issue:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Run Claude Issue summarize
uses: ./.github/actions/claude-issue-summarize-action
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
cborg_api_key: ${{ secrets.CBORG_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/claude-issue-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Claude Issue Triage
description: "Automatically triage GitHub issues using Claude Code"
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

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

The 'description' field is not valid in GitHub Actions workflow syntax at the top level. This field should be removed as it's only valid within action.yml files, not workflow files.

Suggested change
description: "Automatically triage GitHub issues using Claude Code"

Copilot uses AI. Check for mistakes.

on:
issues:
types: [opened]

jobs:
triage-issue:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Run Claude Issue Triage
uses: ./.github/actions/claude-issue-triage-action
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
cborg_api_key: ${{ secrets.CBORG_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading