new-task

new-task is a command for Claude Code from gosha70/code-copilot-team. It costs 0 tokens per session (552 once invoked), scanned A, original, MIT.

A guided command for adding a new Gradle task type, which is a reusable build operation in the Gradle build system. It covers declaring inputs and outputs, writing the Kotlin class, and registering the task.

In plain words
What is it for?
It helps developers create and register new Kotlin-based tasks in a Gradle plugin.
Why use it?
It helps preserve Gradle's incremental builds and build cache behavior by requiring the task's inputs and outputs to be declared correctly.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit It helps developers create and register new Kotlin-based tasks in a Gradle plugin.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/gosha70/code-copilot-team/new-task
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for new-task

README.md
[![agentmods](https://agentmods.dev/badge/commands/gosha70/code-copilot-team/new-task/github.svg)](https://agentmods.dev/commands/gosha70/code-copilot-team/new-task)
Your own site
<a href="https://agentmods.dev/commands/gosha70/code-copilot-team/new-task"><img src="https://agentmods.dev/badge/commands/gosha70/code-copilot-team/new-task/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for new-task

Your own site · 80×15
<a href="https://agentmods.dev/commands/gosha70/code-copilot-team/new-task"><img src="https://agentmods.dev/badge/commands/gosha70/code-copilot-team/new-task.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00552
Opus 5.5 $0.00000 $0.00221
Sonnet 5.5 $0.00000 $0.00110
Haiku 4.5 $0.00000 $0.00055

Measured 1mo ago against content hash fcac87ba2d08, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

new-task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

shared/templates/gradle-plugin/commands/new-task.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/new-task

Add a new Gradle task type to the plugin.

Procedure

  1. Decide the task's inputs and outputs. Every input is @get:Input, @get:InputFile, or @get:InputDirectory. Every output is @get:OutputFile or @get:OutputDirectory. Anything that is neither is @get:Internal. No exceptions — Gradle uses these annotations to drive incremental builds and the build cache.

  2. Create the task class under plugin/src/main/kotlin/com/example/gradleplugin/:

    abstract class MyNewTask : DefaultTask() {
        @get:Input
        abstract val someValue: Property<String>
    
        @get:OutputFile
        abstract val outputFile: RegularFileProperty
    
        @TaskAction
        fun run() {
            outputFile.get().asFile.writeText(someValue.get())
        }
    }
    

    The class must be abstract and every property abstract val ...: Property<T> so Gradle synthesises the implementation and injects the ObjectFactory. Do not write a constructor.

  3. Register the task in ExamplePlugin.apply() using tasks.register (never tasks.create):

    project.tasks.register("myNewTask", MyNewTask::class.java) { task ->
        task.someValue.set(extension.someValue)
        task.outputFile.set(project.layout.buildDirectory.file("..."))
    }
    
  4. Add a unit test under plugin/src/test/kotlin/... using ProjectBuilder (verifies registration + default values).

  5. Add a functional test under plugin/src/functionalTest/kotlin/... that:

    • Seeds a synthetic build that applies the plugin and configures the extension.
    • Runs the task via GradleRunner.create().
    • Asserts on TaskOutcome.SUCCESS for the first run.
    • Re-runs the task and asserts on TaskOutcome.UP_TO_DATE (proves incremental wiring).
  6. Run locally:

    ./gradlew :plugin:check               # unit + functional via the check aggregate
    ./gradlew :plugin:functionalTest      # functional tests only
    

Refuse to merge if

  • Any input/output property is missing its annotation.
  • The task is registered with tasks.create instead of tasks.register.
  • There is no functional test asserting on TaskOutcome for the new task.
  • The task action captures project.<anything> instead of using a Provider.

Read the full file on GitHub · 53 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 53 lines · 0 tokens per session scan A fcac87ba2d08

Subscribe to this mod's changes

new-task is a command published in the GitHub repository gosha70/code-copilot-team (7 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 552 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.