用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill add-type命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | add_type |
| description | gwexpyに新しい配列型(Array/Series/Field)とコレクションを実装する |
This skill guides the implementation of new array/field types in gwexpy, ensuring consistency with the existing class hierarchy, metadata management, and documentation standards.
gwexpy.types.Array, Array2D, or similar._axis0_name, _unit).gwexpy/types/yourtype.py.class YourType(BaseArray):
_metadata_slots = BaseArray._metadata_slots + ("_new_slot",)
__new__:
super().__new__.__array_finalize__:
obj is None (explicit new), obj is subclass (view casting), obj is different type (copy/slice).obj to self.Field4D 等の多次元クラスでは、インデックス操作 (__getitem__) 時に次元を落とさないことが推奨されます。整数インデックス i を slice(i, i+1) に変換して処理することで、軸の数とメタデータ(軸名称や単位)を一貫して維持できます。詳細は manage_field_metadata スキルを参照してください。gwexpy/types/yourtype_collections.py (or inside the same file if small).list. Add batch methods (e.g., process_all).dict. Add batch methods.gwexpy/types/__init__.py.docs/reference/en/YourType.md and docs/reference/ja/YourType.md.docs/reference/{en,ja}/index.rst.tests/types/test_yourtype.py.astropy.units.Quantity. Ensure unit handling works.AxisApiMixin or look at Array3D/Array4D for how to sync separate axis properties with the array shape.