Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问许可证需确认审计提醒

python-dev-environmentPython DEV environment 测试

Agent Skill

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

总安装

168

周安装

17

GitHub Stars

158

下载量

140
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:python-dev-environment(Python DEV environment 测试)
来源仓库:https://github.com/panaversity/agentfactory
仓库路径:skills/python-dev-environment
安装命令:
npx skills add https://github.com/panaversity/agentfactory --skill python-dev-environment
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/panaversity/agentfactory --skill python-dev-environment

简介

用于配置和管理 Python 开发环境的一致性。

  • 适合虚拟环境创建、依赖隔离与工具链标准化。python-dev-environment 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 支持 pyenv、venv 等多种环境管理工具集成。
  • 需根据操作系统和项目需求选择合适的环境方案。
  • 避免在生产环境中直接修改系统级 Python 包。

SKILL.md

Python Development Environment Expertise Skill

Purpose: Provides verified, grounded reference data for writing Chapter 14.1 lessons. Every command, version number, and config option below was extracted from official documentation on 2026-02-20.

Usage: Content-implementer subagents MUST reference this skill when writing Ch 14.1 lessons. Never invent commands or config options — use only what is documented here.


1. uv — Package Manager & Project Orchestrator

Version: 0.10.4 (released February 17, 2026) Written in: Rust Maker: Astral (same company as ruff) Source: docs.astral.sh/uv

Installation Commands

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux (curl)
curl -LsSf https://astral.sh/uv/install.sh | sh
# macOS (Homebrew)
brew install uv
# Windows (WinGet)
winget install --id=astral-sh.uv -e

uv init — Project Scaffolding

uv init smartnotes          # Create new project in subdirectory
uv init                     # Initialize in current directory
uv init --lib <name>        # Library project
uv init --package <name>    # Packaged application (src layout)

Files created by uv init smartnotes:

smartnotes/
├── .gitignore
├── .python-version          # Contains: 3.12 (or detected version)
├── README.md
├── main.py
└── pyproject.toml

Default main.py:

def main():
    print("Hello from smartnotes!")

if __name__ == "__main__":
    main()

Default pyproject.toml:

[project]
name = "smartnotes"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = []

Additional files created on first uv run or uv sync:

  • .venv/ — virtual environment (not version-controlled)
  • uv.lock — cross-platform lockfile with exact versions (should be committed)

uv add — Dependency Management

uv add requests                    # Add runtime dependency
uv add 'requests>=2.28,<3'        # With version constraint
uv add --dev pytest                # Add dev dependency
uv add --dev pytest pyright ruff   # Multiple dev deps at once
uv remove requests                 # Remove a dependency

What uv add does (three steps in one):

  1. Updates pyproject.toml
  2. Updates uv.lock (lockfile)
  3. Syncs the .venv environment

Result in pyproject.toml after uv add --dev pytest pyright ruff:

[dependency-groups]
dev = ["pytest>=9.0.2", "pyright>=1.1.408", "ruff>=0.15.2"]

uv run — Execute in Project Environment

uv run main.py                     # Run a Python file
uv run pytest                      # Run an installed tool
uv run python -c "print('hi')"    # Run inline Python

What happens on uv run:

  1. Verifies uv.lock is up-to-date with pyproject.toml
  2. Verifies .venv is up-to-date with uv.lock
  3. Installs/syncs missing dependencies automatically
  4. Runs the command inside the project's virtual environment

No manual venv activation required. Students never need source.venv/bin/activate.

Why uv Over pip

Dimensionpipuv
SpeedBaseline10-100x faster (Rust, parallel downloads, global cache)
ScopePackage install onlyAll-in-one: Python install, venvs, deps, scripts, builds
Virtual envsSeparate python -m venv stepCreates .venv automatically
LockfileNone (needs pip-tools)uv.lock generated automatically
Python versionsNeed pyenv separatelyBuilt-in: uv python install 3.12
Uninstall cleanupLeaves orphaned transitive depsRemoves transitive deps on uninstall
Disk usageSeparate copies per venvGlobal cache, up to 40% disk savings
ReplacesJust pippip, pip-tools, pipx, poetry, pyenv, virtualenv

Axiom Callback: uv = Axiom I (Shell as Orchestrator). One command replaces an entire ecosystem.


