archibate/dotfiles-opencode / skills/uv
uv
FlaggedUse this skill when using UV (Python package manager), needs to set up Python virtual environments, install/manage Python CLI tools, migrate from pip/pipx to UV, Python version management, or troubleshoot UV-related issues.
examples/common-patterns.md
View on GitHub# Common Patterns
## Overview
Frequently used patterns and configurations for UV development.
## Development Tool Suite
```bash
# Install complete development suite
uv tool install black # Code formatter
uv tool install flake8 # Linter
uv tool install mypy # Type checker
uv tool install pytest # Testing
uv tool install coverage # Coverage
uv tool install pre-commit # Git hooks
uv tool install commitizen # Commit conventions
uv tool install cookiecutter # Project templates
# Verify installations
uv tool list
# Weekly maintenance
uv tool upgrade --all
uv cache clean
```
## Pre-commit Integration
**.pre-commit-config.yaml:**
```yaml
repos:
- repo: local
hooks:
- id: black
name: Format with black
entry: black
language: system
types: [python]
- id: flake8
name: Lint with flake8
entry: flake8
language: system
types: [python]
- id: mypy
name: Type check with mypy
entry: mypy
language: system
types: [python]
```
**Setup:**
```bash
# Install tools
uv tool install black flake8 mypy pre-commit
# Install hooks
pre-commit install
# Test hooks
pre-commit run --all-files
```
## Shell Configuration
**~/.bashrc or ~/.zshrc:**
```bash
# UV aliases
alias uv-update='uv tool upgrade --all'
alias uv-clean='uv cache clean'
# Development aliases
alias fmt='black'
alias lint='flake8'
alias type='mypy'
alias test='pytest'
# Project shortcuts
alias venv-activate='. .venv/Scripts/activate' # or source .venv/bin/activate
alias venv-create='python -m venv .venv'
alias deps-install='uv pip install -r requirements.txt'
alias deps-freeze='uv pip freeze > requirements.txt'
# Ensure UV tools in PATH
export PATH="$HOME/.local/bin:$PATH"
```
## Related Documentation
- [Tool Management Reference](../references/tool-management.md)
- [Installation and Setup](../references/installation-and-setup.md)
- [Development Workflows](development-workflows.md)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 466k | Updated | Claude CodeCodex | Unverified | Install |
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 466k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |