本文へ移動
cccskills
無料GitHub で公開

python-env

Fast Python environment management with uv (10-100x faster than pip). Triggers on: uv, venv, pip, pyproject, python environment, install package, dependencies.

インストール方法を見る

含まれるファイル(7)

  • SKILL.md5.2 KB
  • assets/.gitkeep0 B
  • references/dependency-management.md6.5 KB
  • references/publishing.md5.1 KB
  • references/pyproject-patterns.md6.1 KB
  • scripts/.gitkeep0 B
  • skill-report.json80.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Python Environment

Fast Python environment management with uv. Prefer the uv project workflow (uv add / uv sync / uv run) over the uv pip compatibility layer — it manages pyproject.toml + a lockfile for you and is reproducible.

Quick Commands

TaskCommand
Start a projectuv init <name> (app) · uv init --package <name> (installable, src/ layout)
Add dependencyuv add httpx
Add dev dependencyuv add --dev pytest ruff
Remove dependencyuv remove httpx
Sync env from lockfileuv sync
Run in project envuv run pytest
Update lockfileuv lock
Install a CLI tooluv tool install ruff · one-shot: uvx ruff
Install a Pythonuv python install 3.12

Start a Project

# Application (flat layout, no package build)
uv init myapp

# Installable package (src/ layout — separate tests/ that import by name)
uv init --package wordtools
# → src/wordtools/__init__.py, pyproject.toml with build-system

uv init creates pyproject.toml, pins a Python version, and prepares the project for uv add / uv sync. The --package (src) layout is preferred for anything with a test suite or that you intend to ship.

Manage Dependencies

# Add runtime deps (writes to [project.dependencies] + updates the lockfile)
uv add "httpx>=0.25" pydantic

# Add dev-only deps (writes to the dev dependency-group)
uv add --dev pytest ruff mypy

# Add with extras
uv add "fastapi[standard]"

# Remove
uv remove httpx

# Install everything from pyproject + uv.lock into .venv (reproducible)
uv sync

# Refresh the lockfile (e.g. after manual pyproject edits)
uv lock

uv creates and manages .venv automatically — you rarely activate it; just prefix commands with uv run.

Run Code

uv run python script.py     # run a script in the project env
uv run pytest               # run a tool from the dev group
uv run -- ruff check .      # `--` ends uv flag parsing

Never call bare python / pytest / ruff in a uv project — they may resolve to a different interpreter. Always uv run.

CLI Tools (global, not project deps)

uv tool install ruff        # persistent, isolated, on PATH
uv tool upgrade ruff
uvx ruff check .            # ephemeral one-shot run, nothing installed

Use uv tool / uvx for developer CLIs (ruff, pre-commit, httpie). Use uv add only for things your code imports.

Python Versions

uv python install 3.12      # download a managed interpreter
uv python list              # show available + installed
uv init --python 3.12 app   # pin a project to a version

Check python.org for the current stable (3.14 as of 2026-07; recent releases add opt-in free-threading and a JIT). 3.11+ is a sensible floor for new projects (TaskGroup, Self, faster interpreter).

Minimal pyproject.toml

[project]
name = "my-project"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
    "httpx>=0.25",
    "pydantic>=2.0",
]

# Dev deps live here; `uv add --dev <pkg>` manages this group.
[dependency-groups]
dev = [
    "pytest>=8.0",
    "ruff>=0.4",
    "mypy>=1.10",
]

Compatibility Layer (uv pip) — last resort

uv pip mirrors pip's interface for environments uv doesn't manage (a hand-made venv, a legacy requirements.txt, CI that isn't uv-native). It does not update pyproject.toml or the lockfile — prefer uv add / uv sync whenever you control the project.

uv venv                              # bare venv (no project)
uv pip install -r requirements.txt   # legacy requirements file
uv pip install -e .                  # editable install into an unmanaged venv
uv pip compile requirements.in -o requirements.txt   # pin a requirements.txt

Troubleshooting

IssueSolution
"No Python found"uv python install 3.12
Pin project Pythonuv init --python 3.12 or edit requires-python
Lock/resolve conflictuv lock --resolution=lowest-direct to probe, then loosen bounds
Stale env after pulluv sync
Cache issuesuv cache clean

When to Use

  • Always use uv over pip — 10-100x faster
  • uv add / uv remove / uv sync for project dependencies (not uv pip install)
  • uv run to execute anything inside the project env
  • uv tool install / uvx for standalone developer CLIs
  • uv pip only for environments uv doesn't manage

Additional Resources

For detailed patterns, load:

  • ./references/pyproject-patterns.md - Full pyproject.toml examples, tool configs
  • ./references/dependency-management.md - Lock files, workspaces, private packages
  • ./references/publishing.md - PyPI publishing, versioning, CI/CD

See Also

This is a foundation skill with no prerequisites.

Build on this skill:

  • python-typing-ops - Type hints for projects
  • python-pytest-ops - Testing infrastructure
  • python-fastapi-ops - Web API development

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Trigger for: explaining current FAR, DFARS, or agency-supplement text; determining documented acquisition-policy status for an agency and FAR part; comparing codified text, RFO model text, and agency deviations; tracing acquisition rulemaking; finding procurement comment periods; analyzing public comments; refreshing prior policy analysis; or producing an Acquisition Policy Impact Brief. Use published federal sources and supplied policy documents without making legal or procurement-specific applicability determinations. Do not use for clause selection, market research execution, opportunities, pricing, grants, or cooperative agreements.

日本語の概要は準備中です。原文の説明を表示しています。

aiskillstore/marketplace4332026年10月10日 更新

Systematic framework for extracting actionable items from documents and organizing them into prioritized, trackable checklists. Use when converting reports, meeting notes, audits, or any document with embedded action items into structured TODO lists.

日本語の概要は準備中です。原文の説明を表示しています。

aiskillstore/marketplace4332026年10月10日 更新

Browser automation for AI agents via inference.sh. Navigate web pages, interact with elements using @e refs, take screenshots, record video. Capabilities: web scraping, form filling, clicking, typing, drag-drop, file upload, JavaScript execution. Use for: web automation, data extraction, testing, agent browsing, research. Triggers: browser, web automation, scrape, navigate, click, fill form, screenshot, browse web, playwright, headless browser, web agent, surf internet, record video

日本語の概要は準備中です。原文の説明を表示しています。

aiskillstore/marketplace4332026年10月10日 更新

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

日本語の概要は準備中です。原文の説明を表示しています。

aiskillstore/marketplace4332026年10月10日 更新

Run AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

日本語の概要は準備中です。原文の説明を表示しています。

aiskillstore/marketplace4332026年10月10日 更新

Agile ceremonies and sprint management specialist. Use when running standups, retrospectives, sprint planning, or tracking sprint progress.

日本語の概要は準備中です。原文の説明を表示しています。

aiskillstore/marketplace4332026年10月10日 更新

aiskillstore のスキルをすべて見る

このスキルの問題を報告する