Dependabot

From G1Joshi/Agent-Skills · View interactive version

Dependabot is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. Expert Dependabot automated dependency management covering daily/weekly vulnerability alerts, grouped updates, and PR automation. Use when configuring `dependabot.yml`, updating packages, or fixing CVEs.

How to use this skill

Skill file

Dependabot

Dependabot creates pull requests to keep your dependencies secure and up-to-date. It is integrated natively into GitHub.

When to Use

Quick Start

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    # Grouping updates reduces notification noise
    groups:
      dependencies:
        patterns:
          - "*"

Core Concepts

Declarative dependabot.yml Manifest

Configures ecosystem targets, schedules, directories, and grouping policies:

# .github/dependabot.yml
version: 2
updates:
  # Maintain production npm dependencies
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
      day: "monday"
      time: "06:00"
    open-pull-requests-limit: 10
    groups:
      production-dependencies:
        patterns: ["*"]
        update-types: ["minor", "patch"]
  # Track GitHub Actions workflow versions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "monthly"

Security-Only vs Version-Update Modes

# Target security vulnerabilities only
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"
    # Security updates trigger automatically; version updates restricted:
    open-pull-requests-limit: 0

GitHub Actions Integration with Dependabot Secrets

Injects credentials for private artifactory and npm package registries:

registries:
  enterprise-npm:
    type: npm-registry
    url: https://npm.pkg.github.com
    token: ${{ secrets.DEPENDABOT_NPM_TOKEN }}

Common Patterns

Grouped Security and Minor Updates

Problem: Dozens of individual dependency PRs flood repositories and exhaust CI runners.

Solution:

Group minor and patch updates together in .github/dependabot.yml:

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    groups:
      production-dependencies:
        patterns:
          - "*"
        exclude-patterns:
          - "major"

Best Practices

Do:

Don't:

Troubleshooting

| Error | Cause | Solution |

| :---------------- | :--------------------------------- | :------------------------------------------------------ |

| No PRs created | Config error or no updates needed. | Check "Dependabot" tab in Insights -> Dependency Graph. |

| Merge Conflicts | Lockfile out of sync. | Rebase the PR (@dependabot rebase). |

References

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.