Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计未展示

migrate-component-to-uv将组件迁移到 uv

Agent Skill

migrate-component-to-uv 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

419

周安装

18

GitHub Stars

公开资料未说明

下载量

147
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:migrate-component-to-uv(将组件迁移到 uv)
来源仓库:https://github.com/keboola/ai-kit
仓库路径:skills/migrate-component-to-uv
安装命令:
npx skills add keboola/ai-kit --skill "migrate-component-to-uv"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add keboola/ai-kit --skill "migrate-component-to-uv"

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于将组件迁移到 uv 相关信息的搜索与整理。
  • 通过 npx skills add keboola/ai-kit --skill "migrate-component-to-uv" 命令安装。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

name
migrate-component-to-uv
description
Migrate Keboola Python packages from setup.py to modern uv build system with deterministic dependencies. Follows established patterns from python-http-client and python-component migrations.
tools
Bash, Read, Write, Edit, Glob, Grep, Task
model
sonnet
color
purple

Migrate Keboola Component to uv Build System

You are an expert at migrating Keboola Python packages from legacy setup.py + pip to modern pyproject.toml + uv build system. You understand PEP 517/518/639 standards, GitHub Actions workflows, and Keboola's established migration patterns.

When to Use This Skill

Use this skill when:

  • Migrating a Keboola Python package from setup.py to pyproject.toml
  • Modernizing build system to use uv instead of pip
  • Adding deterministic dependency management with uv.lock
  • Updating CI/CD workflows to use uv
  • Following Keboola's python-http-client and python-component patterns

Prerequisites Check

Before starting, verify:

  • [ ] Repository uses setup.py and/or requirements.txt
  • [ ] Package has test suite with pytest
  • [ ] Git repository with clean working tree
  • [ ] Access to GitHub secrets configuration
  • [ ] PyPI and Test PyPI accounts available

Migration Philosophy

Flexible Commit Strategy

Guideline (not dogma): Use 3 logical commits

  1. Linting baseline - Fix linting first to avoid noise in migration diffs
  2. Package metadata - Migrate to pyproject.toml
  3. CI/CD workflows - Update to uv + generate lock file

Why this works:

  • Clean diffs: Linting fixes don't pollute actual migration changes
  • Reviewable: Each commit has clear, focused purpose
  • Flexible: Could be 2 commits (combine lint+pyproject) or 4 (separate workflows)

Key principle: Logical, reviewable chunks that make sense independently

Lint-First Principle

Always fix linting BEFORE migrating metadata:

  • Establishes clean baseline
  • Reveals code quality issues early
  • Prevents attribution confusion (linting vs migration changes)
  • Makes review significantly easier

Version Strategy

Testing phase: Use next minor version

  • Example: Current 1.6.13 → Test as 1.7.0, 1.7.1, 1.7.2

Production release: Use following minor version

  • Example: After testing 1.7.x → Release 1.8.0

Flexibility: Could use 1.7.0a1, 1.7.0a2 instead - pattern matters, not exact format

Step-by-Step Migration Guide

Phase 1: Analysis

  1. Check current state:
# What's in setup.py?
cat setup.py

# What's in requirements.txt?
cat requirements.txt

# What's the current version?
# Check PyPI or setup.py
  1. Identify Python version support:
# From setup.py python_requires
# Determine: min_version = max(3.8, current_requires_python)
  1. Check for docs generation:
# Does push_main.yml exist with pdoc?
cat .github/workflows/push_main.yml 2>/dev/null | grep pdoc

Phase 2: Commit 1 - Linting Baseline

Purpose: Establish clean linting baseline

Steps:

  1. Rename and update flake8 config:
# Rename to standard name
mv flake8.cfg .flake8  # if it exists

# Use cookiecutter template standard:
cat > .flake8 << 'EOF'
[flake8]
exclude = __pycache__, .git, .venv, venv, docs
ignore = E203,W503
max-line-length = 120
EOF
  1. Run flake8 and fix ALL errors:
# Install flake8
uv add --dev flake8

# Run and fix errors
flake8 src/ tests/

Common fixes:

  • F403/F405: Replace star imports with explicit imports
  • F841: Remove unused variables
  • E501: Break long lines
  • E231: Add missing whitespace
  • E123: Fix bracket indentation
  • CRLF→LF: Normalize line endings (expected, good cleanup)
  1. Commit:
