К основному содержанию
скилл CX Codex

gradle-run — скилл для Claude Code: запуск Gradle без шумных логов

Скилл гоняет сборки Gradle через обёртку с компактным выводом и ведёт журнал запусков, чтобы агент не заливал контекст полным логом.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add chrisbanes/skills --skill gradle-run -a claude-code
Открыть на GitHub

Что делает gradle-run

Скилл перехватывает все команды Gradle, которые запускает агент. Вместо прямого вызова ./gradlew он идёт через scripts/gradle_run.py, а тот сам подставляет --console=plain и --no-scan. Полный лог сборки считается временным и чувствительным артефактом: его нельзя стримить, копировать через tee или открывать заново. Агент видит только ограниченную JSON-сводку.

Работа строится вокруг жизненного цикла из четырёх вызовов: create, run, status, finish. Каждый вызов — отдельная shell-команда, без &&, пайпов и переменных, иначе доказательства запуска считаются недействительными. status возвращает не больше 16 KiB JSON и не открывает логи вообще. Статус uncertain означает брошенный запуск или неполный журнал — это повод разобраться, кому принадлежит процесс, а не считать сборку завершённой.

Нужен python3 и файл scripts/gradle_run.py в каталоге скилла. Если их нет, скилл останавливается и сообщает об этом — запускать Gradle напрямую в обход обёртки он не станет. Повторяющийся отпечаток ошибки в одном и том же месте исходника означает: хватит пересобирать, смотрите на строку и соседние объявления.

Какие задачи решает

  • запустить сборку Gradle, не забивая контекст агента полным логом
  • восстановить статус запуска, если сессия инструмента пропала
  • сгруппировать предупреждения и падения по отпечатку
  • проверить узкую задачу вроде :module:test после правки
  • отличить брошенный запуск от завершённого

Примеры запросов агенту

  • Запусти ./gradlew :module:test через скилл gradle-run и скажи, проходит ли тест после моей правки
  • Сборка падает с тем же отпечатком — посмотри строку в исходнике, а не пересобирай
  • Проверь статус workflow по его ID: завершился он или завис

Как установить gradle-run

1Через Skills CLI (Vercel)

npx skills add chrisbanes/skills --skill gradle-run -a claude-code

2Вручную: положить файлы

~/.claude/skills/gradle-run/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/gradle-run/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора17

using-chrisbanes-skills Разбирает задачу по Kotlin или Jetpack Compose и подключает нужный скилл из набора chrisbanes. Полезен, когда в одном изменении пересекаются несколько тем. CX Codex +1 1 100установок kotlin-control-flow Скилл для ИИ-агента, который пишет и правит ветвления Kotlin: when, guard-условия, исчерпывающие проверки sealed-типов, smart casts. CX Codex +1 1 100установок compose-component-design Скилл для проектирования и ревью переиспользуемых компонентов Jetpack Compose: слоты, модификаторы, размещение корневого layout. CX Codex +1 1 000установок kotlin-api-design Помогает решить, кому принадлежит функция, где ставить extension, а где хватит value class. Пригодится при проектировании публичного API на Kotlin и в KMP. CX Codex +1 949установок run-github-project Ведёт работу по колонкам GitHub Project: разбирает Todo, берёт задачи в Ready to implement и доводит до Done. CX Codex +1 643установок implement-with-subagents Координирует выполнение графа задач соло-агентом или пулом субагентов с изолированными коммитами и обязательным независимым ревью. CX Codex +1 582установок grounded-writing Скилл убирает выдуманные факты, рекламный тон и лишние детали реализации из публичной документации и технических отчётов. CX Codex +1 448установок release-kotlin-library Автоматизирует подготовку, проверку и публикацию релизов библиотек на Kotlin. Помогает сверить список изменений, обновить снимки Metalava API и безопасно запустить публикацию. CX Codex +1 340установок

Похожие

