Batch dependabot resolver

From MoonLadderStudios/MoonMind · View interactive version

Batch dependabot resolver is an AI agent skill from the GitHub repository MoonLadderStudios/MoonMind. Discover open Dependabot version-bump PRs and enqueue one `pr-resolver` workflow for each.

How to use this skill

Skill file

Batch Dependabot Resolver Skill

Purpose

Discover open Dependabot dependency-version PRs in a target repository and enqueue

one pr-resolver workflow per matching PR, so Dependabot bumps can be resolved

automatically on a daily or weekly recurring schedule. This is a narrower,

more restrictive by default discovery/filter layer over batch-pr-resolver: it reuses the

same child pr-resolver payload shape, fork and cross-repository protections, runtime

inheritance, and /api/executions submission path, and adds Dependabot-specific

matching, a cross-run-stable idempotency key, a dry-run mode, an optional maxPrs

cap, and a Dependabot-specific summary artifact.

This parent batch skill does not publish repository changes itself. It records

child workflow queueing evidence in artifacts/batch_dependabot_resolver_result.json;

each queued pr-resolver child owns its repository publishing outcome.

Inputs (skill args)

parent task context, git remote origin, then env, like batch-pr-resolver.

states print a warning.

github-actions. Matched against the Dependabot branch ecosystem segment with alias

normalization (npm↔npm_and_yarn, github-actions↔github_actions). Omit to allow all.

Default ^(?!.* from .* from )(?!.* to .* to )(?:Bump|[A-Za-z][A-Za-z0-9_-]*\(deps(?:-dev)?\): bump) .+ from \S+ to \S+(?: in /.+)?$

(matches both Dependabot's legacy Bump anthropic from 0.105.2 to 0.107.1

titles and conventional-commit titles whose type is scoped to deps or deps-dev,

such as Build(deps): bump anthropic from 0.105.2 to 0.107.1, including

subdirectory suffixes like in /frontend, while rejecting grouped or edited titles

that contain multiple from ... to ... update segments).

security are skipped.

workflows that would be submitted without creating any.

Inherited like batch-pr-resolver when omitted.

Workflow

  1. Resolve helpers exclusively from the run's immutable active bundle.
BATCH_DEPENDABOT_RESOLVER_SKILL_DIR="${BATCH_DEPENDABOT_RESOLVER_SKILL_DIR:-${MOONMIND_ACTIVE_SKILLS_DIR:+$MOONMIND_ACTIVE_SKILLS_DIR/batch-dependabot-resolver}}"
test -n "$BATCH_DEPENDABOT_RESOLVER_SKILL_DIR" && test -f "$BATCH_DEPENDABOT_RESOLVER_SKILL_DIR/SKILL.md"

Inside MoonMind, MOONMIND_ACTIVE_SKILLS_DIR is always set and the helper

below resolves from it; a checked-in .agents/skills directory must never

shadow the selected snapshot. When no skill-specific override is present, the

helper resolves to

${MOONMIND_ACTIVE_SKILLS_DIR:-.agents/skills}/batch-dependabot-resolver/bin/batch_dependabot_resolver.py.

Outside MoonMind, set

BATCH_DEPENDABOT_RESOLVER_SKILL_DIR to the directory containing this

SKILL.md (no MoonMind-only environment variables required). A missing

selected helper is a materialization/packaging error: stop as blocked instead

of substituting stale repository code.

  1. Run the helper script from the resolved Skill directory:
python3 "$BATCH_DEPENDABOT_RESOLVER_SKILL_DIR/bin/batch_dependabot_resolver.py" \
  --repo <owner/repo> \
  --merge-method squash \
  --max-iterations 5 \
  --package-managers pip,npm,github-actions \
  --max-prs 25 \
  --runtime-mode <runtime_mode> \
  --runtime-model <model> \
  --runtime-effort <effort> \
  --runtime-provider-profile <profile_id>

Add --dry-run to validate a schedule without creating resolver workflows.

Always forward the parent task's explicit runtime selection fields when present so the

