Omniscio

OmniscioGuidesExamplesWeekly dependency update

Claude Code Action: a weekly dependency update

Dependency updates are the ideal scheduled job: repetitive, boring, and easy to check. Once a week a runner looks at what is out of date, updates what it safely can, runs your tests, and leaves you a branch and an issue.

Save the file you pick as .github/workflows/dependency-update.yml. It needs the Claude GitHub App and the ANTHROPIC_API_KEY secret before it can do anything — the setup guide covers both, or /install-github-app in the repository handles it.

The first workflow below is Anthropic's published weekly maintenance example, whole. The second narrows it to dependencies and adds the two things a scheduled job needs that a mention-driven one does not: a manual trigger, and a turn cap.

Last checked against Anthropic's documentation and the action's examples on November 25, 2026. By the Omniscio team. Updated .

When it runs

On a cron line, in UTC. "0 0 * * 0" is midnight every Sunday; "0 9 * * *" — the schedule in Anthropic's own report example — is 09:00 UTC every day. With workflow_dispatch added, the same workflow also runs when a person starts it from the Actions tab.

Three rules decide whether a scheduled run happens at all, and each one has cost someone a week of silence. Two are GitHub's; the third is the action's own:

  • The default branch only. GitHub runs scheduled workflows only from the default branch, so a cron added on a feature branch never fires.
  • Sixty days. In a public repository GitHub disables the schedule after 60 days without repository activity.
  • Attribution. A scheduled run is credited to a repository user, usually whoever last edited the cron line. The action's human-actor check applies to scheduled runs too, so if that user is a bot, the run fails until the bot is listed in allowed_bots.

Sources: "Run on a schedule" and "Who can trigger runs" in Anthropic's GitHub Actions page; "Access Control" in the Security guide. Read November 25, 2026.

Anthropic's weekly workflow

From the "Scheduled Repository Maintenance" section of Anthropic's Solutions guide, whole:

name: Weekly Maintenance
on:
  schedule:
    - cron: "0 0 * * 0" # Every Sunday at midnight
  workflow_dispatch: # Manual trigger option

jobs:
  maintenance:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      issues: write
      pull-requests: write
      id-token: write
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0

      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            REPO: ${{ github.repository }}

            Perform weekly repository maintenance:

            1. Check for outdated dependencies in package.json
            2. Scan for security vulnerabilities using `npm audit`
            3. Review open issues older than 90 days
            4. Check for TODO comments in recent commits
            5. Verify README.md examples still work

            Create a single issue summarizing any findings.
            If critical security issues are found, also comment on open PRs.

          claude_args: |
            --allowedTools "Read,Bash(npm:*),Bash(gh issue:*),Bash(git:*)"

Its Key Configuration notes name the three things that matter: schedule for the automated run, workflow_dispatch for the manual one, and a tool list broad enough for the analysis the prompt asks for.

Source: "Scheduled Repository Maintenance" in Solutions & Use Cases, read November 25, 2026.

Narrowed to dependencies

One job, one question: what is out of date, and is it safe to bump? The prompt asks it to run your tests before it commits, and to record what it left alone and why.

name: Dependency Update

on:
  schedule:
    - cron: "17 6 * * 1"  # Mondays, 06:17 UTC — off the hour, which GitHub marks as a busy time
  workflow_dispatch:

jobs:
  update:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    permissions:
      contents: write
      issues: write
      pull-requests: write
      id-token: write
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0

      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          prompt: |
            REPO: ${{ github.repository }}

            Update this repository's dependencies:

            1. Run `npm outdated` and `npm audit` and list what is out of date.
            2. Apply patch and minor updates that do not change a major version.
            3. Leave every major-version bump alone, and say why for each one.
            4. Run the test suite after the updates.
            5. Commit the result to a branch and describe what changed.

            Do not merge anything. Create one issue titled
            "Dependency update: <date>" that lists what you updated,
            what you skipped, and the test result.
          claude_args: |
            --max-turns 30
            --allowedTools "Read,Edit,Write,Bash(npm:*),Bash(git:*),Bash(gh issue:*)"

Why the differences from the published example:

  • --max-turns 30 and timeout-minutes: 30 bound a job that can otherwise read a large lockfile and run a full test suite. A turn cap stops Claude; the timeout stops the runner. You want both.
  • Edit,Write joined the tool list. The published list is Read,Bash(npm:*),Bash(gh issue:*),Bash(git:*): it inspects and reports, and never edits a file. Updating package.json is an edit, so both tools are added.
  • The prompt says what not to do. "Leave every major-version bump alone, and say why" is what keeps the run's output reviewable instead of a wall of changes.

If you authenticate with a subscription instead of an API key, swap the one line for claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}. Nothing else changes.

One thing this workflow does not do: prepare the runner. Step 4 tells Claude to run your test suite, and a fresh runner holds no node_modules. If your tests need an install or a particular Node version, add a setup step before the action — actions/setup-node followed by npm ci — or the run will report your tests as failing when nothing is wrong with your code.

What it can do that you may not want. Bash(git:*) is a broad rule: it lets Claude run any git command, including a push to a branch you did not intend. If you want branch protection to be the thing that stops a merge, say so in claude_args as well, with --disallowedTools "Bash(git push:*)" — Anthropic documents that as the way to stop a workflow's pushes.

Sources: the tool list and prompt shape follow "Scheduled Repository Maintenance" in Solutions; --max-turns and the cost guidance are from "Manage costs" in Anthropic's GitHub Actions page. Read November 25, 2026.