limrun-gradle limrun-inc Собирает Android-приложения в удалённой песочнице с помощью команды lim gradle build. Помогает получить APK или подписанный AAB без локального Android SDK и Gradle. CX Codex +1 40 000установок kotlin-tooling-gradle-to-kotlin-toolchain-project github:@singleton11 Пошагово переводит проект с Gradle на Kotlin Toolchain: переносит зависимости, заменяет плагины и правит CI. Пригодится при полной миграции репозитория без изменения бизнес-логики. CX Codex +1 426установок kotlin-tooling-gradle-to-kotlin-toolchain-plugin github:@singleton11 Переносит отдельные плагины Gradle в локальные плагины Kotlin Toolchain. Помогает сопоставить задачи, параметры расширений и зависимости без переписывания всего проекта. CX Codex +1 418установок nx-run-tasks nrwl Подсказывает агенту, как запускать build, test, lint и serve в монорепозитории Nx. Пригодится, когда проектов много и команды легко перепутать. CX Codex +1 3 800установок tao-run-automl NVIDIA Corporation Запускает AutoML и подбор гиперпараметров для моделей NVIDIA TAO через AutoMLRunner. Нужен для настройки обучения, оценки, инференса, дистилляции, прунинга или квантования. CX Codex +1 1 600установок 112-java-maven-plugins Juan Antonio Breña Moral Скилл подключает и настраивает плагины Maven в pom.xml через вопросы по одному. Пригодится, когда нужно добавить проверки качества, покрытие или сборку образа. CX Codex +1 381установок

Рядом в теме «DevOps и инфраструктура»

Всё по теме «DevOps и инфраструктура» →

Вопросы о gradle-run

Как установить gradle-run в Claude?

Выполните npx skills add chrisbanes/skills --skill gradle-run -a claude-code. Скилл окажется в ~/.claude/skills/gradle-run/SKILL.md.

Что делает gradle-run?

Прогоняет команды Gradle через обёртку с компактным выводом и ведёт журнал запусков. Агент получает ограниченную сводку вместо полного лога сборки.

Что нужно для работы скилла?

python3 и скрипт scripts/gradle_run.py в каталоге скилла. Без них скилл останавливается и не запускает Gradle напрямую.

Исходный текст

SKILL.md · Apache-2.0
---
name: gradle-run
description: Use when planning to execute Gradle through `gradle`, `./gradlew`, or a custom `gradlew*` wrapper script, or diagnosing a Gradle build, recovering a workflow's status, compact workflow ledger, repeated failure fingerprint, check, test, lint, warning, or failure even when no new Gradle run is appropriate.
---

# Gradle run

## Core principle

Treat complete Gradle output as a temporary, sensitive artifact. Every
agent-initiated Gradle command runs through the compact-output wrapper; never
stream, `tee`, paste, or reopen a full build log.

Every `create`, `run`, `status`, and `finish` invocation is the entire shell command for
that tool call. Prefixes, assignments, conditionals, pipes, command chains, and
follow-up inspection invalidate lifecycle evidence even when Gradle succeeds.

## Procedure

1. Classify the request. Reuse a current successful result when unchanged
   source and inputs already answer the question. A focused task that validates
   another change is incidental; build/check/warning/failure work is a
   Gradle-centered workflow.
2. Resolve this skill directory. If `python3` or `scripts/gradle_run.py` is
   unavailable (a failing standalone `create` shows this), stop and report that
   prerequisite; never run Gradle directly as a fallback. Invoke the project's
   designated entrypoint (normally `./gradlew`) as provided; do not read its
   source to second-guess it or substitute another launcher script.
