Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计通过

build-cython-ext构建 cython ext

Agent Skill

build-cython-ext 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

848

周安装

35

GitHub Stars

93

下载量

277
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill build-cython-ext

简介

用于构建 Cython 扩展并解决 numpy 版本兼容性问题。

  • 适合处理 .pyx 文件编译、numpy 2.0+ 迁移及类型错误修复。
  • 通过分析项目结构调用编译命令,需确认构建环境和依赖版本。
  • 安装前请检查项目是否包含 Cython 和 numpy,避免误触发无关构建流程。
  • build-cython-ext 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Build Cython Extensions

This skill provides guidance for building Cython extensions and resolving compatibility issues, with particular focus on numpy version compatibility problems.

When to Use This Skill

  • Building or compiling Cython extensions (.pyx files)
  • Fixing numpy compatibility issues in Cython code
  • Migrating Cython projects to work with numpy 2.0+
  • Resolving deprecated numpy type errors (np.int, np.float, np.bool, etc.)
  • Troubleshooting Cython compilation failures

Key File Types to Examine

When working with Cython projects, always examine ALL relevant file types:

ExtensionDescriptionMust Check
.pyxCython implementation filesCritical - Often contain numpy calls
.pxdCython declaration filesYes - May contain type declarations
.pyPython filesYes - May use deprecated types
setup.pyBuild configurationYes - Defines compilation settings
.c / .cppGenerated C/C++ filesOnly if debugging compilation

Critical Pitfall: Never limit searches to only .py files when fixing numpy compatibility. The .pyx files are Cython source code and frequently contain the same deprecated numpy type references.

Approach for Numpy 2.0+ Compatibility

Deprecated Types to Replace

DeprecatedReplacement
np.intnp.int_ or int
np.floatnp.float64 or float
np.boolnp.bool_ or bool
np.complexnp.complex128 or complex
np.objectnp.object_ or object
np.strnp.str_ or str

Search Strategy

  1. Search without file type restrictions to capture all occurrences: Grep for patterns like "np\.int[^0-9_]" across all files
  2. Explicitly search Cython files: Search specifically in *.pyx and *.pxd files
  3. Check import statements in .pyx files - they often import numpy and use deprecated types

Fix and Recompile Workflow

  1. Identify all .pyx files in the project
  2. Search each file for deprecated numpy types
  3. Apply fixes to ALL files (both .py and .pyx)
  4. Recompile the Cython extensions after making changes to .pyx files
  5. Run verification tests

Verification Strategy

Import Testing Is Insufficient

Simply testing that a compiled module imports successfully does not verify the code works correctly. A module can import but fail when its functions are called.

Recommended Verification Steps

  1. Identify all Cython modules in the project
  2. For each module:

- Verify import succeeds - Call at least one core function from each module - Pass actual data to exercise numpy operations

  1. Run the project's test suite if available
  2. Create a verification script that exercises key functionality: # Example verification pattern import numpy as np from module import cython_function # Test with actual numpy arrays test_data = np.array([1, 2, 3], dtype=np.int64) result = cython_function(test_data) assert result is not None

Test Coverage Awareness

  • Repository tests may not cover all Cython code paths
  • Passing tests does not guarantee all Cython functionality works
  • Explicitly test functions that use numpy types

Common Pitfalls

  1. Narrow Search Scope: Using file type filters (e.g., type: "py") that exclude .pyx files
  2. Premature Success Declaration: Assuming success after imports work or basic tests pass
  3. Missing Recompilation: Forgetting to recompile after fixing .pyx files
  4. Incomplete Pattern Matching: Missing variations like numpy.int vs np.int
  5. Ignoring Warning Signs: If compilation succeeds "surprisingly" easily, verify the compiled code actually runs correctly

Systematic Workflow

  1. Discovery Phase

- List all .pyx, .pxd, and .py files - Identify the build system (setup.py, pyproject.toml, etc.) - Check numpy version requirements

  1. Analysis Phase

- Search ALL source files for deprecated patterns - Document every occurrence before fixing - Note which files need recompilation

  1. Fix Phase

- Apply fixes to all identified locations - Ensure consistency in replacement types - Update any type annotations or docstrings

  1. Build Phase

- Clean previous build artifacts - Recompile all Cython extensions - Watch for compilation warnings

  1. Verification Phase

- Test each Cython module individually - Run the full test suite - Execute functions with real numpy data - Verify no runtime AttributeError for numpy types

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

29.54%
按下载量换算82

Gemini CLI

24.96%
按下载量换算69

Antigravity

18.28%
按下载量换算51

windsurf

12.19%
按下载量换算34

OpenCode

8.33%
按下载量换算23

Codex

3.33%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills