agentleFS
alexaiarchitectalexaiarchitect/google-adk-skills/skills/agent-create/SKILL.md

agent-create

Skill0 starsChanged 11 days agoApache-2.0View on GitHub

Scaffolds an eval-ready Google ADK 2.x Python agent, adds one tool to an existing agent, or adds evaluation scaffolding to one that exists. Produces an agent package with an App export, tools whose arguments have Pydantic contracts, tools that return validation errors instead of raising, an ordered instruction with explicit refusals, an environment-driven model id, plus a starter evalset, an eval config and a pytest runner - in the recipes layout (app/ package with tests/eval/), the flat layout `adk create` produces, or as a Workflow graph. Use when asked to "create / scaffold / bootstrap an ADK agent", "start a new agent with these tools", "add a tool to my agent", "make this a workflow agent", "add tests to my agent", or "make this agent testable". Don't use to review an agent that exists (use `/adk:agent-review`), to write eval cases for one (use `/adk:eval-create`), or to fix one that misbehaves (use `/adk:agent-debug`).

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Options: All free; pick one before the interview:

    line 39
  2. Distinctive:

    Interview: Only the questions the request has not already answered:

    line 50
  3. Very specific:

    Verify: Run discovery again and crosscheck_tools.py on the starter evalset.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Scaffold an eval-ready ADK agent

Most agents become hard to evaluate for structural reasons, decided on the first day: arguments with no contract, tools that raise, an instruction that describes a vibe rather than an order of operations. This scaffold makes the opposite choices, so that the first eval case has something exact to assert.

${CLAUDE_SKILL_DIR} is this skill's directory.

Flow

  1. Discover. Is there already an agent here, and what do the neighbours look like?

    python3 ${CLAUDE_SKILL_DIR}/../adk/scripts/discover.py <dir> --focus layout,env --no-probe
  2. Options. All free; pick one before the interview:

    OptionWhen
    recipes layout (recommended)a project of its own, with tests/eval/ beside the package
    flat layoutmatches adk create; config auto-discovered beside a single evalset
    workflow graph (--workflow, with either layout)deterministic steps around one LLM node
    add a tool to an existing agent (render_tool.py)the agent exists; one more contract is needed
    eval scaffolding only (/adk:eval-run gen_test_eval.py)the agent exists; only the gate is missing
    context caching (--with-cache, not with --workflow)a long, fixed procedure reused over multi-turn sessions; pointless for one- or two-turn use
  3. Interview. Only the questions the request has not already answered:

    AskWhy it matters
    name, and where it goesthe directory name becomes the app name
    the tools, with their arguments and value constraintscontracts are what eval cases assert against
    the order of operations, and what must be refusedeach branch becomes an eval case

    Push for value constraints: which values are legal for each argument, what shape identifiers have, what ranges numbers fall in.

  4. Confirm, scaffold with --dry-run, show the write plan, write.
  5. Verify. Run discovery again and crosscheck_tools.py on the starter evalset. Then hand off to /adk:eval-create.

What gets generated, and why

ChoiceReason
each tool takes a Pydantic modelthe model cannot invent a value; an eval case can assert exact arguments
Literal, pattern, ge/le on fieldswrong values are caught at the boundary instead of three calls later
tools return {"status": "error", ...} on a schema failurethe model reads the error and corrects itself; an exception would end the invocation
every tool returns a dict with statusgives the model something to branch on, and rubric and groundedness metrics something to read
docstrings with an Args: sectionthe docstring is the interface; it is all the model sees
numbered instruction with explicit "Do NOT" ruleseach one is a branch a coverage matrix can count and a case can cover
an auto-correction paragraph in the instructionpairs with the returned validation errors, so a dirty input is retried rather than refused
MODEL = os.getenv("MODEL_NAME", "gemini-flash-latest")survives a model retirement; alias id, not a dated one
app = App(name=..., root_agent=...)the loader prefers it, and plugins and caching only reach an eval run through one
starter evalset, config and pytest runnerthe project can be evaluated the moment it exists

Layouts

recipes (default): <project>/app/{__init__,agent,tools,schemas}.py, <project>/tests/eval/{eval_config.json,test_eval.py,evalsets/happy.evalset.json}.

flat, what adk create produces: <project>/<name>/{__init__.py,agent.py,.env.example,test_config.json,happy.test.json}.

The difference that matters: in the flat layout test_config.json sits beside the evalset, so adk eval finds it when a single evalset is passed. In the recipes layout the config must always be passed with --config_file_path.

