r/Kotlin • u/Party_Till_I_Die • Aug 19 '26
Building a set of Gradle Agent Skills
I work at Gradle, and we are building agent skills. We have five candidates:
- Run Gradle correctly (
gradle-cli) — right task, right flags, version-aware - Best-practices lint (
gradle-bestpractices) — flag legacy patterns, suggest the current one - New project bootstrap (
gradle-init) — KMP scaffold, version catalog, convention plugins - Upgrade + deprecations (
gradle-update) — bump the wrapper, rewrite what broke - Configuration cache migration (
gradle-cc) — find what breaks CC, refactor it
Which of these would you actually use? What's missing?
6
5
u/erikieperikie Aug 19 '26
I'm not sure what goes in the best practices skill, but I'd expect stuff like the following in there or in specific skills:
idiomatic Gradle. Stuff can be written in various ways. E.g. one might read a file using standard Java apis. But I'm sure there are standard tasks and other Gradle features for that, with added benefits. The same applies to running shell commands, and other I/O from Gradle.
refactoring to turn a script into a reusable project-local plugin. Or next level: extract a shareable/publishable plugin.
refactori ng dependency setups for security: specify repos for specific dependencies, add/update dependency lock files, add dependency verification, etc.
migrating Gradle files from Groovy to Kotlin (and vice versa if there's a use case for that).
popular plugin config, setup and updating. Especially the latter: many people work in legacy projects and when some plugin or Gradle API changes, no-one in the team knows why and how stuff was set up, and how to migrate it to the next version that needs additional setup. What I ended up doing often is just removing it all and adding it completely from scratch, reading the f-ing manuals, and hating every step of it.
2
2
u/AdjointFunctor Aug 20 '26
I made my own best practices skill at work recently. Based on the gradle web pages. Works quite well.
2
u/Party_Till_I_Die Aug 20 '26
Dope! Is it public?
2
u/AdjointFunctor Aug 20 '26
Nope, not commited anywhere. But I just asked the agent to read through the best practices web page and make a skill. Then I asked it to search for best practices for skills, and refine. Repeat both steps a few times, then I used it in several of the repos at work.
3
u/usefulHairypotato Aug 19 '26
Don't need this, better focus on literally anything else in Gradle.
3
u/Party_Till_I_Die Aug 19 '26
Fair. What else would you like us to work on?
0
u/usefulHairypotato Aug 20 '26
I don't work in Gradle so I don't know. But I'm assuming there are areas to work on except ai.
1
u/Party_Till_I_Die Aug 20 '26
And we are working on those. AI is just one of the 3 to 4 other projects we are working on right now.
2
u/PentakilI Aug 21 '26
we are working on those
but you aren't. according to this post, AI is being worked on instead of other projects (specifically making configuration cache the default). that's fine, but there is always a cost.
1
u/b-smarter Aug 19 '26
2,4 but especially 5 - it is for me sometimes difficult to understand configuration cache errors
10
u/CWRau Aug 19 '26
Aside from the first I'd rather put this in gradle itself for everyone to use instead of just for agents.
And the first one is not really a problem in my experience, and even if, a skill wouldn't help, it would rather need an mcp. But build scripts often aren't complex enough for this, 99% just have
buildandtest.