optimise-adk-on-google-cloud
Skill9 starsChanged 17 days agoMITView on GitHub
Diagnose, implement or review Python Google ADK optimisations on Cloud Run, Agent Runtime and GKE involving model/tool work, in-session history and context growth (trimming, summarising), streaming completion, session handling, startup, concurrency or workload scaling. Use for measured changes or actionable optimisation plans. Do not activate for hosting selection or first deployment alone (deploy-adk-on-google-cloud), general Kubernetes administration, cross-session memory or RAG architecture (adk-memory-architecture), model choice or thinking settings (adk-model-and-output-contracts), production alerting and SLOs (adk-agent-observability), non-ADK performance work, or unrelated prompt and UI edits (adk-agent-instructions owns prompt wording).
- Reads credentials
In this repository25 other files it gives its agents.
- adk-agent-evaluationSkill
- adk-agent-instructionsSkill
- adk-agent-interoperabilitySkill
- adk-agent-observabilitySkill
- adk-agent-securitySkill
- adk-discoverySkill
- adk-engineerSkill
- adk-fastapi-backendSkill
- adk-frontend-integrationSkill
- adk-governance-packSkill
- adk-memory-architectureSkill
- adk-model-and-output-contractsSkill
- adk-operational-guardrailsSkill
- adk-portability-planningSkill
- adk-presenterSkill
- adk-release-engineeringSkill
- adk-sql-agent-engineeringSkill
- adk-system-designerSkill
- adk-tool-auth-and-secretsSkill
- adk-tool-interface-designSkill
- adk-workflow-designSkill
- deploy-adk-on-google-cloudSkill
- practice-profileSkill
- protect-adk-sensitive-dataSkill
- safe-api-tool-callsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Read project instructions, status, dependency declarations and locks, agent exports, serving and tool code, deployment definitions and …
- Distinctive: line 39
Use the existing project interpreter.
- Distinctive: line 97
Read lifecycle.md before preparing a cloud mutation, paid comparison, export, cache experiment or cleanup.
- Distinctive: line 124
Read validation.md for mode-specific tests, the offline saved-event checker and the offline context budget helper, which estimates request …
≈ “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.
Files
Optimise ADK on Google Cloud
Reduce avoidable work while preserving correct, authorised and complete results. This one skill covers all three parts of Chapter 4: application optimisation, Cloud Run, Agent Runtime and GKE. The book and companion repository are optional provenance, never runtime dependencies.
Inspect and define acceptance
- Read project instructions, status, dependency declarations and locks, agent exports, serving and tool code, deployment definitions and relevant tests. Establish whether the user wants advice, an audit, an implementation or a live comparison. Preserve the domain, package manager, versions and customisations.
- Use the existing project interpreter. The read-only
project inspector (its baseline gate records
ADK 2.8.0;
baseline_gate_passed: falseon a newer pin means "not the recorded baseline", so read the dated 2.12 notes in the references rather than treating it as a project failure) accepts--project,--mode(auto,application,cloud-run,agent-runtime,gke) and--require-baseline. It reads bounded dependency manifests and reports configuration presence; it does not import application code, read.envcontents or execute cloud commands. Manually inspect its uncovered files and lock resolution. Read compatibility.md before using an ADK recipe. Compare installed distribution metadata with declared Python and ADK pins. A mismatch requires contract verification or a specific blocked path, never an automatic upgrade or downgrade. - Trace the actual request: server and session service, ADK
Appor bare agent, model requests, tools, child handoffs, result storage and client consumption. Record model/backend and configuration keys without exposing secret values. Nested environment files can override root configuration. Inspect the image's actual source package and entrypoint, not just a similarly named example. - Separate external request time, platform startup/queueing and application spans. Identify one candidate boundary and its evidence. If measurements are absent, deliver an instrumentation/comparison plan; do not invent a bottleneck. Define correct output, permitted effects, completion, work limits and relevant quality checks before selecting an optimisation.
Inspection ends with the current architecture, version status, selected mode, acceptance criteria and missing prerequisites. Missing cloud credentials still permit local inspection, implementation and offline validation.
Select the smallest useful mode
| Observed work or requested decision | Read when entering this mode | Evidence needed |
| Remote adapter overhead, repeated schema, oversized results, unnecessary child history/output or serial independent I/O | Application path | Same authorised result, bounded handoff, complete answer and relevant request-boundary observations |
| Large repeated instructions or uncertain prefix-cache benefit | Skills and cache | Actual instruction loading or outgoing request/usage metadata, with correctness and separate cache lifecycle |
| Long sessions, token growth per turn, cache misses, oversized tool results or sub-agent context isolation | Context window | Captured request composition, cached-token counts, bounded tool results and preserved correctness |
| Cloud Run startup, concurrency, CPU allocation, session locality or revision comparison | Cloud Run | Effective revision configuration, external/platform/application measurements and state/security checks |
| Agent Runtime session reuse, App/compaction propagation, model or hosting work | Agent Runtime | Actual execution location, retained session events, selected model input and observed capacity |
| Agent Runtime streaming, buffered persistence, optional memory writes or deferred jobs | State and streams | Complete outputs, bounded admission, immutable batches and correctly correlated recovery |
| GKE startup, resources, rollout capacity, scaling or identity delays | GKE workload | Actual manifest generator/build inputs, admitted Pods, scheduling events and pressure measurements |
| GKE session continuity, HTTP/draining, tracing privacy or streaming | GKE serving path | Wired session backend, trusted caller, complete responses and final exported telemetry |
| Optimisation review or greenfield design without measurements | Read only the relevant references above | Prioritised hypotheses, concrete implementation seams and a validation plan; no claimed speedup |
Combine modes only when the request needs them. A general deployment, SQL security overhaul or UI rewrite is not an implied optimisation task.
Implement or recommend
- Present a short plan before broad changes: affected files, one principal mechanism, preserved behaviour and validation. For advice/review, provide the decision and actionable changes without generating an unsolicited application.
- Adapt the current implementation. Keep trusted policy at tool/backend boundaries; model instructions, Skills and structured output cannot grant access. Wire new components into the actual Runner/server and build inputs. An unused formatter or unshipped file is not an implemented optimisation.
- Preserve explicit failure and uncertainty. Provider failure must not become fabricated fallback data. A token cap, timeout, nonempty answer or HTTP 200 does not establish completion. Limit logical calls, provider attempts, nested work and elapsed time independently where the task needs bounds.
- Read lifecycle.md before preparing a cloud mutation, paid comparison, export, cache experiment or cleanup. Finish reviewable configuration and exact commands before seeking approval. For Agent Runtime packaging or operation recovery, also read runtime-lifecycle.md. For GKE deployment, capacity retries or teardown, read gke-lifecycle.md. A saved reference manifest is not necessarily the applied configuration; inspect the actual delivery path.
Authority and safety
<!-- shared:consequential-operations-brief -->Inspection is read-only, and code generation authorises no deployment, paid call or live test. Before any consequential operation (an API, billing or quota change, a billable resource, a secret, IAM, a data migration, a deployment, a deletion, or a paid or destructive test), read consequential operations, present the exact scope and limits, obtain explicit approval and end the turn to wait for it. Cleanup is a separate confirmed operation on resources this workflow created.
<!-- /shared:consequential-operations-brief -->Billing linkage and quota increases require their own approval. Verify owned cleanup of caches separately from sessions.
Validate and finish
Read validation.md for mode-specific tests, the offline saved-event checker and the offline context budget helper, which estimates request composition, tool-result sizes and compaction coverage from a saved session export. Run relevant local tests and static/build checks first, after inspecting their side effects. Check the actual boundary: tool results and correlation, outgoing child input, complete outputs, result durability or revision configuration. Mocked execution proves only the exercised local contract. Historical companion PASS results do not verify this target.
For an approved live experiment, retain failed observations, compare equivalent workloads and report sample counts, cold/warm/cache state and errors. Verify owned cleanup, including caches separately from sessions. Repeat the local adaptation to check for duplicate wiring or needless changes.
Report files changed, commands actually executed, exact versions, actual results, manual steps and remaining uncertainty. State what the change improves and what the evidence cannot establish.
<!-- shared:evidence-labels-brief -->Label each result with its tier (offline, local, live or release) and
outcome (pass, fail, blocked or not run) as
evidence labels defines them;
earlier, vendor and documentation-only results are historical,
vendor-measured or guidance, never this session's evidence.
<!-- /shared:evidence-labels-brief -->Independent community project; not affiliated with or endorsed by Google.
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
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.