workflow (--workflow): a Workflow with two function nodes and one LlmAgent node, exported as app = App(root_agent=workflow). Eval cases for a graph read nodeInfo.path in traces; a node may set its output once.

Decision rules

  • No tools, no evaluation. An agent with no tools has no trajectory, so the scaffold requires at least one.
  • The agent name is a Python identifier and never user. ADK rejects both.
  • Sampling settings go in generate_content_config. Passing temperature= to the agent raises at construction, and that config must not carry tools, system_instruction or response_schema.
  • Do not cap a thinking model's output to save tokens. max_output_tokens is a ceiling on thoughts and answer together; under 1024 a hard turn comes back truncated (AGT084). Set the thinking level in thinking_config and bound the answer in the instruction.
  • Prefer Workflow over SequentialAgent / ParallelAgent / LoopAgent, which are deprecated, unless an LlmAgent has to transfer into the block.
  • Never overwrite by default. Existing files, functions and eval ids are left alone unless the user asks for --force.
  • Long procedures go in skills, not the instruction. A procedure needed for one kind of request belongs in a SkillToolset skill the agent loads on demand; a large tool result belongs in an artifact, and a long conversation wants event compaction. The instruction stays short and always relevant.
  • Each skill's description must be its own. The model routes on name and description alone; two skills in the same words (AGT083) let one take the other's requests. Encode habits (check flags, least privilege, ask before a billable change), not reference tables, and prove each skill earns its place with a with/without run (skills-and-progressive-disclosure.md).
  • A live (voice) agent: read live-agents.md first. A slow tool there is silence; make it a streaming (yield) or non-blocking tool, add stop_streaming, and give its evals live_model_config. A streaming tool on a text model never streams (AGT081: on 2.12+ a second yield aborts the run).
  • A remote step is a state, not a crash. A RemoteA2aAgent that cannot be reached yields an error event and the pipeline runs on; write the manual-review hold yourself (workflow-graphs.md). Through 2.13.0 constructing it prints an [EXPERIMENTAL] warning (ADK_SUPPRESS_A2A_EXPERIMENTAL_FEATURE_WARNINGS=1); only main after 2.13.0 graduates A2A.
  • Throttle a parallel worker on a function node, not an agent. max_parallel_workers on an LlmAgent exists only on main after 2.13.0, and every release refuses it at construction (AGT085); parallel_worker=True alone is fine, and @node(parallel_worker=True, max_parallel_workers=N) caps a function node since 2.4.0.
  • Memory stays with the caller of an AgentTool through 2.13.0. A wrapped agent's load_memory searches a fresh, empty store (AGT082); call the memory tool from the parent, or transfer (context-engineering.md).
  • The generated TODOs are not decoration. A tool docstring that still says "TODO" is a tool the model has to guess about; say so before the user runs anything.

References

QuestionFile
Why each structural choice makes an agent evaluableeval-ready-architecture.md
Writing the instruction so its branches are testableinstruction-design.md
App, plugins, callbacks and where guardrails belong; BigQuery eval views; deferred capacityapp-and-plugins.md
State, memory and what persistsstate-and-memory.md
Workflow graphs: nodes, edges, joins, human input, remote A2A steps, classifier routing, testing themworkflow-graphs.md
Live and voice agents: streaming and non-blocking tools, stop_streaming, barge-in, schedulinglive-agents.md
Context caching: when it pays, what breaks the prefix, proving the gaincontext-caching.md
ADK skills: SKILL.md, SkillToolset, discovery and lifecycles, activation evalsskills-and-progressive-disclosure.md
What the model sees: compaction, include_contents, agents as tools, artifactscontext-engineering.md

Scripts

CommandDoesExit codes
scripts/scaffold_agent.py --name N --dir D [--layout recipes|flat] [--workflow | --with-cache] --tools SPEC [--description T] [--sop-file F] [--dry-run] [--force]writes the project0 written, 1 refused, 2 usage
scripts/render_tool.py [agent-dir] --tool SPEC [--no-bind] [--dry-run] [--json]adds one tool and its Pydantic model to an existing agent, refusing existing names0 written, 1 refused, 2 usage

Tool spec: name:field=type,field=type;name:... where a type is str, int, float, bool, literal(a|b|c) or pattern(^RE$).

Completion checklist

  • The agent loads: discovery reports the expected layout and export.
  • Every tool has a docstring with an Args: section, and no TODOs left.
  • Every tool argument has a contract, not just a type.
  • The instruction states the order and the refusals explicitly.
  • The model id comes from the environment.
  • The starter evalset cross-checks clean against the tools.
  • The user knows the next step is /adk:eval-create.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.