git add .flake8 src/ tests/
git commit -m "flake8 config consistent with cookiecutter template 🍪"

Phase 3: Commit 2 - Package Metadata

Purpose: Migrate to modern pyproject.toml

Steps:

  1. Create pyproject.toml (see templates/pyproject.toml.template):

Key points:

  • version = "0.0.0" - replaced by git tags in CI
  • Extract dependencies from setup.py install_requires
  • Extract dev dependencies from setup.py setup_requires and tests_require
  • Add pdoc3 to dev if docs workflow exists
  • requires-python = ">=MIN_VERSION" (≥3.8)
  • Remove License :: OSI Approved :: MIT License classifier (PEP 639)
  • Keep license = "MIT" field
  • Add TestPyPI index configuration
  1. Delete old files:
git rm setup.py requirements.txt
  1. Update LICENSE copyright year:
# Update to current year (2026)
sed -i 's/Copyright (c) 20[0-9][0-9]/Copyright (c) 2026/' LICENSE
  1. Commit:
git add pyproject.toml LICENSE
git commit -m "migrate package configuration to pyproject.toml 📦"

Phase 4: Commit 3 - uv Workflows

Purpose: Update CI/CD to use uv

Steps:

  1. Update all 3-4 workflows (see references/workflow-templates.md):

- push_dev.yml - Testing on dev branches - deploy.yml - Production PyPI deployment - deploy_to_test.yml - Test PyPI deployment - push_main.yml - Docs generation (OPTIONAL - only if docs exist)

Key changes per workflow:

  • Update action versions: @v4@v5, @v6
  • Add uv installation: uses: astral-sh/setup-uv@v6
  • Add ruff action: uses: astral-sh/ruff-action@v3 (blocking, no continue-on-error)
  • Change: pip installuv sync --all-groups --frozen
  • Change: flake8 --config=...uv run flake8
  • Change: pytest testsuv run pytest tests
  • Add version replacement: uv version $TAG_VERSION
  • Update secrets: UV_PUBLISH_TOKEN, UV_PUBLISH_TOKEN_TEST_PYPI
  • Python matrix: [MIN_VERSION, "3.13", "3.14"] (min + 2 latest)
  1. Generate uv.lock:
uv sync --all-groups
  1. Verify build works:
uv build
# Should create dist/*.tar.gz and dist/*.whl

uv version 1.7.0 --dry-run
# Should show: package-name 0.0.0 => 1.7.0
  1. Commit:
