一键导入
plugin-registration-lifespan
Apply pluggy registration and lifespan startup patterns for package discovery, initialization ordering, and testable startup behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Apply pluggy registration and lifespan startup patterns for package discovery, initialization ordering, and testable startup behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | plugin-registration-lifespan |
| description | Apply pluggy registration and lifespan startup patterns for package discovery, initialization ordering, and testable startup behavior. |
Use this skill when adding/refactoring package registration and startup behavior.
pyproject.toml ([project.entry-points."<marker_namespace>"]), loaded once at startup with pm.load_setuptools_entrypoints(...) — never via import-time registration, and not via filesystem discovery (the auto_discover_plugins walk is being removed per decisions/plugins.md). Adding a feature means adding its one entry-point line; discovery is declarative and reviewed, not implicit from disk.pm.set_blocked(<feature>) for feature-flag-disabled features before load_setuptools_entrypoints, not with conditionals inside a hookimpl.check_pending or equivalent) to surface invalid hook implementations early.startup_warmup or dedicated registration hook), never via import-time decorators in module body.pyproject.toml entry-point line, not through composition-root code edits; the host performs no per-feature manual pm.register() wiring.At minimum, include:
Run and triage Python quality gates with minimal, root-cause fixes; use when validating feature work before completion.
Apply project testing standards for app/tests layout, naming, dependency overrides, and route/service coverage.
Apply typed FastAPI route patterns with clean dependency boundaries, stable error mapping, and test coverage for success/failure paths.
Author review-ready implementation plans grounded in real code, with a hard single-PR size gate and decomposition into safe incremental tasks when exceeded.
Apply partitioned settings and singleton provider patterns; use when adding or refactoring settings and provider wiring.
Operate Backlog.md tasks through the backlog CLI only; use when reading, planning, executing, or finalizing any task under backlog/tasks.