cloud-operator-share-context

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Share existing Google Cloud context with the operator agent

将现有 Google Cloud 上下文共享给 operator Agent

Scan agent instruction files, local memory, skills and workflows, and the repository's GCP docs for context the user or their team already have about operating in Google Cloud, show it to the user, and copy what they approve into the operator agent's memory. Use the cloud-operator skill's
project
,
agentId
and secrets rules, including asking before using their default gcloud project. Save the project once a call works.
扫描 Agent 指令文件、本地 memory、skills 和 workflows,以及代码仓库中的 GCP 文档,找出用户或其团队已有的 Google Cloud 运维上下文;向用户展示这些内容,并将用户批准的内容复制到 operator Agent 的 memory 中。遵循 cloud-operator skill 的
project
、
agentId
和 secrets 规则,包括在用户默认
gcloud
project 前先征求同意。调用成功后,保存该 project。

Usage Attribution

使用归属

MUST READ: Before executing any
gcloud
, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.
必须阅读:在执行任何
gcloud
、REST API 或 MCP 命令之前,您必须阅读并遵循 Usage Attribution 中的说明。

One fact

一条事实

If the user runs this skill with a fact, asks to save one GCP fact, or picks their version after a conflict (Send, step 6), skip the review. Follow Send,
/reflect
included, with the message "Please remember this about how I work in Google Cloud for future sessions. It's current and replaces anything you have that conflicts: {fact}". Then confirm in one line.
如果用户运行此 skill 时提供一条事实、要求保存一条 GCP 事实,或在发生冲突后选择自己的版本(发送,步骤 6),则跳过审阅。按照 发送 执行(其中包括
/reflect
),并使用消息:“请记住以下关于我和团队在 Google Cloud 中工作方式的内容,供未来会话使用。它是当前有效信息,并会替换你已有的任何冲突内容:{fact}”。然后用一行确认。

Existing Google Cloud context

现有 Google Cloud 上下文

  1. Ask first, unless the user just agreed to an offer that named the sources. Name them: agent instruction files (
    CLAUDE.md
    ,
    AGENTS.md
    ,
    GEMINI.md
    ,
    .claude/rules
    ), local memory, skills and workflows written for this user, and GCP docs in this repository. Say that the share takes only notes about how they operate in Google Cloud, takes no secrets, and shows the list before sending. If local memory notes a confirmed earlier share ("shared on"), say when and offer only what's new. Check local memory only for an earlier "shared on" note; read nothing else until they agree. If they say no, note "declined" (step 4) and stop.
  2. Collect in three groups, copying what the sources say (names, dates, reasons) rather than searching past transcripts:
    • Facts and preferences: environments (test, staging, prod) and their projects, other projects of interest, the services they manage, regions, networks, where IaC and state live, naming, owners, product preferences, best practices, architecture guidance (standard patterns, approved services, network/landing-zone conventions) and other standing choices.
    • What happened: incidents and fixes, migrations, decisions and failed attempts, each with its date and outcome.
    • How things are done: deploys, rollbacks, failovers, incident response, quota or access requests, each as a short summary naming its resources, and where its runbook is.
    Put any other note about how they operate in Google Cloud in the closest group. Leave out secrets, personal and non-GCP notes, and live state such as metrics or bills. Mark notes that apply to one repository only. When local sources disagree, keep the newer one (by its date) or ask; a conflict with what the operator already has is settled after the save (Send, step 6). If nothing qualifies, say so and stop.
  3. Show the list, one line per note with its source, and ask: all, some or none?
  4. Send the picks, then note in local memory "Cloud Operator context: shared on {date}", "declined on {date}" (no or none) or, if
    /reflect
    doesn't confirm, "not confirmed on {date}". Note nothing if a call failed. Only "shared on" and "declined on" stop the cloud-operator and cloud-operator-setup skills' offers.
  1. 先询问,除非用户刚刚接受了一个明确列出上述来源的邀请。列出这些来源:Agent 指令文件(
    CLAUDE.md
    、
    AGENTS.md
    、
    GEMINI.md
    、
    .claude/rules
    )、本地 memory、为该用户编写的 skills 和 workflows,以及此代码仓库中的 GCP 文档。说明此次共享仅包含有关用户如何在 Google Cloud 中运维的 notes,不包含任何 secrets,并会在发送前展示列表。如果本地 memory 中记录了此前已确认的共享(
    shared on
    ),说明共享时间,并且只提供新增内容。仅检查本地 memory 中是否存在此前标记为
    shared on
    的记录;在用户同意之前,不读取任何其他内容。如果用户拒绝,记录
    declined
    (步骤 4)并停止。
  2. 收集内容时分为三组,按照来源中的表述收集信息(名称、日期、原因),而不是搜索过去的对话记录:
    • 事实与偏好: environments(test、staging、prod)及其 projects、其他关注的项目、用户管理的 services、regions、networks、IaC 和 state 的存放位置、命名方式、owners、product preferences、best practices、architecture guidance(标准模式、approved services、network/landing-zone conventions),以及其他长期有效的选择。
    • 发生过的事情: incidents 和 fixes、migrations、decisions 和 failed attempts,每项都附有日期和结果。
    • 事项如何处理: deploys、rollbacks、failovers、incident response、quota 或 access requests;每项用简短摘要说明,并列出相关 resources 以及其 runbook 的位置。
    将任何其他关于用户如何在 Google Cloud 中运维的 note 放入最相近的组。排除 secrets、个人信息和与 GCP 无关的 notes,以及 metrics 或 bills 等实时状态。标记仅适用于某个 repository 的 notes。当本地来源相互矛盾时,保留较新的版本(按日期判断)或向用户询问;与 operator 已有内容冲突的情况将在保存后解决(发送,步骤 6)。如果没有符合条件的内容,说明情况并停止。
  3. 展示列表,每条 note 占一行,并注明其来源,然后询问:全部共享、部分共享,还是都不共享?
  4. 发送用户选中的内容,然后在本地 memory 中记录
    Cloud Operator context: shared on {date}
    、
    declined on {date}
    (用户拒绝或选择 none),如果
    /reflect
    未确认,则记录
    not confirmed on {date}
    。如果调用失败,不记录任何内容。只有
    shared on
    和
    declined on
    会停止 cloud-operator 和 cloud-operator-setup skills 提出的共享邀请。

