cli-server-operations
Operate Prefect CLI, profiles, settings, server, Cloud, variables, artifacts, shell command flows, and diagnostics safely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- cli-server-operations
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate Prefect CLI, profiles, settings, server, Cloud, variables, artifacts, shell command flows, and diagnostics safely.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/cli-reference.md8.5 KB
- 参考文档references/server-operations.md6.5 KB
- 参考文档references/troubleshooting.md7.6 KB
- 脚本scripts/prefect_cli_doctor.py9.9 KB
03 SKILL.md 正文
CLI And Server Operations
Use this sub-skill when a task asks how to operate Prefect from the command line, switch profiles, manage settings, check server/API readiness, start or inspect a self-hosted server, authenticate to Prefect Cloud, use shell-command flows, inspect variables or artifacts, or gather operational diagnostics.
Start Here
- Read
references/cli-reference.mdfor the root command map, session flags, profile/config commands, Cloud/API commands, variables, artifacts, shell, dashboard, and plugin diagnostics. - Read
references/server-operations.mdbefore starting, stopping, scaling, migrating, or troubleshooting a self-hosted Prefect server. - Read
references/troubleshooting.mdwhen behavior differs by profile, API URL, settings source, Cloud credentials, parser errors, database migration state, or server port availability. - Run
python scripts/prefect_cli_doctor.py --helpto see safe read-only diagnostic checks; the script never starts a server or mutates Prefect state unless explicitly extended by a future maintainer.
Safe Operating Rules
- Prefer read-only checks first:
prefect --version,prefect version,prefect config view,prefect profile ls,prefect server status --output json, and command--help. - Treat
prefect server start,prefect server services start,prefect shell serve, and background modes as long-running service operations that require explicit user approval and a stop plan. - Treat
prefect server database reset,downgrade,upgrade, andstampas database-mutating operations; require explicit production safety confirmation, backups, and a rollback plan. - Treat Cloud login/logout, workspace switching, variables, artifact deletion, and API write requests as user-context mutations; confirm target profile and workspace first.
- Keep deployment/work-pool/worker flag details in
../deployments-workers/SKILL.md; keep events, automations, blocks, assets, and concurrency primitives in../events-blocks-assets/SKILL.md; keep Python client coding and settings APIs in../api-client-settings/SKILL.md.
Common Task Routing
- Profile or setting mismatch: inspect
PREFECT_PROFILE,prefect profile ls,prefect profile inspect, andprefect config view --show-sources; then usereferences/troubleshooting.md. - Local server readiness: set
PREFECT_API_URLto the server API endpoint, runprefect server status --wait --timeout 30 --output json, or usescripts/prefect_cli_doctor.py --check-server. - Self-host startup: use
references/server-operations.md; start with SQLite only for local single-server use, and use PostgreSQL plus Redis-backed settings for multi-worker or scaled deployments. - Cloud context: use
prefect cloud login,prefect cloud workspace ls, andprefect cloud workspace setonly after confirming credentials and workspace; never print API keys. - CLI parser vs settings errors: parser errors show command usage and missing/invalid parameters; settings errors mention validation, unknown settings, or invalid profile values before command execution.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).