Agent skill
github-workflow-gradle-template
Provides a GitHub Actions CI workflow template for Gradle/Java projects. Claude should use this skill when creating or updating CI workflows to ensure current action versions and best practices are followed.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/github-workflow-gradle-template
SKILL.md
GitHub Actions Workflow Template for Gradle Projects
When creating a GitHub Actions CI workflow for a Gradle/Java project, use this template:
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: false
- name: Build with Gradle
run: ./gradlew build
Key Points
-
Action versions (as of December 2025):
actions/checkout@v4actions/setup-java@v4gradle/actions/setup-gradle@v4
-
Do NOT use deprecated actions:
gradle/wrapper-validation-action- no longer needed, wrapper validation is included ingradle/actions/setup-gradlegradle/gradle-build-action- replaced bygradle/actions/setup-gradle
-
Avoid redundant steps:
./gradlew buildalready runs tests, so a separate./gradlew teststep is unnecessary
-
Gradle caching: The
gradle/actions/setup-gradleaction handles caching automatically. Usecache-read-only: falseto allow cache writes.
Customization
Adjust as needed for your project:
- Change
java-versionif using a different JDK version - Add additional branches to the trigger
- Add environment variables or secrets as required
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?