python-developer
Python developer umbrella — installs Python coding conventions and bundles companion skills (best practices, testing, dependency management) in a single setup. Use when the user asks to set up Python development conventions, install Python skills, or says "set up Python development".
- License 许可
- MIT
- 最近更新
- 2026-10-24
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- python-developer
- description
- Python developer umbrella — installs Python coding conventions and bundles companion skills (best practices, testing, dependency management) in a single setup. Use when the user asks to set up Python development conventions, install Python skills, or says "set up Python development".
02 资源文件 12
- 参考文档.managed-skill.md544 B
- 参考文档references/code-recipes.md6.1 KB
- 参考文档references/ecommerce.md4.1 KB
- 参考文档references/jobs.md3.4 KB
- 参考文档references/local-business.md5.5 KB
- 参考文档references/real-estate.md2.8 KB
- 参考文档references/scraper-jobs.md8.9 KB
- 参考文档references/search.md5.2 KB
- 参考文档references/travel.md8.8 KB
- 参考文档references/web-scraping.md6.6 KB
- 参考文档references/youtube.md7.0 KB
- 参考文档templates/python-developer-rule.md2.8 KB
03 SKILL.md 正文
MANAGED SKILL — Do not edit this file here. It is managed from an external source repository. To make changes, update the source and run "update my skills" to sync.
Python Developer (Umbrella)
One-stop setup for Python development. Installs comprehensive coding conventions as an always-on rule and bundles companion skills for testing, dependency management, and best practices.
Setup Questions (Asked at Install Time)
Q1 — Toolchain
title: "Python Toolchain"
questions:
- id: toolchain
prompt: "Which Python toolchain does this project use?"
options:
- id: uv
label: "uv"
- id: poetry
label: "poetry"
Q2 — Project type
title: "Project Type"
questions:
- id: project_type
prompt: "What type of Python project is this?"
options:
- id: library
label: "Library (installable package)"
- id: cli
label: "CLI application"
- id: web
label: "Web application (Pyramid)"
Q3 — Companion skills
title: "Companion Skills"
questions:
- id: companions
prompt: "Which companion skills should be bundled alongside python-developer?"
allow_multiple: true
options:
- id: python-best-practices
label: "python-best-practices — comprehensive Python coding conventions"
- id: write-pytest
label: "write-pytest — guided test writing workflow"
- id: manage-dependencies
label: "manage-dependencies — dependency add/remove/update"
- id: all
label: "All of the above (recommended)"
If the user selects "All of the above", include all three companion skills. Default to "All of the above" if the user doesn't have a preference.
Install Actions
After collecting answers, perform these actions:
1. Generate the always-on rule
Read templates/python-developer-rule.md. Replace the placeholders:
| Placeholder | Source |
|---|---|
{toolchain} |
Q1 answer: uv or poetry |
{run_prefix} |
uv run if uv, poetry run if poetry |
{project_type_section} |
One of the blocks below, based on Q2 answer |
Project type sections (insert the matching block for {project_type_section}):
If library:
- Source layout: `src/{package_name}/` with `__init__.py` re-exports for the public API
- Keep the public API surface small — expose only what consumers need
If cli:
- Entry point in `src/{package_name}/__main__.py`
- Use `argparse` or `click` for CLI argument parsing
- Separate CLI parsing from business logic — keep commands thin
If web (Pyramid):
- Routes in `routes.py`, views in `views/`
- Use Cornice for REST services
- Context factories for authorization (ACL-based)
- Transaction management via `pyramid_tm` — do not commit manually
Write the result to .cursor/rules/python-developer.mdc in the target project.
2. Bundle companion skills
For each companion skill selected in Q3:
- Copy the entire skill directory from
$REPO_ROOT/skills/<companion>/to$TARGET_DIR/<companion>/ - Write a
.managed-skill.mdfile in the copied directory (follow the standard format from the install-skills skill) - Inject the managed-skill warning at the top of the copied SKILL.md, immediately after the YAML frontmatter closing
---:
> **MANAGED SKILL** — Do not edit this file here. It is managed from an external source repository.
> To make changes, update the source and run "update my skills" to sync.
3. Handle write-pytest companion rule
If write-pytest was selected as a companion, ask the user:
title: "Test Patterns Rule"
questions:
- id: install_test_rule
prompt: "write-pytest includes an optional Cursor rule that enforces test patterns on test files. Install it?"
options:
- id: "yes"
label: "Yes, install the test-patterns rule"
- id: "no"
label: "No, just the skill"
If yes, copy $REPO_ROOT/skills/write-pytest/templates/test-patterns-rule.mdc to .cursor/rules/test-patterns.mdc in the target project.
4. Handle manage-dependencies companion
If manage-dependencies was selected as a companion, use the Q1 toolchain answer to install the matching rule and skill:
- If uv: read
$REPO_ROOT/skills/manage-dependencies/templates/uv-rule.mdanduv-skill.md - If poetry: read
$REPO_ROOT/skills/manage-dependencies/templates/poetry-rule.mdandpoetry-skill.md
Write the rule to .cursor/rules/dependency-management.mdc and the skill to $TARGET_DIR/manage-dependencies/SKILL.md (replacing the generic SKILL.md that was copied in step 2).
Remove the <!-- PRIVATE REGISTRY --> / <!-- /PRIVATE REGISTRY --> section from both files unless the project is known to use a private registry.
Runtime Behavior (After Installation)
When installed, this skill acts as a router for Python development tasks. If the user asks about Python development and a companion skill is relevant, direct them to it.
Companion Skills Catalog
| Skill | When to use | Trigger phrases |
|---|---|---|
| python-best-practices | Coding conventions, style questions, "how should I write this", anti-patterns | "Python conventions", "best practices", "code style", "how to handle errors" |
| write-pytest | Writing new tests, test structure, test patterns | "write tests", "add tests", "test this module" |
| manage-dependencies | Adding, removing, or updating packages | "add a package", "install dependency", "update packages" |
Routing rules
- If the user asks about coding style, conventions, or patterns → direct to
python-best-practices - If the user asks to write or modify tests → direct to
write-pytest - If the user asks to add, remove, or update a dependency → direct to
manage-dependencies - If the question spans multiple areas, answer directly using the conventions from
python-best-practicesand mention the relevant companion skill for follow-up
04 同仓库更多 Skills
write-pytest
Write pytest tests for any Python codebase. Use when the user asks to write tests, create tests, add tests, or test a module/service/endpoint/function. Framework-agnostic; routes to framework-specific helpers when signals are detected. Follows a research-then-discuss-then-write flow.
quality-assurance
Run quality assurance checks on the current chat session — pre-task validation, post-task checklist, and code review. Use when finishing a task, before committing, or when the user asks for a QA review.
python-best-practices
Comprehensive Python coding conventions and best practices. Use when the user asks about Python conventions, coding patterns, best practices, code style, anti-patterns, or "how should I write this" in Python.
pyramid-library
Library Developer persona: developing standalone Pyramid extensions (own repo, own package) that expose includeme for external consumers. Use when the user builds a reusable Pyramid library, designs includeme for consumers, registers custom directives/tweens/request methods, or tests a library with a proper app.
pyramid-developer
Pyramid framework conventions — configuration/registry, module system with includeme, pyramid_services, models, Cornice REST, ACL authorization, and transactions. Use when setting up Pyramid development conventions for a project.
pyramid-core
Pyramid framework features reference — request methods, custom directives, events, tweens, exception views, view predicates, view derivers, callbacks, renderers, and static views. Use when the user asks about any Pyramid framework extension point.