← 返回 Skills 市场
exenvitor

K8s Prefect Flow Builder

作者 ExenVitor · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
141
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install k8s-prefect-flow-builder
功能描述
Build, modify, and review Prefect-based offline orchestration in this repository. Use when adding a new Prefect flow, wrapping an existing offline computatio...
使用说明 (SKILL.md)

Prefect Flow Builder

Overview

Use this skill to add or refactor Prefect-managed offline workflows in this repository without mixing orchestration concerns into business logic.

Workflow

  1. Classify the change.
  • New flow or major refactor: read references/flow-design.md and references/template-prefect-yaml.md.
  • Deployment-only or config change: read references/deployment-patterns.md.
  • Resource or concurrency tuning: read references/resources-and-concurrency.md.
  • If the system model is unclear, read references/architecture.md first.
  1. Keep orchestration separate from compute.
  • Put heavy business logic in reusable job or service modules under src/core/....
  • Keep Prefect wrappers in src/prefect_flows/....
  • Use tasks for independently observable units or meaningful side effects; avoid exploding one logical step into many tiny tasks just for structure.
  • Choose task invocation mode deliberately: direct call for simple serial execution, .submit() or .map() for in-flow concurrency, and .delay() only for background execution on separate infrastructure.
  • If a child flow is intentionally serial, call tasks directly inside the loop and let the child flow own error aggregation and final failure semantics. Do not default to .submit() just because the unit is a task.
  • Reserve .submit() for cases that actually need Prefect futures, parallel fan-out, or non-blocking wait and collection behavior, and make sure terminal futures are resolved before the flow returns.
  • Introduce child flows only when you need a separate scaling, resource, or failure boundary.
  1. Put concurrency controls at the right layer.
  • Use task-runner concurrency for in-flow task execution only; it is not a substitute for deployment or infrastructure throttling.
  • Use deployment, work-pool, worker, or work-queue limits to control how many flow runs the platform launches.
  • Use tag-based concurrency limits when many tasks across flows share an external bottleneck such as a database, API, or memory-heavy resource.
  1. Treat prefect.yaml as deployment source of truth.
  • Put deployment names, schedules, work pool selection, resources, concurrency policies, and deployment parameter defaults in prefect.yaml.
  • Let CI provide only deploy-time values such as PREFECT_API_URL and PREFECT_DEPLOY_IMAGE.
  • Keep runtime business env in Kubernetes via env_from, not CI.
  • Keep infrastructure choices aligned with Prefect's worker model: deployments target work pools, and workers poll compatible pools to execute runs.
  1. Make failures observable.
  • Raise exceptions instead of returning non-zero codes silently.
  • Include key context in exception messages and logs.
  • Use readable task and flow names so Prefect UI can identify the failing unit quickly.
  • When a batch must continue after per-item failures, convert each item into a structured result, finish the batch, then raise once at the flow boundary if the aggregate outcome should be failed.
  1. Validate in this order.
  • Run focused tests for changed flow and job code.
  • Review prefect.yaml for deployment or resource drift.
  • Trigger a small manual run before enabling or changing schedules.
  • If the question is about Prefect semantics rather than repo conventions, verify against the official v3 docs before codifying a pattern.

Repository Anchors

  • Flow entrypoints: src/prefect_flows/
  • Reusable compute logic: src/core/
  • Deployment definitions: prefect.yaml
  • Team guide: docs/cg_offline_prediction/prefect_orchestration_overview.md

Prefect v3 Defaults

  • Tasks support three distinct execution modes in v3: direct call blocks and returns a result, .submit() returns a PrefectFuture for concurrent execution in the same flow, and .delay() is for background execution on separate workers.
  • Task runners are optional. If you are not intentionally using concurrency, do not introduce .submit() or a task runner configuration just to preserve the task decorator.
  • Task states are orchestrated client-side and may appear with eventual consistency in the UI, so design recovery and resume logic around durable business outcomes instead of assuming every intermediate task-state transition is the source of truth.

References

安全使用建议
This skill is a repo-centric guide for creating and deploying Prefect v3 flows; it contains patterns and templates but does not request credentials or install software. Before using it: ensure your CI/Kubernetes secrets (PREFECT_API_URL, PREFECT_DEPLOY_IMAGE, and runtime Secrets/ConfigMaps) are managed securely, confirm the target Prefect/Kubernetes versions match the templates, and review any generated prefect.yaml or CI deployment commands before applying them. If you need the skill to perform automated actions (deploy via CI), verify those CI jobs run in a trusted environment — the skill itself does not perform network I/O or secret access.
功能分析
Type: OpenClaw Skill Name: k8s-prefect-flow-builder Version: 1.0.0 The skill bundle provides a comprehensive set of instructions and templates for managing Prefect workflows on Kubernetes. It includes architectural guidance, deployment patterns, and resource management best practices across files like SKILL.md and various reference documents. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found; the content is strictly aligned with legitimate orchestration and CI/CD tasks.
能力评估
Purpose & Capability
Name and description match the content of SKILL.md and the included reference docs; all recommendations and required artifacts (prefect.yaml, src/prefect_flows/, CI variables) are coherent with building Prefect flows.
Instruction Scope
Runtime instructions are limited to repository conventions, local files, and Prefect/Kubernetes/CI configuration guidance. There are no commands, external endpoints, or directives to read arbitrary system files or exfiltrate data.
Install Mechanism
No install spec and no code files — the skill is instruction-only, so nothing is written to disk or downloaded during install.
Credentials
The SKILL.md references CI-provided deploy-time values (PREFECT_API_URL, PREFECT_DEPLOY_IMAGE) and Kubernetes runtime env via env_from; no credentials or unrelated environment variables are requested.
Persistence & Privilege
always is false and the skill is user-invocable only. There is no indication it modifies other skills or requires persistent elevated presence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install k8s-prefect-flow-builder
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /k8s-prefect-flow-builder 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the prefect-flow-builder skill. - Provides clear guidelines for adding, modifying, and reviewing Prefect-based offline orchestration in the repository. - Outlines best practices for flow structure, separation of orchestration from business logic, concurrency control, and deployment configuration. - Includes a workflow for classifying and validating changes, along with repository anchors and reference documentation for further guidance. - Documents default behaviors and usage recommendations for Prefect v3 tasks, flows, and deployments.
元数据
Slug k8s-prefect-flow-builder
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

K8s Prefect Flow Builder 是什么?

Build, modify, and review Prefect-based offline orchestration in this repository. Use when adding a new Prefect flow, wrapping an existing offline computatio... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 141 次。

如何安装 K8s Prefect Flow Builder?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install k8s-prefect-flow-builder」即可一键安装,无需额外配置。

K8s Prefect Flow Builder 是免费的吗?

是的,K8s Prefect Flow Builder 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

K8s Prefect Flow Builder 支持哪些平台?

K8s Prefect Flow Builder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 K8s Prefect Flow Builder?

由 ExenVitor(@exenvitor)开发并维护,当前版本 v1.0.0。

💬 留言讨论