3. Create one workflow before its first command and retain its opaque ID:

   ```sh
   python3 <skill-dir>/scripts/gradle_run.py create
   ```

   Run `create`, each `run`, and `finish` as standalone shell commands. Do not
   combine one with `ls`, `test`, variable setup, `git`, `rg`, `&&`, `;`, a
   pipe, or a newline containing another command. If `create` fails, retry a fresh
   standalone `create` before any `run`. Use the wrapper exclusively; it
   supplies `--console=plain` and `--no-scan` unless console behavior was
   selected or the user authorized `--scan`. Add `--warning-mode all` only for
   warning discovery or an explicit request. If `run` or `finish` reports
   `workflow is busy`, inspect status and wait for the owner; keep one execution
   owner and avoid a duplicate build.

   If a tool session disappears or the run's outcome is unknown, use the same
   workflow ID (and the same global `--root` if one was supplied):

   ```sh
   python3 <skill-dir>/scripts/gradle_run.py status --workflow <id>
   ```

   Status is read-only and returns immediately with at most 16 KiB of JSON.
   `run` identifies the active or latest run by sequence, wrapper/child PIDs,
   start time, working directory, command and question. `result` is the latest
   stored bounded terminal summary, identified by `result_sequence`; while a
   new run is active it may describe the previous run. Status never opens logs.
   Poll status on `running`; a held lock specific to that run supplies activity
   evidence, while PIDs are identity only. Unrelated workflow lock contention
   leaves an abandoned run `uncertain`. `completed` includes failed builds and launch
   errors: check `result.exit_status`. `interrupted` requires a recorded signal.
   `uncertain` covers abandoned active records, missing locks, incomplete/legacy
   ledgers and transitions without sufficient evidence. Report that uncertainty;
   the next action is an ownership investigation, not completion inferred from
   a PID, a rerun (even conditional or later), cleanup, `finish`, or process
   termination. A new workflow is `idle`; after
   `finish` it is `finished` and its result has been removed. Unknown IDs fail
   closed. Finish only after retrieving the needed result.
4. For incidental validation, stay in the current agent and run the narrowest
   task that answers a non-empty verification question:

   ```sh
   python3 <skill-dir>/scripts/gradle_run.py run \
     --workflow <id> --scope targeted \
     --question "Does :module:test pass after this change?" -- \
     ./gradlew :module:test
   ```

   Do not substitute compilation for requested fixture tests, or skip a
   requested run because it may find no tests; run it and report that caveat.
   Read only the bounded JSON summary; report both the managed wrapper and
   nested Gradle task, the question, and its bounded answer.
5. For Gradle-centered work, keep diagnosis, repository edits, and wrapper
   execution with the current implementation owner by default. Delegate a
   bounded read-only investigation only when it offers useful independent
   analysis. Select and brief an optional helper using the shared
   [selection and handoff reference](references/subagent-selection.md).
   Keep one wrapper execution owner at a time; a helper reports evidence and
   recommendations to that owner. Continue directly when no helper is available.
6. Reuse actionable summaries, group warnings/failures by
   fingerprint, and return source/line evidence plus the narrowest next command.
   Run broad only for an aggregate question that targeted evidence cannot
   answer. On a repeated primary source/compiler fingerprint, stop rebuilding;
   inspect the cited source line and nearby declaration, import, or receiver
   context before revising the diagnosis. Verify each source change with the
   same wrapper and narrowest applicable task. In the final diagnosis, name the
   focused inspection as the next action; do not claim a source fix before it.
   A new question does not permit a blind repeat: rerunning an unchanged task
   under a relabeled question is still a repeat.
7. Treat the full log as raw sensitive material even though summaries and
   ledgers redact common credentials. Never expose it in model-visible context.
   On interruption, use the wrapper's recorded signal and bounded partial
   diagnostics; it owns process-group/process-tree cleanup and durable ledger
   updates. Only logs still represented by the bounded recent-run ledger remain.
   If a bounded result reports cache access denied before Gradle starts, report
   the exact path and recommend only an explicit writable-root entry for that
   existing cache directory, for the user to authorize. Stop there: do not
   apply it, plan a follow-up rerun, `finish`, or new workflow, disable the
   sandbox, or relocate caches.
8. Finish after the last requested validation (targeted or broad) passes, or
   report unresolved fingerprints and why validation cannot continue. In the
   final response, quote each non-empty `--question` and give its bounded
   answer; command history is not a substitute for reported evidence. Then run:

   ```sh
   python3 <skill-dir>/scripts/gradle_run.py finish --workflow <id>
   ```

   Report that finish removed only wrapper-owned logs. A finished known ID is
   idempotent; an unknown ID or active workflow fails closed and leaves files in
   place. This skill does not constrain unrelated review, implementation, or
   subagents.

© chrisbanes · Apache-2.0 · chrisbanes/skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой