Token导航 LogoToken导航TokenDH.com
AI 工具只读github未标认证来源可访问clear审计通过

dependency-management依赖管理

Agent Skill

用于辅助 Java 项目开发、面向对象设计、Spring 生态、Maven 或 Gradle 依赖和后端工程实践。它适合让 Agent 分析类结构、设计接口、整理服务分层、生成测试或检查常见代码坏味道。使用时需要结合项目已有架构、包结构和依赖版本,不应只按通用教程改代码;涉及数据库、事务、并发或框架配置时,应先确认运行环境和回归测试范围。

总安装

288

周安装

12

GitHub Stars

38

下载量

96
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dependency-management(依赖管理)
来源仓库:https://github.com/bitsoex/bitso-java
仓库路径:skills/dependency-management
安装命令:
npx skills add https://github.com/bitsoex/bitso-java --skill dependency-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/bitsoex/bitso-java --skill dependency-management

简介

dependency-management 用于管理 Java/Gradle 项目的库版本、依赖约束和物料清单(BOM)。

  • 它支持添加或更新依赖、解决冲突、升级框架和设置版本目录结构。
  • 通过 npx skills add 命令安装,需结合项目已有架构和依赖版本使用。
  • 涉及数据库、事务或框架配置时,应先确认运行环境和回归测试范围。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Dependency Management

Standards for managing library versions, dependency constraints, and Bill of Materials (BOM) in Java/Gradle projects.

When to use this skill

  • Adding or updating dependencies
  • Managing library versions in version catalogs
  • Resolving dependency conflicts
  • Upgrading Spring Boot or other frameworks
  • Setting up BOM-based dependency management
  • Understanding version compatibility matrices

Skill Contents

Sections

Available Resources

📚 references/ - Detailed documentation


Critical Policies

1. Version Centralization (Mandatory)

All dependency versions MUST be centralized in gradle/libs.versions.toml.

// ❌ NEVER: Hardcode versions in build.gradle
dependencies {
    implementation "org.springframework.boot:spring-boot-starter-web:3.5.9"
}

// ✅ ALWAYS: Use version catalog
dependencies {
    implementation libs.spring.boot.starter.web
}

See references/version-centralization.md for anti-patterns and approved locations.

2. Never Downgrade Pre-existing Versions

Never replace a library version with an older version that pre-existed in the repository.

AllowedNot Allowed
Upgrade a libraryDowngrade a pre-existing version
Adjust a version YOUR PR introducedPin BOM-managed dependency lower
Add warning commentRemove security patches

See references/version-centralization.md for the full policy.

Version Catalog Structure

The version catalog (gradle/libs.versions.toml) is the single source of truth:

[versions]
spring-boot = "3.5.9"
grpc = "1.78.0"
spock = "2.4-groovy-4.0"
junit-jupiter = "5.14.2"

[libraries]
spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "spring-boot" }
spring-boot-bom = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "spring-boot" }

[bundles]
testing-spock = ["spock-core", "spock-spring"]
spring-boot-service = ["spring-boot-starter-web", "spring-boot-starter-actuator"]

[plugins]
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot" }

Key Principles

PrincipleDescription
Single SourceAll versions in one file
BOMs FirstUse BOMs for transitive management
Type-SafeGradle generates type-safe accessors
Semantic GroupsOrganize by framework/purpose

Bundle Patterns

Bundles group related dependencies for cleaner build files:

// ❌ Verbose: Multiple declarations
dependencies {
    testImplementation libs.spock.core
    testImplementation libs.spock.spring
    testImplementation libs.testcontainers.spock
    testImplementation libs.testcontainers.postgresql
}

// ✅ Clean: Use bundles
dependencies {
    testImplementation libs.bundles.testing.spock
    testImplementation libs.bundles.testing.integration
}

Common Bundles

BundleContentsUse Case
testing-spockspock-core, spock-springMost test suites
testing-integrationtestcontainers-spock, postgresIntegration tests
spring-boot-serviceweb, actuatorWeb services
grpc-corenetty-shaded, protobuf, stubgRPC services
codegenlombok, mapstructCode generation

See references/bundle-patterns.md for all bundles and usage.

Platform Dependency Management

Use Gradle's native platform() to import BOMs. The io.spring.dependency-management plugin is also used in Spring Boot projects (it is applied automatically by the Spring Boot plugin), but when importing additional BOMs prefer platform() over mavenBom directives.

dependencies {
    // Use platform() to import managed versions from BOMs
    implementation platform(libs.spring.boot.bom)
    implementation platform(libs.grpc.bom)

    // Dependencies managed by the platform don't need explicit versions
    implementation libs.spring.boot.starter.web
    implementation libs.spring.boot.starter.actuator
}

Key Rules

  • Use platform() to import BOMs, never enforcedPlatform() (prevents necessary overrides)
  • Prefer platform() over mavenBom directives for BOM imports -- platform() is the native Gradle approach
  • The io.spring.dependency-management plugin is applied automatically by the Spring Boot plugin and manages many versions; additional BOMs should be imported via platform()
  • platform() allows overriding when needed (e.g., for security patches)

See references/bom-strategy.md for complete patterns.

References

ReferenceDescription
version-centralization.mdCore principles, anti-patterns, policies
bundle-patterns.mdAll bundle definitions and usage
bom-strategy.mdBill of Materials setup
compatibility-matrices.mdJava/Spring/testing version tables
resolution-strategies.mdConflict resolution, substitutions
security-updates.mdCVE fixes, forced versions

Related Rules

Related Skills

SkillPurpose
gradle-standardsGradle build configuration
fix-vulnerabilitiesVulnerability management
upgrade-gradle-9Gradle 9 migration
upgrade-java-25Java 25 compatibility

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.86%
按下载量换算27

OpenCode

23.79%
按下载量换算23

Antigravity

17.65%
按下载量换算17

windsurf

11.76%
按下载量换算11

Codex

7.79%
按下载量换算7

Gemini CLI

3.95%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills