AGENT SKILL

Podman Containerfile 迁移

migrate-podman-containerfile

将 Podman Containerfile 迁移为 Discovery 目录要求的规范 Dockerfile。当 PR 未通过 POL-022 检查、某个工具包含 Containerfile 或 Dockerfile.in,或贡献者要求将 Podman 构建文件转换为 Docker 构建文件时使用。仅在迁移在机械上安全时直接创建 Dockerfile,并拒绝处理存在歧义的预处理或多文件构建。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 289
Forks
101

01 前言 Front Matter

name
migrate-podman-containerfile
description
Migrate a Podman Containerfile to the canonical Dockerfile required by the Discovery catalog. Use when a PR fails POL-022, a tool contains Containerfile or Dockerfile.in, or a contributor asks to convert Podman build files for Docker. Creates the Dockerfile directly only when the migration is mechanically safe and refuses ambiguous preprocessing or multi-file builds.
allowed-tools
shell
argument-hint
<path-to-Containerfile>

03 SKILL.md 正文

Migrate Podman Containerfile

Convert one Podman-oriented build file into the canonical Dockerfile expected by Discovery catalog tools. Ordinary Containerfiles use Dockerfile syntax, so a plain file is normally a rename. Podman's .in preprocessing and multi-file build behavior are not safe filename-only conversions.

Input

Accept exactly one repository-relative source path under agents/ or starter-kits/. Prefer a path supplied after the slash command:

/migrate-podman-containerfile agents/example/tools/example/Containerfile

If no path is supplied, enumerate changed files in those roots and compare basenames case-insensitively. Include Containerfile, names beginning with Containerfile., ending with .Containerfile, or containing .Containerfile.; also include the corresponding Dockerfile variants when they end in .in. Continue only when exactly one candidate exists; otherwise list the candidates and stop without changing files.

Safety gates

Before writing anything:

  1. Resolve the repository root with git rev-parse --show-toplevel and ensure the source remains inside agents/ or starter-kits/.
  2. Set the destination to Dockerfile in the source directory.
  3. Stop if the destination already exists. Never overwrite or merge it automatically.
  4. Stop if the source name ends in .in, contains C-preprocessor directives such as #include, #define, or #if, or depends on included fragments.
  5. Search the containing catalog item for references to the source name, repeated podman build -f/--file options, generated Containerfiles, or Podman-specific build/runtime flags. A single literal -f Containerfile reference is mechanical; variables, generated paths, multiple build files, or unclear semantics are not.
  6. Inspect Dockerfile instructions. Standard instructions are ADD, ARG, CMD, COPY, ENTRYPOINT, ENV, EXPOSE, FROM, HEALTHCHECK, LABEL, MAINTAINER, ONBUILD, RUN, SHELL, STOPSIGNAL, USER, VOLUME, and WORKDIR. Stop on unknown instructions or a non-Docker syntax frontend.
  7. Identify the effective build-context directory; stop if it cannot be determined or contains .containerignore. Docker does not read that file. Require manual migration of its exclusions to Docker's effective ignore file, resolving any existing .dockerignore or Dockerfile-specific ignore file, before retrying.

When a safety gate fails, make no changes. Explain the exact blocker and point to docs/authoring-guides/podman-to-docker-migration.md, including the manual steps relevant to that blocker. Do not produce a best-effort Dockerfile.

Safe migration

When every safety gate passes:

  1. Rename the source to the adjacent canonical destination with git mv <source> <directory>/Dockerfile.

  2. Update only exact, literal references to the old filename within the same catalog item. Replace them with Dockerfile. If a reference requires shell evaluation or changes build semantics, undo no user work; stop and report that manual migration is required.

  3. Preserve file bytes, line endings, instruction order, comments, and parser directives. Do not opportunistically rewrite package commands or base images.

  4. Confirm no Podman build filename remains in the migrated tool directory and inspect git diff -- <catalog-item>.

  5. If Docker with Buildx is available, run a syntax-only check:

    docker buildx build --check --file Dockerfile .
    

    Run it from the tool directory. Do not run a full image build unless the user explicitly asks. If Docker/Buildx is unavailable, report the check as not run rather than treating that as success.

  6. Run the repository's focused POL-022 test or PR validator when available.

Result

Report:

  • source and destination paths;
  • whether the conversion was a byte-preserving rename;
  • any exact references updated;
  • Docker syntax-check command and result, or why it was not run;
  • remaining manual validation, if any.

Success requires a tracked Dockerfile and no obsolete Containerfile in the migrated tool directory.

04 同仓库更多 Skills

microsoft
microsoft/discovery

quickstart-runner

Follow a supplied full QuickStart Scenario guide and its exact input files from a fresh Discovery project. Use for run this QuickStart, BioPharma, SiPhy, CMS or Bookshelf setup. Check readiness, obtain separate setup and execution approvals, and validate actual outputs. Do not replace the guide with a generated profile or infer permission from examples.

★ 289
microsoft
microsoft/discovery

token-estimator-mvp

Estimate AI planning ranges from a work description or explicitly authorized safe project context. Provides coarse class ranges or conditional planning bases without requiring token guesses.

★ 289
microsoft
microsoft/discovery

