spec_generator

A generator that turns a software issue and repository findings into a structured work specification in JSON. The specification tells a developer what needs to change and where.

In plain words
What is it for?
Use it to prepare verified file lists, implementation summaries, and validation steps for bug fixes or feature work.
Why use it?
It reduces guesswork about the affected files and keeps generated implementation instructions in a fixed format.

Skill for Claude CodeCodexGemini CLI

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.

agentmods
npx agentmods add skills/google-gemini/gemini-cli/spec_generator
Any agent
npx skills add google-gemini/gemini-cli --skill spec_generator
Clone the repo
git clone --depth 1 https://github.com/google-gemini/gemini-cli

Made for: Claude Code, Codex, Gemini CLI.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 862 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00017 $0.00862
Opus 5 $0.00009 $0.00431
Sonnet 5 $0.00003 $0.00172
Haiku 4.5 $0.00002 $0.00086

Measured 2d ago against content hash cebff453fc13, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spec_generator 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 2d 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.

tools/caretaker-agent/cloudrun/triage-worker/.gemini/skills/spec_generator/SKILL.md · 99 lines

How it starts

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

Spec Generator Instructions

Extract key technical details from the issue and organize them according to the following strict JSON schema.

Critical Rules:

  1. Codebase Verification: Rely on file paths and locations found during your codebase exploration. Ensure all files mentioned in files_to_modify actually exist in the repository. Do not make up file paths.
  2. Target File Selection: List all source code files in files_to_modify where code changes belong.
    • Fix config or state issues early at their setup/hook entrypoint rather than refactoring low-level utilities.
    • Strictly do NOT list test files or files that were only inspected without requiring code changes.
  3. Strict JSON Escaping: Ensure the generated output is standard, valid JSON. In JSON string values (such as summary fields or verification steps), do NOT escape single quotes with backslashes. Write them directly as ' (not \\').

[!IMPORTANT] The output MUST strictly adhere to this schema. Deviations (like putting objects inside arrays instead of strings) will break the downstream automated code generation pipeline.

The final workable_spec object must conform strictly to this JSON Schema specification. Every field listed below is strictly required and must be populated:

{
  "type": "object",
  "properties": {
    "issue_id": {
      "type": "string",
      "description": "The specific GitHub issue identifier in the canonical format: {owner}/{repo}#{number} (e.g., google/gemini-cli#245)."
    },
    "summary": {
      "type": "object",
      "description": "A deep technical summary of the issue.",
      "properties": {
        "problem": {
          "type": "string",
          "description": "Concise statement of the problem."
        },
        "root_cause": {
          "type": "string",
          "description": "Analysis of the underlying cause of the bug."
        },
        "context": {
          "type": "string",
          "description": "Any additional technical context or background."
        }
      }
    },
    "implementation_plan": {
      "type": "object",
      "description": "Details required for code implementation of the fix.",
      "properties": {
        "files_to_modify": {
          "type": "array",
          "description": "List of source code files requiring changes relative to the repository root (e.g. ['src/cli.ts']). Strictly do NOT include test files (*.test.ts, *.spec.ts) here; test files must go into testing_strategy.test_file.",
          "items": {
            "type": "string"
          }
        },
        "steps": {
          "type": "array",
          "description": "Ordered step-by-step instructions to implement the fix. Each step must be a simple, flat string description. Do not nest objects inside this array.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "testing_strategy": {
      "type": "object",
      "description": "Instructions for validating the fix.",
      "properties": {
        "test_file": {
          "type": "string",
          "description": "Path to the relevant test file relative to the repository root (e.g., 'tests/cli.test.ts')."
        },
        "expected_behavior": {
          "type": "string",
          "description": "Description of how the system should behave after the fix."
        },
        "verification_steps": {
          "type": "array",
          "description": "Specific steps to add or modify in the test file.",
          "items": {
            "type": "string"
          }
        },
        "framework": {
          "type": "string",
          "description": "Testing framework used.",
          "enum": ["Vitest", "N/A"]
        }
      }
    }
  }
}

Read the full file on GitHub · 99 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. 2d ago First seen · 99 lines · 17 tokens per session scan A cebff453fc13

Subscribe to this mod's changes

spec_generator is a skill published in the GitHub repository google-gemini/gemini-cli (106,761 stars, last pushed today), licensed Apache-2.0. It adds 17 tokens to every session and 862 once invoked, about $0.0001 per session on Opus 5. 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-08-30.

Related

Other skills, from other repositories

google-antigravity-sdk

Design, implement, and debug autonomous AI agents and multi-agent systems using the Google Antigravity (AGY) SDK. ACTIVATE this skill when the user wants to create, configure, or orchestrate Google Antigravity agents.

google-antigravity/antigravity-sdk-python · 53 tokens

google-agents-cli-deploy

This skill should be used when the user wants to "deploy an agent", "deploy my ADK agent", "set up CI/CD", "configure secrets", "troubleshoot a deployment", or needs guidance on Agent Runtime, Cloud Run, or GKE deployment targets, or binding an agent to an Agent Gateway. Covers deployment workflows, service accounts…

google/agents-cli · 153 tokens

google-agents-cli-eval

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Agent Platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset…

google/agents-cli · 149 tokens

google-agents-cli-workflow

This skill should be used when the user wants to "develop an agent", "build an agent using ADK", "run the agent locally", "debug agent code", "test an agent", "deploy an agent", "publish an agent", "monitor an agent", or needs the ADK (Agent Development Kit) development lifecycle and coding guidelines. Entrypoint for…

google/agents-cli · 126 tokens

google-agents-cli-observability

This skill should be used when the user wants to "set up tracing", "monitor my agent", "configure logging", "add observability", "debug production traffic", or needs guidance on monitoring deployed agents, including ADK (Agent Development Kit) agents. Covers Cloud Trace, prompt-response logging, BigQuery Agent…

google/agents-cli · 127 tokens

google-agents-cli-publish

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini Enterprise", "publish to Gemini Enterprise", or needs guidance on the agents-cli publish gemini-enterprise command. Also use when the user wants to "manage agents in Agent Registry"…

google/agents-cli · 141 tokens