2. pyright — Static Type Checker

Version: 1.1.408 (released January 8, 2026) Written in: TypeScript (runs via Node.js; pip wrapper handles this transparently) Maker: Microsoft Source: github.com/microsoft/pyright

Installation

uv add --dev pyright               # Recommended via uv

Configuration in pyproject.toml

[tool.pyright]
include = ["src"]
exclude = ["**/__pycache__"]
typeCheckingMode = "strict"
pythonVersion = "3.12"

Also supports pyrightconfig.json (takes precedence if both exist):

{
  "include": ["src"],
  "typeCheckingMode": "strict",
  "pythonVersion": "3.12"
}

Type Checking Modes

ModeDescription
"off"All type-checking disabled; syntax errors still reported
"basic"Minimal rule set
"standard"Default (CLI). Moderate coverage
"strict"Most rules enabled; requires complete type annotations

Running Pyright

uv run pyright                     # Check entire project
uv run pyright src/main.py         # Check specific file

Clean output:

0 errors, 0 warnings, 0 informations

Error output:

/path/to/file.py:10:5 - error: Type of parameter "name" is unknown (reportUnknownParameterType)
1 error, 0 warnings, 0 informations

What Strict Mode Catches (28 Additional Rules)

Strict mode enables 28 rules that are "none" in standard but "error" in strict:

Missing annotations:

  • reportMissingParameterType — parameters without type hints
  • reportMissingTypeArgument — generic classes without type args
  • reportUnknownParameterType — parameter type resolves to Unknown
  • reportUnknownVariableType — variable type resolves to Unknown
  • reportUnknownArgumentType — argument type resolves to Unknown
  • reportUnknownMemberType — member access resolves to Unknown
  • reportUnknownLambdaType — lambda parameters Unknown

Code quality:

  • reportUnusedImport — imported symbols not referenced
  • reportUnusedVariable — local variables not referenced
  • reportUnusedFunction — functions not referenced
  • reportUnusedClass — classes not referenced
  • reportDuplicateImport — duplicate imports
  • reportPrivateUsage — accessing private members
  • reportConstantRedefinition — redefining Final variables
  • reportDeprecated — deprecated features

Type safety:

  • reportUntypedBaseClass — base class without types
  • reportUntypedFunctionDecorator — untyped decorators
  • reportUntypedClassDecorator — untyped class decorators
  • reportUntypedNamedTuple — NamedTuple without types
  • reportMatchNotExhaustive — incomplete match
  • reportUnnecessaryCast — unnecessary casts
  • reportUnnecessaryComparison — always-true/false comparisons
  • reportUnnecessaryContains — unnecessary in checks
  • reportUnnecessaryIsInstance — unnecessary isinstance
  • reportIncompleteStub, reportInconsistentConstructor, reportInvalidStubStatement, reportTypeCommentUsage

Before/After Example (for Ch 14.1)

# BEFORE: Passes standard, FAILS strict
def greet(name):
    return f"Hello, {name}"

# AFTER: Passes strict
def greet(name: str) -> str:
    return f"Hello, {name}"

Axiom Callback: pyright = Axiom V (Types Are Guardrails). The compiler catches bugs before runtime.


3. ruff — Linter & Formatter

Version: 0.15.2 (released February 19, 2026) Written in: Rust Maker: Astral (same company as uv) Source: docs.astral.sh/ruff

Installation

uv add --dev ruff                  # Add as dev dependency

Running Ruff

# Linting
uv run ruff check .               # Lint all Python files
uv run ruff check --fix .         # Lint and auto-fix

# Formatting
uv run ruff format .              # Format all Python files
uv run ruff format --check .      # Check without modifying

Configuration in pyproject.toml

[tool.ruff]
line-length = 88
target-version = "py312"

[tool.ruff.lint]
select = [
    "E",    # pycodestyle errors
    "W",    # pycodestyle warnings
    "F",    # Pyflakes (unused imports, undefined names)
    "I",    # isort (import sorting)
    "UP",   # pyupgrade (modernize syntax)
    "B",    # flake8-bugbear (common bugs)
    "SIM",  # flake8-simplify (simplifiable code)
]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

Key Rule Categories (for Teaching)