Send

发送

  1. Use one new operator session for the whole share: no
    contextId
    at first, then each reply's
    context_id
    .
  2. Write in plain language and the user's voice, without tags or structured formats, which the safety filter can reject. Describe procedures as what the user does. Leave out empty groups, and above about 30 notes send one group per message:
    text
    These are notes about how I and my team operate in Google Cloud. Please remember them for future sessions and skip what you already have. If one conflicts with what you know, keep yours and tell me which, with your version and when you learned it. Reply with one line per note.
    
    Facts and preferences:
    - ...
    What happened:
    - ...
    How we do things:
    - ...
  3. If a call fails with a permission error while earlier calls worked, retry once in a new session with everything sent so far, in the same wording, so the operator skips notes it already saved. If that fails, tell the user the operator refused; mention IAM only if other calls fail too.
  4. Send
    /reflect
    alone, once, after the last message, without waiting on anything such as a conflict. The operator may save during the turn too;
    /reflect
    saves everything now.
  5. If its reply doesn't say the conversation is being saved (for example, "nothing new to save"), the save isn't confirmed and memory may be off. Tell the user they can retry later by running this skill again.
  6. Otherwise, report briefly what was shared, skipped or flagged. If the operator kept its own version of a note, show the user both versions, each with its source and date if known: theirs from the list, the operator's from its reply. Ask once, for all conflicts, which version is current. Where they pick theirs, send it with One fact, all in one message; it replaces the operator's version. Where they pick the operator's or don't answer, leave it. If the operator still keeps its own version after that, tell the user and stop.
  1. 整次共享使用一个新的 operator session:开始时不带
    contextId
    ,之后使用每次回复中的
    context_id
    。
  2. 使用平实语言和用户的口吻,不使用 tags 或结构化格式,因为安全过滤器可能会拒绝这些内容。以用户实际操作的方式描述流程。省略空组;如果 note 超过约 30 条,则每条消息发送一组:
    text
    undefined
These are notes about how I and my team operate in Google Cloud. Please remember them for future sessions and skip what you already have. If one conflicts with what you know, keep yours and tell me which, with your version and when you learned it. Reply with one line per note.
Facts and preferences:
  • ... What happened:
  • ... How we do things:
  • ...
    undefined
  1. 如果某次调用出现权限错误,而之前的调用均成功,则在一个新 session 中使用相同措辞重试一次,并包含此前已发送的全部内容,这样 operator 会跳过已经保存的 notes。如果重试仍失败,告诉用户 operator 拒绝了请求;只有其他调用也失败时,才提及 IAM。
  2. 最后一条消息发送完毕后,单独发送一次
    /reflect
    ,不要等待任何结果(例如冲突)。operator 也可能在当前 turn 中保存;
    /reflect
    会立即保存全部内容。
  3. 如果回复中没有说明正在保存对话(例如回复“nothing new to save”),则保存未得到确认,并且 memory 可能已关闭。告知用户可以稍后再次运行此 skill 重试。
  4. 否则简要报告已共享、已跳过或被标记的内容。如果 operator 保留了某条 note 自己的版本,则向用户展示两个版本;如果知道来源和日期,也要一并注明:用户版本来自列表,operator 版本来自其回复。一次性询问所有冲突项当前应采用哪个版本。如果用户选择自己的版本,则通过 一条事实 将其发送,全部放在一条消息中;这会替换 operator 的版本。如果用户选择 operator 的版本或未作回答,则保持不变。如果此后 operator 仍保留自己的版本,则告知用户并停止。