Agent Skills › chrisbanes/skills › gradle-run

gradle-run

GitHub

规范 Gradle 构建与诊断流程,强制使用专用 Python 包装器执行命令。通过工作流生命周期管理输出,禁止直接运行 Gradle,确保构建日志的安全性与可追溯性,适用于构建、测试及失败排查场景。

skills/gradle-run/SKILL.md chrisbanes/skills

Trigger Scenarios

需要执行 Gradle 构建或任务 诊断 Gradle 构建失败或警告 验证代码变更后的编译结果

Install

npx skills add chrisbanes/skills --skill gradle-run -g -y
More Options

Use without installing

npx skills use chrisbanes/skills@gradle-run

指定 Agent (Claude Code)

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

安装 repo 全部 skill

npx skills add chrisbanes/skills --all -g -y

预览 repo 内 skill

npx skills add chrisbanes/skills --list

SKILL.md

Frontmatter
{
    "name": "gradle-run",
    "description": "Use when planning to execute Gradle through `gradle`, `.\/gradlew`, or a custom `gradlew*` wrapper script, or diagnosing a Gradle build, 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, 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 and confirm python3 plus scripts/gradle_run.py. If either is unavailable, stop and report that prerequisite; never run Gradle directly as a fallback.

  3. Create one workflow before its first command and retain its opaque ID:

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

    Run create, each run, and finish as standalone shell commands. Do not combine one with 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. A workflow is busy result is an ownership violation: wait for the owner or correct ownership; do not start or finish concurrently.

  4. For incidental validation, stay in the current agent and run the narrowest task that answers a non-empty verification question:

    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. 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, create one fresh persistent diagnostic owner with read-only repository access and the ability to run the wrapper. Select and brief it using the shared selection and handoff reference when available. The owner runs the wrapper and diagnoses; it may not edit or delegate Gradle ownership. Keep it available for the workflow. Report its model and reasoning only when exposed. The parent owns repository edits. If that owner cannot exist, stop rather than running the loop in the parent.

  6. Have the owner 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 parent 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.

  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.

  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:

    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.

Version History

  • 2026.9.25 Current 2026-09-27 20:23

    新增子代理选择指南的共享引用,链接至 gradle-run 等技能目录,并明确 Gradle 诊断所有者的能力要求。

  • 2026.8.27 2026-08-28 05:51

    恢复技能评估功能,捕获遥测数据并对比效率指标。

  • 2026.8.24 2026-08-27 17:15

    简化指令冗余度,强化评估覆盖与工作流证据处理,明确任务选择与报告要求。

  • 2026.8.16 2026-08-19 19:31

Same Skill Collection

skills/android-benchmark-comparison/SKILL.md
skills/compose-animations/SKILL.md
skills/compose-component-design/SKILL.md
skills/compose-focus-navigation/SKILL.md
skills/compose-modifier-and-layout-style/SKILL.md
skills/compose-performance/SKILL.md
skills/compose-recomposition-performance/SKILL.md
skills/compose-side-effects/SKILL.md
skills/compose-slot-api-pattern/SKILL.md
skills/compose-stability-diagnostics/SKILL.md
skills/compose-state-and-effects/SKILL.md
skills/compose-state-authoring/SKILL.md
skills/compose-state-deferred-reads/SKILL.md
skills/compose-state-hoisting/SKILL.md
skills/compose-state-holder-ui-split/SKILL.md
skills/compose-ui-testing-patterns/SKILL.md
skills/grounded-writing/SKILL.md
skills/implement-issue/SKILL.md
skills/kotlin-api-design/SKILL.md
skills/kotlin-concurrency-and-flow/SKILL.md
skills/kotlin-control-flow/SKILL.md
skills/kotlin-coroutines-structured-concurrency/SKILL.md
skills/kotlin-flow-state-event-modeling/SKILL.md
skills/kotlin-functions/SKILL.md
skills/kotlin-multiplatform-expect-actual/SKILL.md
skills/kotlin-types-value-class/SKILL.md
skills/release-kotlin-library/SKILL.md
skills/run-github-project/SKILL.md
skills/shepherd/SKILL.md
skills/to-plan/SKILL.md
skills/using-chrisbanes-skills/SKILL.md
skills/implement-with-subagents/SKILL.md

Metadata

Files
0
Version
2026.9.25
Hash
5faa9a5c
Indexed
2026-08-19 19:31

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-30 02:04
浙ICP备14020137号-1