agentleFS
ku5icku5ic/claude-kit/skills/deps/SKILL.md

deps

Skill2 starsChanged 8 days agoMITView on GitHub

Merge open Dependabot PRs and reconcile GitHub security alerts

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnose, refactor and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    diagnose

    Use to systematically diagnose why scenarios fail — identifies root causes by analyzing agent traces, codebase, and behavioral patterns

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • AWSSkill

    retro

    Conduct a retrospective on a coding session.

    Also in 3 projects that use this

  • Google CloudSkill

    triage

    Gather context on a change or bug and plan the implementation.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 17 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Do not detect the stack.

    line 20
  2. Distinctive:

    Do not re-list lockfiles.

    line 21
  3. Distinctive:

    Do not hardcode any tool's syntax.

    line 22
  4. Very specific:

    Never run checks locally: a PR's CI (gh pr checks) is its gate.

    line 23
  5. Very specific:

    Do not pass -f state=open: -f sends a body field and makes gh issue a POST, which this read-only endpoint rejects with 404.

    line 44
  6. Very specific:

    Do not use a bare ?state=open either.

    line 45
  7. Distinctive:

    Do not assert "disabled" as fact.

    line 62
  8. Distinctive:

    If a 404 appears only when a filter is attached but not on the bare GET, it is a malformed request: re-issue the bare GET.

    line 63
  9. Distinctive:

    If $ARGUMENTS scopes to an ecosystem or PR number, filter to it.

    line 71
  10. Very specific:

    Stop for approval before mutating (rules/workflow.md sections 2 and 4).

    line 75
  11. Distinctive:

    If still conflicting, resolve locally:

    line 94
  12. Distinctive:

    Never merge on GitHub mergeability alone.

    line 104
  13. Very specific:

    Wait for the PR's CI: gh pr checks <n> --watch.

    line 108
  14. Distinctive:

    After each merge, re-check the next PR's mergeability.

    line 110
  15. Distinctive:

    If alerts were unavailable, state the severity source and name the slug.

    line 135
  16. Distinctive:

    every major bump held

    line 137
  17. Distinctive:

    every PR that failed checks

    line 138
  18. Distinctive:

    every open alert with no PR

    line 139
  19. Distinctive:

    if Phase 5 ran, every transitive pin applied (so the debt is visible)

    line 140
  20. Very specific:

    Only state == "open" alerts are actionable.

    line 147
  21. Distinctive:

    No opportunistic bumps. Touch only deps named in an open alert or open Dependabot PR.

    line 148
  22. Distinctive:

    Stop and hand back to the user, without proceeding further, when:

    line 153
  23. Distinctive:

    No GitHub remote resolves (Precondition 2).

    line 156

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

General core, best-effort tail. Package-manager agnostic.

The core (Phases 1-4) is ecosystem-agnostic: GitHub normalizes Dependabot PRs and security alerts identically across ecosystems, so merging PRs and reconciling alerts works the same everywhere. The tail (Phase 5) is opt-in.

This command names no specific package manager, lockfile, or manifest.

  • Package manager and stack are already injected at session start (<repo-context> block: stack and location, and a package-manager line per lockfile directory). Read them from there. For any install, audit, tree query, lockfile regen, or override, derive the correct command from that manager at runtime.
  • Do not detect the stack.
  • Do not re-list lockfiles.
  • Do not hardcode any tool's syntax.
  • Never run checks locally: a PR's CI (gh pr checks) is its gate.

Preconditions

  1. Require gh. If absent: stop and report. Confirm auth: gh auth status. If unauthenticated, stop.
  2. Resolve the repo slug: gh repo view --json nameWithOwner -q .nameWithOwner. Call it <slug>. If this fails there is no GitHub remote; stop, this command is GitHub-only.
  3. Base branch: !kit git-base``. Merge target and rebase base; do not re-derive it.
  4. Working tree must be clean. If git status --porcelain is non-empty, stop and surface.

Phase 1: inventory

1a. Dependabot PRs

gh pr list --author "app/dependabot" --state open --json number,title,headRefName,mergeable,mergeStateStatus,labels.

Classify each PR by semver bump from its title (Bump x from 1.2.3 to 1.2.4): patch, minor, major.

1b. Dependabot alerts (authoritative for severity; audit is only a cross-check)

Fetch all alerts with one bare GET and filter state client-side in jq.

  • Do not pass -f state=open: -f sends a body field and makes gh issue a POST, which this read-only endpoint rejects with 404.
  • Do not use a bare ?state=open either; an unquoted ? is a zsh glob.
  • Let gh follow the Link header with --paginate; never construct page/first/last, removed for these endpoints on 2025-10-14.
gh api "repos/<slug>/dependabot/alerts" --paginate \
  --jq '.[] | select(.state=="open") | {number, severity: .security_vulnerability.severity, cvss: .security_advisory.cvss.score, ghsa: .security_advisory.ghsa_id, pkg: .dependency.package.name, ecosystem: .dependency.package.ecosystem, scope: .dependency.scope, relationship: .dependency.relationship, manifest: .dependency.manifest_path, fixed: .security_vulnerability.first_patched_version.identifier, range: .security_vulnerability.vulnerable_version_range}'

Field paths were verified against a live payload on 2026-07-02; re-check them if the endpoint's shape has moved since. The ecosystem field identifies each alert's ecosystem; use it. state is one of open, fixed, dismissed, auto_dismissed; only open is actionable.