PrefixNameWhat It Catches
FPyflakesUndefined names, unused imports, unused variables
Epycodestyle (errors)PEP 8 style violations (indentation, whitespace)
Wpycodestyle (warnings)PEP 8 warnings
IisortImport sorting order
UPpyupgradeOld syntax that can be modernized
Bflake8-bugbearCommon programming mistakes
SIMflake8-simplifyCode that can be simplified
Npep8-namingNaming conventions (CamelCase, snake_case)
Sflake8-banditSecurity vulnerabilities
T20flake8-printPrint statements left in code

Default enabled rules: E4, E7, E9, and F (minimal safe set). Total rules: 800+ built-in. Suppress inline: # noqa: F841 on a line.

What Ruff Replaces

Ruff is a single binary replacing: Flake8 (+ dozens of plugins), Black, isort, pydocstyle, pyupgrade, autoflake. Speed: 10-100x faster than these tools individually.

Ruff format is a drop-in Black replacement (>99.9% identical formatting).

Axiom Callback: ruff = Axiom IX (Verification is a Pipeline). Automated quality checks in your CI.


4. pytest — Testing Framework

Version: 9.0.2 (released December 6, 2025) Requires: Python >= 3.10 Source: docs.pytest.org

Installation

uv add --dev pytest                # Add as dev dependency

Test Discovery Conventions

ElementConventionExample
Filestest_*.py or *_test.pytest_calculator.py
Functionstest_* prefixdef test_addition():
ClassesTest* prefix (no __init__)class TestCalculator:
Methodstest_* inside Test* classesdef test_add(self):

Minimal Test File

# test_example.py
def func(x):
    return x + 1

def test_answer():
    assert func(3) == 4

Key: pytest uses plain assert — no special assertion methods needed.

Running Tests

uv run pytest                      # Run all discovered tests
uv run pytest -v                   # Verbose (one line per test)
uv run pytest -q                   # Quiet (minimal output)
uv run pytest test_example.py      # Run specific file
uv run pytest -k "test_answer"     # Run matching keyword

Output Format

Default (dots):

test_example.py .                                                [100%]
========================== 1 passed in 0.12s ===========================

Verbose (-v):

test_example.py::test_answer PASSED                              [100%]
========================== 1 passed in 0.12s ===========================

Output characters:

CharacterMeaning
.Passed
FFailed
EError (exception in setup/teardown)
sSkipped
xExpected failure (xfail)

Configuration in pyproject.toml

[tool.pytest.ini_options]
addopts = "-ra -q"
testpaths = ["tests"]

Axiom Callback: pytest = Axiom VII (Tests Are the Specification). Tests define what "correct" means.


5. Git — Version Control

Note: Git is not a Python-specific tool and doesn't need version-grounding the same way. The chapter references Git as the fifth discipline tool.

Key Git Commands for SmartNotes

git init                           # Initialize repo (uv init creates .gitignore)
git add .                          # Stage all changes
git commit -m "message"            # Commit with message
git log --oneline                  # View history
git diff                           # See uncommitted changes

Axiom Callback: Git = Axiom VIII (Version Control is Memory). Every change tracked, reversible.


6. The Unified pyproject.toml (SmartNotes After Full Setup)

After running all setup commands, the SmartNotes pyproject.toml looks like:

[project]
name = "smartnotes"
version = "0.1.0"
description = "A personal note-taking assistant"
readme = "README.md"
requires-python = ">=3.12"
dependencies = []

[dependency-groups]
dev = ["pytest>=9.0.2", "pyright>=1.1.408", "ruff>=0.15.2"]

[tool.pyright]
typeCheckingMode = "strict"
pythonVersion = "3.12"

[tool.ruff]
line-length = 88
target-version = "py312"

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

[tool.pytest.ini_options]
addopts = "-ra -q"
testpaths = ["tests"]

Teaching point: One file configures ALL four tools. This is the power of pyproject.toml as the single source of truth for a Python project.


7. Platform-Specific Notes

Windows

  • uv install: PowerShell command (see Section 1)
  • Paths use \ but uv handles this transparently
  • .venv\Scripts\activate (if manual activation needed, but uv run avoids this)

macOS

  • uv install: curl or Homebrew
  • .venv/bin/activate (if manual activation needed)