What each key does

KeyWhat it does here
on.schedule.cronWhen the run happens, in UTC. GitHub can delay a scheduled run when its runners are busy, and the start of every hour is one of the busy times, so pick a minute past the hour and treat the time as a window rather than an exact minute.
on.workflow_dispatchAdds a manual button in the Actions tab. Useful on the first week, when you want to watch it work.
timeout-minutesA hard stop for the whole job, longer than the work should take.
permissions.contents: writeWhat a push needs. The published example carries it because the job commits; a scheduled job that only inspects and reports does not need it.
permissions.issues: writeRequired for the summary issue the prompt asks for.
permissions.pull-requests: writeFor commenting on and creating pull requests — which is what the published prompt's "if critical security issues are found, also comment on open PRs" needs. It is not what a branch push needs; that is contents: write.
permissions.id-token: writeThe OIDC exchange for the GitHub App, exactly as in every other workflow.
actions/checkout with fetch-depth: 0Full history. A dependency job may want to see when a version was last changed, and the published example asks for the same depth.
promptPuts the action in automation mode: with a prompt it runs the moment the event fires, which is what makes a cron run do the work without anyone mentioning it.
claude_args--max-turns caps the run; --allowedTools names what Claude may run, and a plain prompt has no shell or GitHub API access without it.

One input you may want later: branch_prefix sets the prefix for the branches Claude creates, claude/ by default. Changing it to claude- is how you get dash-separated branch names in a repository that forbids slashes.

Sources: "Run on a schedule" in Anthropic's GitHub Actions page; the branch_prefix row and the permission mode notes in Usage; the example's own configuration notes in Solutions. Read November 25, 2026.

Secrets and permissions

  • ANTHROPIC_API_KEY — a Claude API key, stored as a repository secret. For a shared organization-level secret, Anthropic recommends an API key rather than an OAuth token, because an OAuth token belongs to the subscription of whoever generated it.
  • contents: write — the permission a branch push needs. A review workflow does not carry it; this one does, because the job commits.
  • issues: write and pull-requests: write — for the summary issue the prompt asks for, and for comments.
  • id-token: write — the App exchange, as always.

A scheduled run has no external actor, so GitHub does not apply the write-access check that a comment triggers. That does not make it less privileged: it runs with the job's permissions, a secret, and the ability to push. Keep --allowedTools to the commands the job needs, and review the branch before merging it.

Sources: "Manual setup", "Set up for an organization" and "Protect your credentials" in Anthropic's GitHub Actions page; "Access Control" in the Security guide. Read November 25, 2026.

How to confirm it ran

  • The Actions tab on a Monday. A scheduled run appears under Dependency Update without a pull request number beside it. That absence is normal: no pull request triggered it.
  • The issue it opened. The prompt asks for one issue listing what changed, what was skipped and the test result. That issue is your report; the run log is only for when it is missing.
  • The branch. A claude/-prefixed branch holds the commit. By default Claude pushes commits and hands you a link to a pre-filled pull request page rather than opening the pull request, so the next step is yours.

Sources: "Why won't Claude create a pull request?" in the FAQ; the branch_prefix row in Usage. Read November 25, 2026.

The common failure

A schedule that quietly stops. This is the failure people report as "it worked for months". In order of likelihood:

  • The bot actor. A scheduled run is attributed to a repository user, usually whoever last edited the cron line. If that is a bot, the action's human-actor check rejects the run until you list the bot in the action's allowed_bots input — for example allowed_bots: "my-app[bot]" under the step's with:.
  • Sixty days of quiet. On a public repository GitHub disables the schedule after 60 days without repository activity.
  • The file is not on the default branch. Scheduled workflows run only from the default branch, so a workflow merged to another branch never fires.

The run that does nothing visible. Automation mode writes to the run log unless the prompt asks for a comment and Claude has a tool that posts. Bash(gh issue:*) in --allowedTools is what lets the summary issue exist at all; without it the findings stay in the log.

The commit that never appears. A job with contents: read can analyse and report but cannot push. The published example uses contents: write for exactly this reason.

Sources: "Run on a schedule" and "Who can trigger runs" in Anthropic's GitHub Actions page; "Interactive and automation modes" on the same page; "Scheduled Repository Maintenance" in Solutions. Read November 25, 2026.

Where these answers come from

  • Solutions & Use Cases — "Scheduled Repository Maintenance", the first workflow on this page, and its configuration notes.
  • Claude Code GitHub Actions — the schedule example, the three GitHub rules, who can trigger a run, organization secrets, and costs.
  • Usage — branch_prefix, the permission mode, and the full input list.
  • FAQ — what Claude will and will not do with commits and pull requests.
  • The setup this workflow assumes is on Claude Code GitHub Actions; the other four workflows are on the examples hub.

Common questions

Why did my scheduled workflow stop running?

Check the bot attribution first: a run credited to a bot fails unless the bot is in allowed_bots. Then check the 60-day inactivity rule on public repositories and whether the file is on the default branch.

Does Claude open the pull request?

No. It pushes commits to a branch and gives you a pre-filled pull request link, so branch protection applies and the merge is your decision.

Why is there no comment on the issue?

Automation mode writes to the run log by default. Allow Bash(gh issue:*) so Claude can run the command that creates the issue.

Can I run it on demand?

Yes — add workflow_dispatch to the on block and start it from the Actions tab.