Sub-skill of ops-pyproject-toml: 1. Version Constraints (+3).
Scanned 9/9/2026
Install to Claude Code
npx -y skills add vamseeachanta/workspace-hub --skill 1-version-constraints --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of 1 Version Constraints?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-1-version-constraints-c0fa674d)More formats (shields.io, HTML) on the badges page.
---
name: ops-pyproject-toml-1-version-constraints
description: 'Sub-skill of ops-pyproject-toml: 1. Version Constraints (+3).'
version: 1.0.0
category: operations
type: reference
scripts_exempt: true
---
# 1. Version Constraints (+3)
## 1. Version Constraints
```toml
# Recommended patterns
dependencies = [
"pandas>=2.0.0", # Minimum version (most common)
"numpy>=1.24,<2.0", # Range for major version compatibility
"requests~=2.28", # Compatible release (~=2.28 means >=2.28,<3.0)
]
# Avoid
dependencies = [
"pandas==2.1.3", # Too strict, causes conflicts
"numpy", # Too loose, may break with updates
]
```
## 2. Organize Optional Dependencies
```toml
[project.optional-dependencies]
# Group by purpose
dev = ["pytest", "ruff", "mypy"]
docs = ["mkdocs", "mkdocs-material"]
viz = ["plotly", "matplotlib"]
# Convenience groups
test = ["pytest", "pytest-cov"]
lint = ["ruff", "mypy"]
all = ["my-project[dev,docs,viz]"]
```
## 3. Use src Layout
```
my-project/
├── pyproject.toml
├── src/
│ └── my_project/
│ ├── __init__.py
│ └── core.py
└── tests/
└── test_core.py
```
## 4. Keep Tools Consistent
```toml
# Use same line-length everywhere
[tool.ruff]
line-length = 88
[tool.black]
line-length = 88
[tool.isort]
line_length = 88
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!