用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/monocongo/climate_indices --skill climate-indices-conventions命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | climate-indices-conventions |
| description | Repository conventions for the climate_indices Python scientific-computing library. |
Generated from monocongo/climate_indices on 2026-08-08, then reviewed against this repository.
Use this skill when changing climate_indices, writing its tests or documentation,
or preparing commits.
climate_indices is a Python library with a src/ layout. Its production code
is the src/climate_indices/ package; tests are direct pytest modules in
tests/, with reference data in tests/fixture/.
The package uses responsibility-focused modules:
| Area | Modules |
|---|---|
| Command-line interfaces | __main__.py, __spi__.py |
| Public APIs | indices.py (NumPy), typed_public_api.py, xarray_adapter.py |
| Climate-index computation | compute.py, palmer.py |
| PET and statistics | eto.py, pm_eto.py, lmoments.py |
| Supporting services | cf_metadata_registry.py, exceptions.py, logging_config.py, performance.py, utils.py |
Keep changes within the established module boundary. Read
src/climate_indices/CONTEXT.md before using project domain terminology.
| Element | Convention |
|---|---|
| Modules and files | snake_case.py |
| Functions and variables | snake_case |
| Classes | PascalCase |
| Constants | SCREAMING_SNAKE_CASE |
| Tests | tests/test_<subject>.py |
Follow the existing package-qualified import style:
from climate_indices import compute
from climate_indices.exceptions import InvalidArgumentError
For an explicitly curated module API, use Python's __all__. Package-level
re-exports belong in src/climate_indices/__init__.py.
Public APIs must be typed and documented with Google-style docstrings. Use
structlog through climate_indices.logging_config; do not introduce stdlib
logging.
tests/ as test_*.py.tests/conftest.py and stable reference data in
tests/fixture/.A typical feature touches paths such as:
src/climate_indices/<module>.py
tests/test_<module>.py
tests/fixture/<reference-data> # when needed
docs/<document> # when public behavior changes
Use Conventional Commit messages. Common types are:
featfixdocstestrefactorchorecibuildstyleUse a scope when it adds useful context, for example:
feat: add rolling-window extreme Z-index sum with wet-side anomaly filter
fix(review): align integrity checks with repository standards
chore(deps): bump actions/checkout from 7.0.0 to 7.0.1
Keep the subject concise, descriptive, and focused on one coherent change.
For source or test changes, run:
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/
uv run pytest
For packaging, release, or workflow changes, also run:
uv run pytest tests/test_release_integrity.py
src/climate_indices/.tests/test_*.py coverage and fixtures as needed.