phenobarbital/antigravity-config/cython-extensions
Claude Code and agent skill by phenobarbital/antigravity-config
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Guidance for building and installing Cython extension packages, particularly when resolving compatibility issues with modern Python and NumPy versions. This skill applies when installing legacy Cython packages, fixing NumPy 2.0 deprecation errors, resolving Python 3.x compatibility issues in extension modules, or troubleshooting Cython compilation failures. Use this skill for tasks involving setup.py with Cython extensions, deprecated NumPy type errors, or installing packages to system Python environments.
Install
npx vskill@latest install phenobarbital/antigravity-config/cython-extensionsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Building Cython Extension Packages
This skill provides systematic approaches for building Cython extension packages, with emphasis on resolving compatibility issues that arise with modern Python and NumPy versions.
When to Use This Skill
- Installing legacy Cython packages that have not been updated for NumPy 2.0 or Python 3.x
- Encountering compilation errors related to deprecated NumPy types
- Building packages with
.pyxCython source files - Installing extension packages to system or global Python environments
- Troubleshooting
setup.pybuild failures for Cython projects
Recommended Approach
Phase 1: Pre-Build Analysis (Before Attempting to Build)
Conduct a comprehensive inventory of potential compatibility issues BEFORE attempting to build. This proactive approach prevents the inefficient cycle of build-fail-fix-rebuild.
1. Identify All Deprecated NumPy Types
Search for ALL known NumPy 2.0 deprecated type aliases simultaneously:
2. Check for Python 3.x Compatibility Issues
3. Examine Cython Files Specifically
Cython .pyx files may contain C-level type declarations that need updating:
Phase 2: Systematic Fixes
Apply fixes comprehensively before building, not reactively after each error.
NumPy Type Replacements:
| Deprecated | Replacement | |
|---|---|---|
np.float | np.float64 or float | |
np.int | np.int64 or int | |
np.complex | np.complex128 or complex | |
np.bool | np.bool_ or bool | |
np.object | np.object_ or object | |
np.str | np.str_ or str |
Type Checking Considerations:
When replacing isinstance() checks, consider all relevant subtypes:
Python 3.x Fixes:
Phase 3: Build and Install
Installation Types:
Understand the difference between installation methods:
pip install .- Proper installation, copies package to site-packagespip install -e .- Editable/development install, links to source directory
When the task specifies "install to system/global Python environment," use pip install . (without -e).
Clean Build Process:
Phase 4: Verification
1. Verify Installation Location
2. Test All Extension Modules
Run tests that specifically exercise Cython-compiled code paths:
3. Import Verification
4. Clean Rebuild Verification
After all fixes, perform a clean rebuild to ensure no stale artifacts:
Common Pitfalls
- Reactive vs. Proactive Fixing: Do not fix errors one-by-one as they appear. Search comprehensively first.
- Ignoring Cython Files: The
.pyxsource files often contain the same deprecated types as.pyfiles. Always check both.
- Incomplete Type Coverage: When fixing
isinstance()checks for complex numbers, account for all NumPy complex types (complex64,complex128) not justcomplex128.
- Editable Install When Global Is Required: Using
pip install -e .when the task requires a proper global installation leaves the package tied to the source directory.
- Stale Build Artifacts: Failing to clean build directories before rebuilding can cause compiled extensions to use old code.
- Missing Extension Tests: Verifying only Python code tests while leaving Cython extension tests unrun.
Reference Materials
For a comprehensive list of NumPy 2.0 migration changes, see references/numpy2_migration.md.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbackend/.agent/skills/cython-extensions/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/phenobarbital/antigravity-config/cython-extensions)