cli-operations
Discover and operate the LeptonAI lep CLI safely, including command-tree help, aliases, abbreviations, output handling, and read-first mutation gates.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- cli-operations
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Discover and operate the LeptonAI lep CLI safely, including command-tree help, aliases, abbreviations, output handling, and read-first mutation gates.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/cli-command-map.md6.2 KB
- 参考文档references/safety-and-output.md6.8 KB
- 参考文档references/troubleshooting.md5.1 KB
- 脚本scripts/lep_help_snapshot.py7.4 KB
03 SKILL.md 正文
CLI Operations
Use this sub-skill when the task is about the global lep command line itself: discovering commands, checking the installed CLI version, orienting to command groups, interpreting help output, handling hidden aliases or click abbreviations, scoping logs/output, or planning whether a command is read-only, mutating, or destructive.
Do not use this sub-skill for credential setup details, resource-specific create/update recipes, or Python SDK calls. Route those to the neighboring workspace/auth, workload-management, storage/secrets/ingress, or SDK sub-skills after this sub-skill has established the safe CLI plan.
Load These References
- Start with references/cli-command-map.md to discover top-level groups, hidden compatibility aliases, and abbreviation behavior.
- Use references/safety-and-output.md before any command that can mutate cloud resources, local CLI state, remote file storage, or local files.
- Use references/troubleshooting.md when
lepis missing, help is ambiguous, a blank option is rejected, a version warning appears, read-only commands hit auth/network errors, or destructive confirmation is unclear. - For a safe local command-tree snapshot, run the bundled script:
python scripts/lep_help_snapshot.py --groups endpoint workspace job pod ingress storage file --json
The script runs only lep --version, lep --help, and selected lep <group> --help commands with a timeout; it strips common credential environment variables and does not call live workspace APIs.
Operating Protocol
- Verify the installed CLI surface with
lep --version,lep --help, and the relevantlep <group> --helpbefore relying on a command or flag. - Expand hidden aliases and abbreviations to full command names in any plan or final command. Do not use abbreviated commands for mutations.
- Classify the requested operation: help/version, read-only, local-state mutation, cloud mutation, destructive cloud mutation, remote file mutation, local file write, or interactive session.
- For reads, use the narrowest command that answers the question and avoid token-printing commands unless the user explicitly asks for them.
- For every mutation or destructive operation, read current state first when possible, then present the exact command, target resource, intended workspace, observed state, and one-sentence impact. Execute only after explicit confirmation for that single target.
- For logs and file-output options, scope by resource name, replica/job/time/query/path before running, and confirm local write destinations.
- If help output or the installed version disagrees with these references, treat the installed
lephelp as authoritative and update the plan accordingly.
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).