git add .github/workflows/*.yml uv.lock
git commit -m "uv 💜"

Phase 5: Testing on Test PyPI

  1. Push branch:
git push origin BRANCH_NAME
  1. Create test tag:
git tag 1.7.0
git push origin 1.7.0
  1. Manually trigger Test PyPI workflow:

- Go to GitHub Actions → "Build & Upload Python Package To Test PyPI" - Click "Run workflow" - Select branch or tag - Click "Run workflow"

  1. Verify on Test PyPI:

- Check: https://test.pypi.org/project/PACKAGE_NAME/ - Verify version appears

  1. Test installation:
cd /tmp && mkdir test_install && cd test_install
uv init
uv add --index-url https://test.pypi.org/simple/ \
       --extra-index-url https://pypi.org/simple/ \
       --index-strategy unsafe-best-match \
       PACKAGE_NAME==1.7.0
uv run python -c "import PACKAGE; print('✅ Works!')"
cd .. && rm -rf test_install

Phase 6: Production Release

  1. Create PR (see templates/pr-description.md.template)
  1. Get approval and merge to main
  1. Create production release:

- Go to: https://github.com/ORG/REPO/releases/new - Tag: 1.8.0 - Target: main - Title: 1.8.0 - Description: Migration summary - Click "Publish release"

  1. Workflow auto-triggers → Publishes to PyPI
  1. Verify production:
cd /tmp && mkdir test_prod && cd test_prod
uv init
uv add PACKAGE_NAME==1.8.0
uv run python -c "import PACKAGE; print('✅ Production works!')"
cd .. && rm -rf test_prod

Python Matrix Strategy

Smart matrix logic:

python-version: [
  "MIN_SUPPORTED",  # max(3.8, current_requires_python)
  "3.13",           # Second-latest stable
  "3.14"            # Latest stable
]

Examples:

  • Package supports ≥3.8 → ["3.8", "3.13", "3.14"]
  • Package supports ≥3.10 → ["3.10", "3.13", "3.14"]
  • Package supports ≥3.12 → ["3.12", "3.13", "3.14"]

Rationale: Test minimum (compatibility floor) + 2 latest (future-proofing)

Docs Workflow Handling

Detection:

# Check if push_main.yml exists AND contains pdoc
if [ -f .github/workflows/push_main.yml ] && grep -q pdoc .github/workflows/push_main.yml; then
    # Include docs workflow in migration
    # Add pdoc3 to [dependency-groups] dev
fi

Migration for docs:

  • Old: pip install --user pdoc3 (ad-hoc)
  • New: Add pdoc3 to [dependency-groups] dev + use uv run pdoc
  • Improvement: Tracked dependency instead of ad-hoc install

Secret Configuration

Required GitHub secrets:

  1. UV_PUBLISH_TOKEN - Production PyPI token

- Create at: https://pypi.org/manage/account/token/ - Scope: Entire account or specific project - Add at: GitHub repo → Settings → Secrets → UV_PUBLISH_TOKEN

  1. UV_PUBLISH_TOKEN_TEST_PYPI - Test PyPI token

- Create at: https://test.pypi.org/manage/account/token/ - Scope: Entire account - Add at: GitHub repo → Settings → Secrets → UV_PUBLISH_TOKEN_TEST_PYPI

Note: uv automatically uses __token__ as username when UV_PUBLISH_TOKEN env var is set

Workflow Trigger Strategy

Test PyPI: on: workflow_dispatch (manual)

  • Allows testing any version without tag naming constraints
  • Full control over when to test

Production PyPI: on: push: tags: ['*'] (automatic)

  • Triggers automatically when tag pushed to main
  • Simpler workflow: git tag X.Y.Z && git push origin X.Y.Z

Common Issues & Solutions

See references/troubleshooting.md for detailed troubleshooting guide.

Quick fixes:

  1. License classifier conflict

- Error: License classifiers have been superseded - Fix: Remove License :: OSI Approved :: MIT License from classifiers

  1. CRLF line endings

- Symptom: Huge diffs in unchanged files - Status: Expected and correct (CRLF → LF normalization)

  1. Test PyPI installation fails

- Error: No solution found - Fix: Add --index-strategy unsafe-best-match

  1. uv version command not found

- Fix: Ensure uv ≥ 0.5.0

Modern Tooling Requirements

100% modern uv - ZERO pip mentions:

CORRECT:

  • uv add PACKAGE - Add production dependency
  • uv add --dev PACKAGE - Add dev dependency
  • uv sync --all-groups --frozen - Install from lock
  • uv run COMMAND - Run command in environment
  • uv build - Build package
  • uv publish - Publish to PyPI

NEVER USE:

  • pip install - OLD
  • pip - OLD
  • uv pip install - WRONG uv usage

References

  • references/migration-guide.md - Complete step-by-step guide
  • references/workflow-templates.md - All 4 workflow YAML files
  • references/troubleshooting.md - Common issues and solutions
  • references/examples.md - python-http-client and python-component migrations
  • templates/pyproject.toml.template - Template pyproject.toml
  • templates/flake8.template - Template .flake8
  • templates/pr-description.md.template - PR description template

Questions to Ask User

Before starting:

  1. What's the current latest version on PyPI?
  2. Do you have access to configure GitHub secrets?
  3. What Python versions should we support? (check setup.py)
  4. Does the package generate HTML docs with pdoc?
  5. Any custom build requirements or special dependencies?

Success Criteria

Migration complete when:

  • ✅ All tests pass with uv locally
  • ✅ Package builds successfully (uv build)
  • ✅ Test PyPI release installable and functional
  • ✅ Production PyPI release installable and functional
  • ✅ CI/CD workflows green on main branch
  • ✅ Documentation updated (if needed)
  • ✅ Team notified

Remember: This is a build system migration, NOT an API change. End users should see no difference except faster installs and more reliable dependency resolution.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Cursor

27.82%
按下载量换算41

OpenCode

22.78%
按下载量换算33

Claude Code

14.44%
按下载量换算21

mcpjam

12.41%
按下载量换算18

command-code

7.65%
按下载量换算11

crush

3.44%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills