agentsclimarketplace

Claude code action

Skill CodySwannGT/lisa/.agents/skills/claude-code-action

Knowledge base for creating and configuring Claude Code Action GitHub workflowsFrom its SKILL.md

Install
npx -y skills add CodySwannGT/lisa --skill claude-code-action

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.3 KB, as published. Nobody here has run it

Claude Code Action Workflow Guide

Reference guide for creating anthropics/claude-code-action@v1 GitHub workflows.

Authentication

Choose one authentication method:

MethodInputUse Case
OAuth Tokenclaude_code_oauth_tokenRecommended for most setups (requires Claude Pro or Max)
API Keyanthropic_api_keyDirect Anthropic API key from console.anthropic.com
AWS Bedrockaws_access_key_id + aws_secret_access_keyAWS-hosted Claude
GCP Vertexgcp_project_id + gcp_region + gcp_workload_identity_providerGoogle Cloud Claude

Getting CLAUDE_CODE_OAUTH_TOKEN

Requires a Claude Pro or Max subscription.

  1. Run locally:
    claude setup-token
    
  2. Copy the output token
  3. Add it as a GitHub repository secret:
    gh secret set CLAUDE_CODE_OAUTH_TOKEN
    
    Paste the token when prompted.

On macOS, Claude Code stores credentials in the encrypted Keychain (not a plain file). The setup-token command is the official way to extract a token for CI use.

Repository Configuration

NameTypeRequired ForHow to Set
CLAUDE_CODE_OAUTH_TOKENSecretAll Claude workflowsgh secret set CLAUDE_CODE_OAUTH_TOKEN
ENABLE_CLAUDE_NIGHTLYVariableNightly workflows (opt-in)gh variable set ENABLE_CLAUDE_NIGHTLY --body "true"

Workflow Patterns

Interactive (PR/Issue mentions)

Triggered when users mention @claude in comments, reviews, or issues.

on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
  issues:
    types: [opened, assigned]
  pull_request_review:
    types: [submitted]

CI Auto-Fix (Automation)

Triggered when a CI workflow fails. Automatically fixes the code.

on:
  workflow_run:
    workflows: ["CI Quality Checks"]
    types: [completed]

Guard against infinite loops:

if: |
  github.event.workflow_run.conclusion == 'failure' &&
  !startsWith(github.event.workflow_run.head_branch, 'claude-auto-fix-') &&
  github.event.workflow_run.head_branch != 'main' &&
  github.event.workflow_run.head_branch != 'staging' &&
  github.event.workflow_run.head_branch != 'dev'

Nightly/Scheduled

Runs on a cron schedule for maintenance tasks (test improvement, coverage).

on:
  schedule:
    - cron: '0 3 * * 1-5'  # 3 AM UTC weekdays
  workflow_dispatch:

Use opt-in guard:

if: vars.ENABLE_CLAUDE_NIGHTLY == 'true'

Standard Permissions Block

permissions:
  contents: write
  pull-requests: write
  issues: write
  actions: read
  id-token: write

Tool Allowlisting

Standard allowedTools for Lisa projects:

Edit,MultiEdit,Write,Read,Glob,Grep,Bash(git:*),Bash(npm:*),Bash(npx:*),Bash(bun:*),Bash(yarn:*),Bash(pnpm:*),Bash(gh:*)

This covers:

  • File operations: Edit, MultiEdit, Write, Read, Glob, Grep
  • Git: Bash(git:*) -- commit, push, branch, etc.
  • Package managers: npm, npx, bun, yarn, pnpm
  • GitHub CLI: Bash(gh:*) -- create PRs, issues, etc.

Key Inputs

InputRequiredDescription
promptNoTask instructions for Claude
claude_code_oauth_tokenYes*OAuth token for authentication
claude_argsNoCLI args: --allowedTools, --max-turns, --system-prompt, --mcp-config
branch_prefixNoPrefix for auto-created branches (e.g., claude/nightly-)
additional_permissionsNoExtra GitHub permissions (e.g., actions: read)
max_turnsNoMax agentic turns (via claude_args --max-turns)
track_progressNoEnable progress tracking comments
allowed_botsNoComma-separated bot names allowed to trigger
allowed_non_write_usersNoUsers without write access who can trigger

MCP Configuration

Pass MCP server config via claude_args:

claude_args: |
  --mcp-config .mcp.json

Pass secrets to MCP servers via environment variables in the workflow.

Patterns

Duplicate PR Prevention

Before running nightly workflows, check for existing open PRs:

- name: Check for existing PR
  id: check-pr
  uses: actions/github-script@v7
  with:
    script: |
      const pulls = await github.rest.pulls.list({
        owner: context.repo.owner,
        repo: context.repo.repo,
        state: 'open',
        per_page: 100,
      });
      const existing = pulls.data.find(pr =>
        pr.head.ref.startsWith('claude/nightly-') &&
        pr.title.toLowerCase().includes('your-keyword')
      );
      core.setOutput('has_existing_pr', existing ? 'true' : 'false');

- name: Run Claude
  if: steps.check-pr.outputs.has_existing_pr != 'true'
  uses: anthropics/claude-code-action@v1

Cost Control

Use --max-turns to limit API usage:

claude_args: |
  --max-turns 25

Recommended limits:

  • Interactive (PR/issue): No limit (user-driven)
  • CI auto-fix: 25 turns
  • Nightly workflows: 40 turns

Security

  • Never hardcode secrets in workflow files
  • Use ${{ secrets.* }} for all sensitive values
  • Sanitize dynamic content in prompts to prevent injection
  • Use allowed_bots to control which bots can trigger Claude

Keep looking

Skills are one crate of 610,220. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.