queued pr-resolver tasks reuse the same runtime/model/effort/provider profile.

  1. The skill discovers open PRs via

gh pr list --json number,title,author,headRefName,headRefOid,headRepository,headRepositoryOwner,isCrossRepository,labels.

  1. A PR is matched only when ALL of:

Every non-matching PR is recorded as skipped with a reason: fork-pr,

not-dependabot-author, non-dependabot-branch, title-mismatch,

package-manager-filtered, security-update-excluded, missing-head-sha, or max-prs-cap.

  1. For each matched PR, submit a pr-resolver task with the canonical batch-pr-resolver

payload (repository, task.inputs = { repo, pr, branch, mergeMethod, maxIterations },

task.git.startingBranch/branch, task.skill.name = pr-resolver,

task.publish.mode = auto, inherited runtime) and a stable idempotency key:

batch-dependabot-resolver:{repo}:pr:{number}:head:{headSha}. Submit via

POST /api/executions, require the canonical workflowId, and verify it via

GET /api/executions/{workflowId} before counting the child as queued

(MOONMIND_URL must point at the MoonMind API). When MoonMind supplies

MOONMIND_EXECUTION_FANOUT_BEARER_TOKEN_FILE (preferred) or

MOONMIND_EXECUTION_FANOUT_BEARER_TOKEN, read/forward the execution-scoped

bearer and mark both calls as fan-out v1. A configured capability file that

is missing or empty fails closed.

  1. Write a summary artifact batch_dependabot_resolver_result.json (under the managed

session artifact spool when available, otherwise the configured --artifacts-dir) listing

discovered PRs, matched count, queued / would-queue resolver workflows, skipped PRs with

reasons, runtime-inheritance mode, and submission errors. A deliberate zero-match run also

writes skill_outcome.json with status: "no_op". When the default title contract rejects

a Dependabot title that still has the shape of a single version bump (`bump ... from ... to

...`), the helper records title-contract drift and fails instead of silently reporting a

successful no-op.

  1. Print a short summary to stdout (matched, queued, would_queue, skipped, errors).

Idempotency

The idempotency key is batch-dependabot-resolver:{repo}:pr:{number}:head:{headSha} (capped at

128 chars with a sha256 fallback). The same Dependabot PR at the same commit only ever gets one

resolver across separate scheduled runs; if Dependabot rebases or updates the PR (new head SHA),

a fresh resolver is allowed.

Recurring schedule (daily / weekly)

Target this skill from a queue_task recurring schedule rather than pr-resolver directly.

Example POST /api/recurring-workflows body:

{
  "name": "Daily Dependabot resolver (MoonLadderStudios/MoonMind)",
  "description": "Resolve open Dependabot version-bump PRs every morning.",
  "enabled": true,
  "scheduleType": "cron",
  "cron": "0 7 * * *",
  "timezone": "UTC",
  "scopeType": "personal",
  "target": {
    "kind": "queue_task",
    "job": {
      "type": "task",
      "priority": 0,
      "maxAttempts": 3,
      "payload": {
        "repository": "MoonLadderStudios/MoonMind",
        "requiredCapabilities": ["gh"],
        "task": {
          "title": "batch-dependabot-resolver",
          "instructions": "Discover open Dependabot version-bump PRs and enqueue one pr-resolver workflow for each.",
          "skill": { "name": "batch-dependabot-resolver", "version": "1.0" },
          "inputs": {
            "repo": "MoonLadderStudios/MoonMind",
            "mergeMethod": "squash",
            "maxIterations": 5,
            "packageManagers": ["pip", "npm", "github-actions"],
            "dryRun": false
          },
          "publish": { "mode": "auto" }
        }
      }
    }
  }
}

Use "cron": "0 7 * * *" for daily 07:00 UTC or "cron": "0 7 * * 1" for weekly (Mondays).

MoonMind delegates cron/time handling to Temporal Schedules. Set "dryRun": true in inputs

to validate a schedule without creating resolver workflows.

Security constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.