一键导入
refine-guide-hermeto
Clone a repo with working hermetic builds and compare the implementation against the hermeto guide to identify gaps and improvements
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Clone a repo with working hermetic builds and compare the implementation against the hermeto guide to identify gaps and improvements
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Provision a VM on Red Hat Beaker for multi-arch testing
Run check-payload locally to scan container images for FIPS compliance issues before they block a Konflux release
Run Conforma (Enterprise Contract) validation against a Konflux snapshot or a single image to check release policy compliance
Create a temporary pull request PipelineRun from an existing push PipelineRun to test build changes on an RHOAI release branch
Deploy locally-working hermetic build configuration into Konflux pipelines for RHOAI components
Productize an upstream Dockerfile for Konflux builds — base image swaps, digest pinning, FIPS compliance, label metadata, and build-arg simplification
| name | refine-guide-hermeto |
| description | Clone a repo with working hermetic builds and compare the implementation against the hermeto guide to identify gaps and improvements |
| version | 1.0.0 |
Read guides/hermeto-prefetch.md and guides/hermeto-python.md (relative to the plugin root) thoroughly before starting. Together they are the source of truth for all hermeto details — the main guide covers general workflow and non-Python package managers, the Python guide covers requirements generation, AIPCC, and source builds. The goal of this skill is to compare a real-world hermetic build implementation against the guides and propose improvements where they fall short.
prefetch-input: {"type": "gomod", "path": "."} and hermetic: true. Investigate whether this is for SBOM/provenance tracking, or if there's another reason. If SBOM-only, consider documenting the "data-only container" pattern in the guide.[tool.uv] config in pyproject.toml may cause upstream merge conflicts; consider moving to CLI flagsGet repo and branch: If no repo is specified in the arguments, find the next unchecked repo in the "Repos to analyze" section above. Present the repo and branch to the user for confirmation before proceeding. If the user provides a repo in the arguments, use that instead. Clone the repo at the specified branch into .claude/repos/<repo-name>-<branch> (relative to the cookbook root) so it doesn't pollute the project. If the directory already exists from a previous run, ask whether to re-clone or reuse it.
Parallel analysis: When the user asks to analyze multiple repos (e.g., "check all AIPCC repos"), spawn background agents to analyze each repo concurrently. Each agent should perform steps 2–5 independently and return its findings. Keep the main context free for synthesis — do not duplicate the agents' analysis work in the main thread.
Before spawning agents, read guides/hermeto-prefetch.md once and include its content in each agent's prompt. This eliminates redundant file reads — each agent gets the guide inline rather than reading it from disk independently. The guide is the reference for step 5 (walking through sections to compare against the implementation).
Find and parse PipelineRuns: List .tekton/*.yaml files in the cloned repo. If there is only one push pipeline, proceed with it directly. If there are multiple, present them to the user and ask which push pipeline(s) to analyze. For each selected pipeline, extract:
hermetic flag (true/false)prefetch-input (the hermeto config JSON)DOCKERFILE parameterbuild-platforms (multi-arch targets)A pipeline may set hermetic: true with no prefetch-input at all. This is valid when the Dockerfile has zero network access points — there is nothing to prefetch. Note this explicitly rather than treating it as missing data.
Even if the user selects one pipeline, scan the prefetch-input of the other push pipelines in the repo. Different components in the same monorepo often reveal patterns (e.g., one component uses a single npm entry while others need multiple entries for sub-project lockfiles, or some components add gomod entries for Go BFFs). These cross-component patterns inform the guide even when only one pipeline is the focus.
Cross-repo patterns are equally valuable. When running parallel agents, a workaround seen in one repo (e.g., --prerelease=allow for AIPCC version suffixes) often applies to all repos using the same ecosystem. The synthesis step should surface these.
When multiple pipelines target the same component (e.g., push + pull-request, or an older pipeline alongside a newer one), compare their prefetch-input for consistency. Drift between pipeline files — such as a stale pipeline missing a newly added gomod entry — is worth flagging.
Identify the Dockerfile pair: The pipeline references a Dockerfile.konflux (or variant like Dockerfile.konflux.mlflow). Identify the Dockerfile that Dockerfile.konflux was derived from — this is the one to diff against. The typical lineage is: upstream Dockerfile (which may already have a UBI/RHEL variant) → ODH/midstream Dockerfile (Dockerfile.ODH, Dockerfile.rhoai, etc.) → Dockerfile.konflux. The direct parent is usually the ODH or midstream variant, not the upstream. Look for Dockerfile.ODH, Dockerfile.rhoai, or similarly named files in the same directory or in a rhoai/ subdirectory. When running as a background agent, infer the parent by comparing structure and base images; when running interactively, ask the user to confirm. Diff the two and categorize each change:
If the Dockerfile.konflux is a complete rewrite rather than a modification (e.g., switching from a Debian base to an AIPCC UBI9 image), note this as a structural finding and compare the two builds' approaches rather than diffing line by line. A diff produces noise when the base image ecosystem, package manager, and dependency strategy are all different.
Finding zero hermetic-specific changes is a valid and important result — it means the Konflux pipeline's automatic cachi2.env injection and volume mounts were sufficient without any manual Dockerfile modifications. Report this explicitly. When analyzing multiple repos, track the zero-change count (e.g., "4/6 repos needed no hermetic Dockerfile changes") — if most repos need no changes, that's a signal the guide should set that expectation upfront.
Also look for network-elimination strategies — cases where the developer removed network access points from Dockerfile.konflux instead of prefetching them. Common patterns: multi-stage COPY --from= to extract binaries from trusted images, switching to a base image that already includes needed tools, or adding a tool's source as a git submodule and building it from source. These are alternatives to the generic fetcher that the guide should document.
Note: Categorize "Konflux-specific but not hermetic" findings separately. These belong in a Dockerfile.konflux best practices guide, not in the hermeto prefetch guide. Track them as TODO items rather than proposing edits to guides/hermeto-prefetch.md.
Inventory hermetic build artifacts: Catalog all files in the repo relevant to hermetic builds:
package-lock.json, go.sum, Cargo.lock, requirements.txt, requirements-build.txt, rpms.lock.yaml, Gemfile.lock, artifacts.lock.yamlgo.work, go.work.sum (if present, a single gomod prefetch entry may cover multiple modules)hermeto-test.json, rpms.in.yaml, ubi.repo.env files, helper scripts (hermetic_fixes.sh, etc.).gitmodules) — submodules that replace runtime downloads (e.g., building yq from source instead of curling a binary).gitattributes for LFS-tracked paths)Walk through the guide: Using the guide content (from guides/hermeto-prefetch.md — provided in the agent prompt during parallel runs, or read directly for single-repo runs), simulate following it step-by-step for this repo. For each section of the guide, check whether it would lead a reader to the same implementation:
prefetch-input? Would a reader of the guide know how to handle this repo's specific setup (monorepo, multi-stage builds, multiple components)?prefetch-input, check the guide's section for that manager. Would following it produce the same config? Flag fields, patterns, or multi-path configs not covered.Verify claims against upstream docs. Before asserting how a package manager or hermeto feature works, check the hermeto docs to confirm. Do not assume behavior from a single repo's pipeline config — the config may be incorrect, outdated, or cargo-culted. The guide should reflect how hermeto actually works, not just how one team configured it.
Verify before asserting "required" or "essential." When a repo uses a particular flag or pattern, confirm whether it is truly necessary or just a defensive practice. Check what environment variables hermeto actually sets (e.g., PIP_NO_INDEX vs PIP_INDEX_URL), understand flag/env-var precedence for the relevant tools, and test your reasoning against the hermeto docs. Present findings as observations from the repo until verified — "this repo uses X" is safer than "X is required for hermetic builds" until you have confirmed the mechanism.
Present findings: Summarize in three categories:
Separate hermeto-specific findings (belong in guides/hermeto-prefetch.md) from Konflux-general findings (base image pinning, build-arg patterns, labels, Renovate config). Propose Konflux-general items as TODO entries rather than guide edits.
Synthesizing across multiple repos: When agents analyzed multiple repos in parallel, deduplicate and merge their findings before presenting. Group findings by topic (not by repo), note how many repos exhibited each pattern, and prioritize by frequency — a pattern seen in 5/6 repos is a stronger signal than one seen in 1/6. Include repo-specific quirks if they relate to hermetic builds (e.g., a workaround for a hermeto bug in one repo), but flag them as single-repo observations rather than general patterns.
Apply improvements incrementally: Work through findings one at a time rather than presenting all edits upfront. For each finding:
This avoids large batches of changes that are harder to review and allows the user to redirect the conversation as findings surface new questions. If changes affect the workflow described in skills/hermeto-prefetch/SKILL.md, update that skill too.