Linux

  • uv install: curl
  • Same as macOS for venv paths

Key teaching point: uv run works identically on all platforms. Students never need to know activation differences.


8. Chapter 14 Tone Reference (Condensed)

Characters

  • James: Junior dev, 3 weeks into first job, e-commerce platform team. Learner surrogate. Makes understandable mistakes. Never mocked. Growth narrative.
  • Emma: Senior engineer, 4 years at company. Mentor. Teaches through showing, not lecturing. Delivers quotable one-liners. Calm, slightly dry. Declarative sentences.

Lesson Opening Pattern

  1. Bridge sentence from previous lesson
  2. James hits a crisis (specific time, specific number, visceral detail)
  3. He discovers tools/code are inadequate (shown as code block)
  4. Emma arrives, delivers one-line diagnosis
  5. Emma fixes it

Lesson Section Flow

  1. Title → Narrative opening (4-6 paragraphs)
  2. "The Problem Without This Tool" → pain point
  3. "The Tool Defined" → blockquote + table + image
  4. "From Axiom to Practice" → connects to Ch 14 axiom
  5. "Practical Application" → code examples, configs
  6. "Anti-Patterns" → narrative + table (3-4 columns)
  7. "Try With AI" → exactly 3 prompts with **What you're learning:**
  8. "Key Takeaways" → numbered list, 4-6 items
  9. "Looking Ahead" → bridge to next lesson

YAML Frontmatter Template

---
sidebar_position: N
title: "Lesson Title"
description: "One sentence"
keywords: ["keyword1", "keyword2"]
chapter: 14.1
lesson: N
duration_minutes: 20-25

skills:
  - name: "Skill Name"
    proficiency_level: "A2|B1"
    category: "Conceptual|Technical|Applied"
    bloom_level: "Understand|Apply"
    digcomp_area: "Computational Thinking|Problem Solving"
    measurable_at_this_level: "Student can..."

learning_objectives:
  - objective: "Full sentence"
    proficiency_level: "A2|B1"
    bloom_level: "Apply|Understand"
    assessment_method: "Full sentence"

cognitive_load:
  new_concepts: 5-7
  assessment: "Justification sentence"

differentiation:
  extension_for_advanced: "Advanced activity"
  remedial_for_struggling: "Simplified approach"
---

Code Style

  • Use ``` `python static ``` tag for Python blocks
  • BAD code first with # BAD: comments, GOOD code follows
  • Inline comments explain intent, not syntax
  • Never two code blocks back-to-back without prose

Voice

  • Third-person narrator for narrative sections
  • "You" for instructional sections (Practical Application, Try With AI)
  • Declarative, confident. No hedging, no exclamation marks.
  • Tables as primary analytical device.

9. Axiom Callbacks (Ch 14.1 → Ch 14 Mapping)

ToolAxiomConnection
uvI — Shell as OrchestratorOne command orchestrates entire ecosystem
pyproject.tomlII — Knowledge is MarkdownProject config as single source of truth
pyrightV — Types Are GuardrailsCompiler catches bugs before runtime
ruffIX — Verification is a PipelineAutomated lint/format in CI
pytestVII — Tests Are the SpecificationTests define "correct" behavior
GitVIII — Version Control is MemoryEvery change tracked and reversible

10. Confidence Assessment

Data PointStatusSource
uv v0.10.4, commands, configVERIFIEDdocs.astral.sh/uv, PyPI, GitHub
pyright v1.1.408, strict rulesVERIFIEDgithub.com/microsoft/pyright, PyPI
ruff v0.15.2, rules, configVERIFIEDdocs.astral.sh/ruff, PyPI, GitHub
pytest v9.0.2, conventionsVERIFIEDdocs.pytest.org, PyPI, changelog
requires-python defaultNOTEShows >=3.11 in docs but varies by detected Python
Platform install differencesVERIFIEDOfficial docs for each tool
Ch 14 tone and structureVERIFIEDRead from actual lesson files

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

展示第三方安全扫描或审计结果

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

平台分布

Codex

35.86%
按下载量换算50

Claude

27.83%
按下载量换算39

Cursor

18.77%
按下载量换算26

Gemini CLI

9.29%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/panaversity/agentfactory --skill python-dev-environment 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills