Marketing Foundation
Compact two-skill starter: clarify positioning and choose a lead magnet. Use Marketing Launch for the broader eight-skill go-to-market workflow.
The tunnel uses the same cards as the catalogue. Browse only as deep as needed — or load a broad bundle immediately.
SEO, Sales, Agents or another broad area → one bundle call → work.
Read-only access to published skills. Default 8, maximum 10 skills / 120,000 characters.
Compact two-skill starter: clarify positioning and choose a lead magnet. Use Marketing Launch for the broader eight-skill go-to-market workflow.
Build an evidence-led marketing plan from ICP and competition through positioning, campaigns, growth and measurement.
Diagnose architecture and context, plan agent-team responsibilities, then organize project context and session handoffs. Memory and cost-runtime reviews remain outside this pack.
Review the journey from landing page and lead capture through registration, first value and transparent upgrades.
Plan a campaign, draft its channel content and review the work against actual brand guidance.
Prioritize an editorial roadmap and plan how to launch and distribute it across suitable channels.
Understand customer needs, compare competitors and plan a community around real member value.
Choose a relevant lead magnet, then draft a permission-based nurture journey with entry, suppression and exit rules.
Define the API contract, then plan how to observe its latency, failures and retries. Guidance and checklist; no production changes.
Profile a dataset, choose and interpret statistical methods, then validate calculations and conclusions before sharing.
Manage stored prompt versions and lifecycle in Google Agent Platform, including explicit confirmation before deletion.
---
name: agent-platform-prompt-management
metadata:
version: "1.0.0"
category: AiAndMachineLearning
description: >-
Manages and orchestrates prompts in Agent Platform. Use when you need to create,
list, retrieve, version, or delete managed prompts in Agent Platform. Don't use
for model training, model deployment to endpoints, or managing non-Agent Platform
prompts.
---
## Usage Guide
To use this skill effectively:
1. **Execute Operations via Python**: Run the Python snippets below using
`run_command` in the execution environment to manage prompts in Agent
Platform on behalf of the user. Do not delegate execution to the user or
claim lack of access once approved.
2. **No File System Search**: Do not try to find Python files or scripts on the
file system for these operations.
## Safety & Confirmation Tiers (CRITICAL)
Before executing any commands or scripts on behalf of the user, you must adhere
to the following safety tiers based on the action requested, to prevent
accidental mutation or permanent deletion of prompt resources:
1. **Tier R: Read-only (`list`, `get`)**
* No confirmation needed. Execute immediately to gather information.
2. **Tier M: Mutating & Reversible (`create`)**
* Requires **interactive confirmation** with 'Yes'/'No' options before
executing prompt creation, to prevent unintended resource proliferation
or misconfiguration. The confirmation prompt must clearly explain the
proposed prompt creation and its key parameters (e.g., display name,
template text, target model). Natural-language paraphrases without
specifying the parameters are not sufficient.
* **Same-turn restriction**: Do not execute the creation code in the same
turn as presenting the confirmation prompt. Stop and wait for the user's
reply; only execute after explicit 'Yes' / approval.
* Every parameter in the card must trace back to something the user said.
The target model is a user choice, not a default: if the user did not
name one, ASK before building the card. Do not carry over the model that
appears in the examples here or in `references/create.md`.
* **Gold Standard Example** — for a user who said "create a prompt called
Customer Support Greeting for gemini-2.5-pro with the template Hello
{{user_name}}, how can I help...":
> I will create a prompt in Agent Platform with the following
> parameters. Please confirm this information before I proceed:
>
> * **Display Name**: `Customer Support Greeting`
> * **Target Model**: `gemini-2.5-pro`
> * **Template Text**: "Hello {{user_name}}, how can I help..."
>
> Do you confirm? [Yes/No]
3. **Tier D: Destructive & Irreversible (`delete`)**
* Requires **explicit typed confirmation** (e.g. "I confirm" or "Yes,
delete it") before executing prompt deletion, to prevent accidental
permanent loss of production prompt assets. Ask for confirmation before
any pre-flight checks.
* **Same-turn restriction**: NEVER execute in the same turn as asking for
typed confirmation. Wait for the user to reply in a new turn.
* **Gold Standard Example**:
> I will permanently delete the following prompt from Agent Platform.
> This action is irreversible. Please explicitly type your confirmation
> (e.g., "I confirm") before I proceed:
>
> * **Prompt ID**: `prompt_12345abc`
> * **Display Name**: `Legacy Outdated Prompt`
>
> Please type your confirmation to proceed.
## Phase 0: Environment Setup
**CRITICAL**: Before the user runs any of the Python snippets below, you MUST
advise them to ensure the environment is correctly initialized by following
these steps:
1. **Google Cloud Authentication**: Authenticate with your Google Cloud account
and configure active Application Default Credentials (ADC) for Agent
Platform access:
```bash
gcloud auth login
gcloud auth application-default login
```
2. **Python Dependencies**: This skill needs `google-cloud-aiplatform` and
`google-genai`. Do **not** create a virtual environment — it starts empty
and hides packages the environment already provides, forcing a redundant
install. Probe, and install only what is missing:
```bash
python3 -c "import vertexai, google.genai" \
|| pip install google-cloud-aiplatform google-genai
```
3. **Execution**: Run Python snippets with a plain `python3`. There is no
environment to activate first.
> [!TIP]
>
> **Placeholder Parameter Replacement:** The Python scripts below use uppercase
> string placeholders (like `"PROJECT_ID"`, `"LOCATION_ID"`, `"PROMPT_ID"`, and
> `"MODEL_ID"`). You **MUST** dynamically replace these placeholders with the
> actual Project ID, Region, Prompt ID, and target model values provided in the
> user's prompt (or discovered context) before generating or providing the
> scripts. If the user did not supply one of these, ask -- a placeholder is
> never satisfied by guessing a plausible value.
## 1. Managing Prompts via Agent Platform SDK
The SDK provides a high-level `Prompt` class in the preview module.
### Create a Prompt (Tier M)
Use when you need to create a new managed prompt in Agent Platform.
* **Reference**: See [create.md](references/create.md) for detailed
instructions and Python snippets.
### List Prompts (Tier R)
```python
import vertexai
from vertexai.preview import prompts
vertexai.init(project="PROJECT_ID", location="LOCATION_ID")
all_prompts = prompts.list()
for p in all_prompts:
print(f"Name: {p.display_name}, ID: {p.prompt_id}")
```
### Retrieve and Use a Prompt (Tier R)
```python
import vertexai
from vertexai.preview import prompts
vertexai.init(project="PROJECT_ID", location="LOCATION_ID")
retrieved_prompt = prompts.get(prompt_id="PROMPT_ID")
# Attributes on retrieved Prompt:
# - retrieved_prompt.prompt_id (e.g. "123456789...")
# - retrieved_prompt.prompt_data (template text string)
# - retrieved_prompt.model_name (target model)
# - retrieved_prompt.prompt_name (display name, or
# retrieved_prompt._dataset.display_name)
# Versions are supported: prompts.get(prompt_id="PROMPT_ID", version_id="2")
# Assemble with variables (kwargs must match template variable names)
assembled = retrieved_prompt.assemble_contents(text="The quick brown fox...")
print(assembled)
```
### Delete a Prompt (Tier D)
**CRITICAL**: You must pass the numeric prompt ID (e.g.,
`"1234567890123456789"`) to `prompts.delete()`. The SDK constructs the full
resource path internally using the project and location from `vertexai.init()`.
**Confirmation Required**: As a Tier D (Destructive) operation, the agent MUST
pause and request explicit, high-friction typed re-confirmation of the prompt ID
from the user before executing the deletion code. The action is irreversible.
Once the user replies with typed confirmation (e.g., "I confirm"), proceed
immediately to execute the deletion code via `run_command`.
> [!IMPORTANT]
>
> **NEVER pre-emptively execute any deletion code before receiving the user's
> response in a new turn.** You must never speculate or assume that confirmation
> will be given. Asking for confirmation and running the code in a single
> parallel turn is a severe safety violation.
```python
import vertexai
from vertexai.preview import prompts
vertexai.init(project="PROJECT_ID", location="LOCATION_ID")
prompts.delete(prompt_id="PROMPT_ID")
```
### Verification After Deletion
When the user asks to list prompts or check that a deleted prompt is gone, list
the prompts and explicitly state whether the deleted prompt ID is present. If it
is not found, explicitly confirm: *"I have verified that the prompt with ID
`<PROMPT_ID>` is no longer present in the project."*
## 2. Best Practices
- **Idempotency**:
* **Tier R** (List, Get): Inherently idempotent.
* **Tier D** (Delete): Re-running a delete on a non-existent or already
deleted resource returns NOT_FOUND. Treat this as success.
- **Placeholders**: Use the standard placeholder syntax (variable name
enclosed in double curly braces) in your prompt templates.
- **Versioning**: Always tag or record version IDs when making updates to
production prompts.
- **Model Reference**: A prompt is created against a target model ID, which
the snippets carry as the `"MODEL_ID"` placeholder. Like the other
placeholders it is MUST-replace, and it is replaced from what the user
said -- if they named no model, ask. Do not substitute a plausible current
model such as `gemini-2.5-pro`.
- **Underlying Schema**: When using the Dataset API, always use the correct
`metadata_schema_uri` and nested `metadata` structure to ensure the prompt
is recognized by Agent Platform Studio and the Prompts SDK.
Manage stored prompt versions and lifecycle in Google Agent Platform, including explicit confirmation before deletion.
Complete original guidance with source attribution and declared limitations.
Clarify the actual task, inspect available evidence and plan the relevant source workflow within authorized scope.
Project, location, prompt resource IDs and authorized lifecycle task.
Confirm the exact prompt ID and deletion intent; NOT_FOUND is not evidence of successful prior deletion without scope verification. Referenced scripts, templates, packages and remote documentation are not bundled or installed. Brief obvious-danger screening only; no functional test or comprehensive security certification.
Use Google Agent Prompt Management for [TASK]. Clarify Project, location, prompt resource IDs and authorized lifecycle task. Identify missing dependencies and assumptions. Loading this guidance grants no permission to change resources, transfer data or incur charges.
Automatic cloud execution, bypassing resource-owner permissions, or treating untested examples as deployed and verified results.
German task routing and precise scope. Original attribution: Google (google/skills repository). Confirm the exact prompt ID and deletion intent; NOT_FOUND is not evidence of successful prior deletion without scope verification. Referenced scripts, templates, packages and remote documentation are not bundled or installed. Brief obvious-danger screening only; no functional test or comprehensive security certification.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copy the text below, then paste it into your chat.