Skip to content
cccskills
FreePublished on GitHub

uv

在 Windows/macOS/Linux 上使用 `uv` 执行 Python 运行、依赖同步、锁文件管理、Python 版本管理与工具命令(`uv run`、`uv sync`、`uv lock`、`uv python`、`uv tool`)。

当任务涉及“用 uv 运行脚本/命令”“临时依赖(`--with`)”“锁文件一致性(`--locked`/`--frozen`)”“跨平台 shell(bash/zsh/PowerShell)下排查 uv 执行问题”时使用此 skill。

The English summary is being prepared. Showing the original description.

See how to install

Files included (8)

  • SKILL.md3.6 KB
  • agents/openai.yaml188 B
  • references/commands.md220 B
  • references/python.md465 B
  • references/run.md598 B
  • references/sync-lock.md516 B
  • references/tool.md380 B
  • references/troubleshooting.md672 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Uv

Overview

以可复现、可审计的方式使用 uv。优先给出最小可执行命令,先读状态后做写入,明确是否会修改 uv.lock、.venv、.python-version。

Workflow

  1. 确认上下文:当前目录是否为 pyproject.toml 项目、是否允许改动锁文件和环境。
  2. 先选操作面:运行命令(run)、同步环境(sync)、更新锁(lock)、Python 版本(python)、工具(tool)。
  3. 先执行只读探测:版本、help、检查状态(如 uv --version、uv lock --check、uv sync --check)。
  4. 再执行变更命令:明确写入范围(uv.lock、.venv、.python-version、工具目录)。
  5. 输出关键结果与下一步。

Operation Decision

  1. 只执行一次命令且不想持久安装工具:用 uv tool run(或 uvx)。
  2. 在项目环境中执行代码/命令:用 uv run。
  3. 需要补齐或重建项目环境:用 uv sync。
  4. 需要检查或更新锁文件:用 uv lock(只检查用 uv lock --check)。
  5. 需要固定解释器版本:用 uv python install + uv python pin。

Command Rules

  • uv 选项必须放在被执行命令之前;必要时用 -- 分隔(例如 uv run --python 3.12 -- python)。
  • 需要临时依赖时用 uv run --with <pkg> 或 uv tool run --with <pkg>。
  • 不希望自动发现项目时用 --no-project。
  • uv run/uv sync 默认会处理 lock/sync;需要禁止写锁文件时优先 --locked,需要跳过锁文件更新检查时用 --frozen。
  • 执行 Python 脚本工具(如校验脚本)缺依赖时,优先 uv run --with pyyaml <script>。
  • 在 Windows 下出现 Python 默认编码导致的 UnicodeDecodeError 时,可先设置 $env:PYTHONUTF8='1' 后再运行 uv run ...。

Failure Handling

  • 命令不存在或子命令写错:先运行对应 --help,再重试最小命令。
  • No module named ...:改为 uv run --with <missing-package> ...。
  • --locked 失败(锁文件过期):先 uv lock 或 uv sync 更新,再重试。
  • 目录不是项目却执行了项目命令:改用 --no-project 或切换到正确项目目录。
  • PowerShell 环境变量导致参数展开异常:优先使用单引号和显式变量赋值。

Safety Checklist

执行会写入的命令前,先确认:

  • 当前仓库/目录是否正确。
  • 是否允许修改 uv.lock 与 .venv。
  • 是否允许写入 .python-version。
  • 是否为一次性命令(应使用 uv tool run)还是持久安装(uv tool install)。

Output Format

统一按以下结构输出:

  1. Plan: 本次要完成的 uv 任务。
  2. Commands: 实际执行命令(先只读,后变更)。
  3. Result: 关键结果(是否改动锁文件/环境、关键版本、状态检查结果)。
  4. Next: 失败时的最短可执行下一步。

Reference

按需读取参考文档:

  • 命令索引:references/commands.md
  • 运行与临时依赖:references/run.md
  • 锁与同步:references/sync-lock.md
  • Python 版本管理:references/python.md
  • 工具命令:references/tool.md
  • 常见故障:references/troubleshooting.md

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Write and debug ast-grep rules for structural code search and rewrite. Use when tasks require AST-aware matching (not plain text), such as finding specific syntax shapes, relational patterns (inside/has), composite logic (all/any/not), or precise code refactors across a codebase.

The English summary is being prepared. Showing the original description.

BiFangKNT/mtga1.2KUpdated Jun 18, 2026

gh-cli

Free

使用 GitHub CLI (`gh`) 执行非交互式 GitHub 协作与自动化任务(PR、Issue、Actions、Release、API 查询/修改)。当用户要求“用 gh 命令完成任务”、需要结构化 JSON 输出(`--json`/`--jq`)、批量处理 PR/Issue(如“批量 review 多个 PR”)、按策略合并(如“检查通过后自动 squash 合并”)时使用此 skill。

The English summary is being prepared. Showing the original description.

BiFangKNT/mtga1.2KUpdated Jun 18, 2026

pwsh

Free

在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 `--jq`/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。

The English summary is being prepared. Showing the original description.

BiFangKNT/mtga1.2KUpdated Jun 18, 2026

tauri

Free

构建、调试与发布 Tauri v2 应用的工程化工作流。覆盖项目初始化(create-tauri-app)、前端与 Rust 命令通信(`#[tauri::command]` + `invoke`)、状态管理、Capabilities 权限建模、插件接入、跨平台构建与问题排查。当用户需求涉及“创建 Tauri 项目”“把 Web 前端接到 Rust 后端”“最小权限配置(fs/http/shell)”“接入 Tauri 官方插件”“执行 tauri dev/build”“排查 Tauri 构建或运行错误”时使用此 skill。

The English summary is being prepared. Showing the original description.

BiFangKNT/mtga1.2KUpdated Jun 18, 2026

Maintain, debug, and recover MTGA's Trae native custom-model route. Use when Trae native integration fails, Trae updates shift ai_agent.dll hook offsets, errors such as 4028/4054/429 appear, native rewriter or SseOpenPayload URL rewriting needs diagnosis, or Codex needs to avoid repeating prior renderer-JS/private-protocol dead ends.

The English summary is being prepared. Showing the original description.

BiFangKNT/mtga1.2KUpdated Jun 18, 2026

UI/UX design intelligence with searchable database

The English summary is being prepared. Showing the original description.

BiFangKNT/mtga1.2KUpdated Jun 18, 2026

See all skills by BiFangKNT

Report a problem with this skill