Branch on the outcome (read it with --include and the HTTP/2 <code> line):

  • 200: alerts are authoritative for severity. Continue.
  • 404 on this bare GET:
    1. Alerts are unavailable for the repo (disabled, or not visible to the token).
    2. Record "GitHub Dependabot alerts unavailable for <slug>" (name the slug).
    3. Fall through to audit-only, flagging every severity "from local audit, may understate".
    4. Do not assert "disabled" as fact.
    5. If a 404 appears only when a filter is attached but not on the bare GET, it is a malformed request: re-issue the bare GET.
  • 403: token lacks scope. A classic PAT needs repo or security_events. Stop and tell the user to run gh auth refresh -s security_events.
  • Any other non-2xx: stop and surface status and body.

1c. Native audit (cross-check only, optional)

A cross-check that may surface advisories GitHub has not yet alerted on. Using the injected package manager, run that ecosystem's native audit if one exists. If the manager has no native audit or its audit tool is not installed, note that and rely on the GitHub alerts alone. A missing audit tool is not an error.

If $ARGUMENTS scopes to an ecosystem or PR number, filter to it.

Phase 2: triage and present

Stop for approval before mutating (rules/workflow.md sections 2 and 4).

  • Severity is from 1b when available; where audit and alerts disagree, trust the alert.
  • Map each open alert to a PR by package and fixed version.
  • Annotate relationship and scope; runtime + direct + critical/high is the priority tier.

Group PRs:

  • Auto-merge candidates: patch/minor, mergeable: MERGEABLE, mergeStateStatus: CLEAN.
  • Conflicted: mergeStateStatus: DIRTY or mergeable: CONFLICTING.
  • Hold for confirmation: major bumps, and any runtime-scope bump whose advisory flags a breaking change.

Flag open alerts with no PR. By default these are reported, not fixed (see Phase 5).

Present a table: severity, package, ecosystem, scope, relationship, current -> fixed, bump, source (alert / PR / both), action. Wait for approval.

Phase 3: resolve conflicts

  1. gh pr comment <n> --body "@dependabot rebase". Poll mergeStateStatus.
  2. If still conflicting, resolve locally:
    • gh pr checkout <n>
    • git rebase <base> (base from Precondition 3)
    • Lockfile conflict: take the incoming dependency change, then regenerate the lockfile with the injected manager's lockfile-only install. Never hand-merge a lockfile.
    • Manifest conflict: merge both edits keeping the higher compatible version, then regenerate the lockfile.
    • git add resolved files, git rebase --continue.
  3. Dependabot branches are bot-owned; force pushing one is rules/workflow.md sections 1 and 2.

Phase 4: verify then merge

Never merge on GitHub mergeability alone. The PR's CI is its gate.

Per candidate, in turn:

  1. Wait for the PR's CI: gh pr checks <n> --watch. On any failing or missing check: do not merge, record the failing check, leave the PR open, move on.
  2. On pass: merge with the project's convention (read recent merges). Default gh pr merge <n> --squash --delete-branch.
  3. After each merge, re-check the next PR's mergeability; a merge can newly conflict a sibling.

Process priority-tier alerts first.

Phase 5: manual remediation of alerts with no PR (opt-in, best-effort)

Runs only when $ARGUMENTS contains --fix-transitive; then read reference/fix-transitive.md and follow it. Without the flag, skip to Phase 6.

Phase 6: report

Load the report-format skill and use its format. Write to the path kit scratch-dir deps prints.

Per PR/alert, report these fields:

FieldValue
packagepackage name
ecosystemdependency ecosystem
scopedependency.scope
relationshipdependency.relationship
version deltacurrent -> fixed
bumppatch / minor / major
severityfrom the alert (or local audit if alerts were unavailable)
actionmerged / held / failed checks / parent bumped / pinned / manual PR opened / no fix available / left for user
  • If alerts were unavailable, state the severity source and name the slug.
  • End with "Still open, needs you", listing:
    • every major bump held
    • every PR that failed checks
    • every open alert with no PR
    • if Phase 5 ran, every transitive pin applied (so the debt is visible)

Rules

  • Core (Phases 1-4) is ecosystem-agnostic. Read the ecosystem field on each alert; never assume a default ecosystem.
  • In Phase 5, prefer a parent bump over a transitive pin. A pin is the fallback, not the default, and it is standing debt; record every one. If the ecosystem's pin mechanism is uncertain, stop and hand back rather than guess.
  • Severity is from the GitHub alert list when available, not local audit.
  • Only state == "open" alerts are actionable. fixed, dismissed, auto_dismissed are not.
  • No opportunistic bumps. Touch only deps named in an open alert or open Dependabot PR.
  • Pushing, protected branches, and mutating Bash calls: rules/workflow.md sections 1 and 2.

Stop conditions

Stop and hand back to the user, without proceeding further, when:

  • gh is absent or unauthenticated (Precondition 1).
  • No GitHub remote resolves (Precondition 2).
  • The working tree is dirty at start (Precondition 4).
  • The alerts endpoint returns 403 (Phase 1b): token lacks scope.
  • Phase 2's proposal table is presented: wait for approval before any mutation.
  • A transitive-pin mechanism can't be confirmed for the ecosystem (Phase 5).
  • A merge would land on or push to a protected branch (Rules).

A failed-checks PR (Phase 4) is not a full stop: record it as held and continue to the next candidate.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.