- Home
- Skills
- APIs & Backend
- uv zero venv python architect
Works with the AI Agents you already use
uv zero venv python architect
Build cross-platform Python CLIs using uv and PEP 723 with zero virtual environment management.
Free
uv zero venv python architect
Example session with this skill installed
Create a Python script called fetch_data.py that downloads a JSON from a URL and saves it to a file. Use the requests library and follow PEP 723 and the main(argv) pattern.
- Read your context and instructions
- Compiled the uv zero venv
I have created the portable CLI script using PEP 723 inline metadata and the requested architecture. It is ready to run immediately with uv run.
fetch_data.py
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "requests",
# ]
# ///
import sys
import argparse
import requests
import json
from pathlib import Path
def download_json(url: str, output_path: Path) -> None:
"""Pure function to handle data retrieval."""
response = requests.get(url, timeout=10)
response.raise_for_status()
data = response.json()
with open(output_path, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2)
def main(argv: list[str] | None = None) -> int:
"""CLI Entry point with injectable arguments for testing."""
parser = argparse.ArgumentParser(description="Download JSON data safely.")
parser.add_argument("url", help="Target URL for the JSON data")
parser.add_argument("--output", "-o", default="data.json", help="Output filename")
args = parser.parse_args(argv)
try:
download_json(args.url, Path(args.output))
print(f"Successfully saved data to {args.output}")
return 0
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main())
Next steps
- Run the script immediately using
uv run fetch_data.py <URL>. - Use
uv run scripts/audit_python_project.py .to verify compliance. - Test the CLI logic by calling
main(["https://api.example.com", "-o", "test.json"])in your test suite.
Connects securely to your tools. The creator never sees your data.
About this skill
Dependency drift and environment setup errors frequently break Python tools moved from local machines to CI or different operating systems. This skill enforces a modern execution model that eliminates virtual environment management and hardcoded path bugs.
What it does
- Standardizes dependencies using PEP 723 inline script metadata for portable, single-file execution.
- Enforces uv execution to bypass manual
venvcreation,pip install, and activation scripts. - Validates binary discovery by preventing hardcoded OS paths that fail across macOS, Linux, and Windows.
- Architects testable CLIs by ensuring entry points use injectable arguments and decoupled business logic.
- Audits project structure via a dedicated script to catch non-compliant files before they reach production.
How it works
- Initialize script metadata by declaring specific Python versions and libraries in a PEP 723 block at the top of the file.
- Build pure functions that handle core logic using typed parameters instead of global state or raw argument namespaces.
- Configure CLI entry points using the mandatory
main(argv)pattern for reliable unit testing of the interface. - Execute with uv using
uv run script.pyto automatically handle environment provisioning on any system.
Frameworks & tools
This skill requires the uv package manager and targets Python 3.10+. It utilizes the standard library shutil for path discovery and argparse for CLI construction.
Why this beats prompting it yourself
Prompting an LLM often results in legacy requirements.txt patterns and brittle venv instructions. This skill forces the agent to use modern PEP 723 standards, ensuring code is truly portable and requires zero configuration from the end user.
Use cases
- Build cross-platform CLI tools that work instantly on a teammate's machine.
- Create robust CI/CD pipeline scripts that don't require pre-installed dependencies.
- Rapidly prototype data scripts using pandas or requests without managing local environments.
- Develop testable command-line interfaces for microservices.
Known limitations
Requires the uv binary to be installed on the host machine. Scripts must be executed via uv run to leverage inline metadata.
Requires uv to be installed on the host. Not compatible with legacy Python versions below 3.10. Execution must follow the uv run pattern to function.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 4 days ago
- Free with an Agensi account
Requires