build-research-paper

Cross-domain / Scientific writing and publication — Build beautifully-formatted, arxiv-ready research paper PDFs from a mix of hand-authored LaTeX and/or markdown + PNG figures, using `tectonic` (default) or `pandoc` (escape hatch). Captures the reusable pattern that research projects keep re-discovering: `report/main.tex` + `references.bib` + `generate_figures.py` + iterative feedback/response scaffolding, all buildable with a single command. WHEN: write a research paper, arxiv submission, prepub, generate PDF from markdown, LaTeX paper, build main.tex, journal manuscript, referee revision, response to referee, resubmission package, publication-quality figures, matplotlib publication style, tectonic build, pandoc build, generate arxiv-ready PDF, bibliography from BibTeX.

★ 289
microsoft
microsoft/discovery

Discovery 示例智能体导入

add-example-agents

从公共的 microsoft/discovery GitHub 仓库将智能体添加到此工作区,方式可以是:(a) 本地方式,用于 Copilot 应用,为每个智能体生成一个 `.agent.md` 伴随文件(以便每个智能体都可通过 `runSubagent` 调用);(b) 通过 `UpsertAgent` 将上游最新来源的智能体添加到 Microsoft Discovery 项目(存在时绑定已有的工具 ARM 资源,缺失时先在 Azure 中构建、推送并注册这些资源);或 (c) 将已添加到本地 Copilot 应用的智能体(来源于其 `.github/agents/<name>.agent.md` 伴随文件;带工具的智能体还带有 `discovery_catalog/<name>/` 文件夹以及本地构建的工具容器,而无工具的智能体仅有伴随文件)提升到指定的 Microsoft Discovery 项目 + Azure,且不再从上游重新获取或刷新。用户每次运行只能从这三个目标中精确选择一个。适用场景:'添加 discovery 智能体''下载 discovery 智能体''安装所有 Microsoft discovery 智能体''从 microsoft/discovery 添加智能体''从 microsoft/discovery 创建 copilot 智能体''将 discovery 智能体部署到 Foundry''将 discovery 智能体部署到 Azure''将本地智能体提升到 Microsoft Discovery''将本地智能体及其容器推送到 Discovery 项目''将本地应用智能体复制到 Azure'。始终将上游仓库 `agents/<name>/` 下每个选中的子文件夹刷新到 `discovery_catalog/<name>/`,使本地目录保持最新(出现新智能体、显现已移除的智能体、应用更新后的内容)。判断智能体是否"已在本地添加"使用 `.github/agents/<name>.agent.md`(Copilot 伴随文件),而非 `discovery_catalog/` 文件夹。对于本地部署,每个生成的 `.agent.md` 都带有延迟的 Docker 引导前言,使智能体仅在首次使用且工具镜像不存在时才构建该镜像。对于 Discovery + Azure 部署,会针对工作区的资源组(RG)通过 `GetDiscoveryTool` 对每个声明的工具进行预检,并**在工具已存在时完全跳过 Docker 构建 / ACR 推送 / AcrPull RBAC**(这在 `mdqacr` 等注册表上的共享目录镜像中很常见);仅构建并注册实际缺失的工具。始终通过 `UpsertAgent` 在选定的 Discovery 项目中创建智能体,并轮询 `GetAgent` 直到 `provisioningState=Succeeded`(MCP 的 `GetAgentOperation` 工具在实践中会返回不透明错误;切勿依赖它)。所有 MCP 调用都通过嵌入在本 SKILL.md 中、并在步骤 4d 期间具体化为 `.vscode/` 的 PowerShell 脚本进行——该技能不依赖同级的辅助文件,也不依赖 VS Code MCP 运行时在会话中途浮现 `mcp_microsoft-dis_*` 工具。通过 `agents action=create` 进行的本地 Discovery 运行时注册是可选的,默认跳过。不要用于:运行已部署的智能体(使用 runSubagent),或编辑单个智能体的提示词(直接编辑 `agent.yaml`)。

AI 工程师智能体开发
★ 289
microsoft
microsoft/discovery

Discovery 入门工具包部署

discovery-services-starter-kit-deployer

端到端部署 Discovery 目录中的入门工具包(starter-kit):验证 kit.json 中的 agentRefs、构建并部署每个引用的智能体工具、逐一部署每个引用的智能体,并汇总已部署的智能体/工具以及可直接提供给客户的示例提示词。当用户要求部署 Discovery 入门工具包,或部署 starter-kits/*/kit.json 中列出的所有智能体时使用此技能。

SRE 工程师部署与发布管理
★ 289
microsoft
microsoft/discovery

Discovery 智能体端到端部署

discovery-services-agent-deployer

通过一个命令端到端部署 Discovery 目录中的智能体:发现智能体、在存在工具时构建并绑定该工具、对没有工具的智能体跳过工具相关阶段、部署智能体,并可选择运行验证。当用户要求部署 Discovery 智能体、发布或重建智能体工具镜像、从仓库中的 Dockerfile/tool.yaml 注册 Discovery 工具、恢复失败的部署,或为该目录中的某个智能体生成预演(dry-run)部署计划时使用此技能。

SRE 工程师部署与发布管理
★ 289