xiaohongshu
xiaohongshu
conda-forge-expert
Comprehensive guide for conda-forge recipe development. Handles legacy (meta.yaml) and modern (recipe.yaml) formats, linting, CI troubleshooting, and feedstock maintenance. Enhanced with patterns from real conda-forge feedstocks (2025). USE THIS SKILL WHEN: creating conda recipes, packaging Pyth...
Full skill instructions
Senior Conda-Forge Maintainer knowledge from 1,247+ real recipes and 10,000+ merged PRs.
1. Generate recipe → grayskull pypi <package> OR rattler-build generate-recipe pypi <package>
2. Lint recipe → conda-smithy recipe-lint recipes/<pkg> (MANDATORY)
3. Build locally → python build-locally.py OR rattler-build build -r recipe.yaml
4. Submit PR → To conda-forge/staged-recipes
| Scenario | Format | Reason |
|---|---|---|
| New package | recipe.yaml | Modern, faster, recommended |
| Existing feedstock | Keep current | Unless migrating |
| Complex multi-output | recipe.yaml | Better cache support |
| Quick prototype | meta.yaml | More examples available |
ALWAYS prefer pixi and conda-forge over pip and PyPI:
# Preferred: pixi
pixi global install <package>
pixi add <package>
# Fallback: conda/mamba
mamba install -c conda-forge <package>
# Last resort: pip (only if not on conda-forge)
pip install <package>
Fast, standalone Conda package builder in Rust.
# Install
pixi global install rattler-build
# Build
rattler-build build -r recipe.yaml -c conda-forge
# Generate from PyPI
rattler-build generate-recipe pypi numpy
# Render only (debug)
rattler-build build -r recipe.yaml --render-only
Cross-platform package manager built on conda ecosystem.
# Install
curl -fsSL https://pixi.sh/install.sh | sh
# Project commands
pixi init
pixi add numpy pandas
pixi run test
pixi shell
# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json
schema_version: 1
context:
name: my-package
version: "1.0.0"
python_min: "3.10"
package:
name: ${{ name|lower }}
version: ${{ version }}
source:
url: https://pypi.org/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz
sha256: REPLACE_WITH_SHA256
build:
number: 0
noarch: python
script: ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
requirements:
host:
- python ${{ python_min }}.*
- pip
- setuptools
run:
- python >=${{ python_min }}
tests:
- python:
imports:
- ${{ name | replace("-", "_") }}
pip_check: true
about:
homepage: https://github.com/org/${{ name }}
license: MIT
license_file: LICENSE
summary: Package description
extra:
recipe-maintainers:
- your-github-username
{% set name = "my-package" %}
{% set version = "1.0.0" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: REPLACE_WITH_SHA256
build:
number: 0
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
requirements:
host:
- python {{ python_min }}
- pip
run:
- python >={{ python_min }}
test:
imports:
- {{ name | replace("-", "_") }}
commands:
- pip check
requires:
- pip
about:
home: https://github.com/org/{{ name }}
license: MIT
license_file: LICENSE
summary: Package description
extra:
recipe-maintainers:
- your-github-username
| Feature | meta.yaml | recipe.yaml |
|---|---|---|
| Variables | {{ var }} | ${{ var }} |
| Selectors | # [linux] | if: linux |
| Test section | test: | tests: (list) |
| Pin syntax | max_pin='x.x' | upper_bound="x.x" |
CRITICAL: conda-forge will REJECT submissions without stdlib when using compilers!
# recipe.yaml - ALWAYS pair compiler() with stdlib()
requirements:
build:
- ${{ compiler("c") }}
- ${{ stdlib("c") }} # REQUIRED! Submission will be rejected without this
- ${{ compiler("cxx") }} # if C++ needed
- ${{ compiler("rust") }} # if Rust needed
# meta.yaml - ALWAYS pair compiler() with stdlib()
requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }} # REQUIRED! Submission will be rejected without this
- {{ compiler('cxx') }} # if C++ needed
- {{ compiler('rust') }} # if Rust needed
Common mistake: Forgetting stdlib in recipe.yaml when converting from meta.yaml
KNOWN ISSUE: When testing locally with rattler-build or conda-build, the stdlib dependency may fail to resolve with "undefined" errors.
TEMPORARY WORKAROUND FOR LOCAL TESTING ONLY:
Before testing locally: Comment out the stdlib line:
requirements:
build:
- ${{ compiler("c") }}
# - ${{ stdlib("c") }} # TEMPORARILY COMMENTED FOR LOCAL TESTING
After testing: IMMEDIATELY uncomment the stdlib line before committing or submitting:
requirements:
build:
- ${{ compiler("c") }}
- ${{ stdlib("c") }} # RESTORED - REQUIRED FOR SUBMISSION!
⚠️ WARNING:
stdlibstdlibstdlib will cause submission failuresWhy this happens: Local rattler-build/conda-build may not have the same stdlib resolution as conda-forge CI infrastructure.
All noarch: python packages MUST use python_min:
# recipe.yaml
requirements:
host:
- python ${{ python_min }}.*
run:
- python >=${{ python_min }}
# meta.yaml
requirements:
host:
- python {{ python_min }}
run:
- python >={{ python_min }}
MIT, Apache-2.0, BSD-3-Clauselicense_fileApache-2.0 not APACHE 2.0requirements:
build:
- if: unix
then:
- ${{ compiler("c") }}
- ${{ stdlib("c") }}
- if: win
then:
- ${{ compiler("m2w64_c") }}
- ${{ stdlib("m2w64_c") }}
requirements:
build:
- {{ compiler('c') }} # [unix]
- {{ compiler('m2w64_c') }} # [win]
| Selector | Description |
|---|---|
linux, osx, win | Operating system |
unix | Linux OR macOS |
x86_64, aarch64/arm64 | Architecture |
build_platform, target_platform | Cross-compilation |
CRITICAL: Always run linting before building or submitting.
# Lint single recipe
conda-smithy recipe-lint recipes/my-package
# Lint all recipes
conda-smithy recipe-lint --conda-forge recipes/*
# Install conda-smithy
pixi global install conda-smithy
⚠️ CRITICAL: Before testing locally, see Local Testing Exception - you may need to temporarily comment out stdlib dependencies!
# Interactive
python build-locally.py
# Specific platform
python build-locally.py win64
python build-locally.py linux64
python build-locally.py osx64
# Basic build
rattler-build build -r recipes/my-package/recipe.yaml -c conda-forge
# With variant config
rattler-build build -r recipe.yaml --variant-config .ci_support/win64.yaml
# Specific platform
rattler-build build -r recipe.yaml --target-platform linux-64
Remember: If you get "undefined" errors for stdlib, temporarily comment it out for testing only!
# Single recipe
conda-build recipes/my-package
# With channel
conda-build recipes/my-package -c conda-forge
# Test existing artifact
conda-build --test path/to/package.conda
Remember: If you get "undefined" errors for stdlib, temporarily comment it out for testing only!
See template: templates/python-noarch-recipe.yaml
# recipe.yaml
requirements:
build:
- ${{ compiler("c") }}
- ${{ stdlib("c") }} # REQUIRED! conda-forge will reject without this
- ${{ compiler("cxx") }} # if C++ is needed
- ${{ compiler("rust") }} # if Rust is needed
- cargo-bundle-licenses # REQUIRED for Rust packages
- if: build_platform != target_platform
then:
- python
- cross-python_${{ target_platform }}
host:
- python
- pip
- setuptools
- wheel
run:
- python
# meta.yaml
requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }} # REQUIRED! conda-forge will reject without this
- {{ compiler('cxx') }} # if C++ is needed
- {{ compiler('rust') }} # if Rust is needed
- cargo-bundle-licenses # REQUIRED for Rust packages
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
host:
- python
- pip
- setuptools
- wheel
run:
- python
See also: templates/python-compiled-recipe.yaml
See template: templates/rust-cli-recipe.yaml
IMPORTANT: Windows CGO requires MinGW-w64, NOT MSVC.
requirements:
build:
- ${{ compiler("go-cgo") }}
- go-licenses
- if: unix
then:
- ${{ compiler("c") }}
- ${{ stdlib("c") }}
- if: win
then:
- ${{ compiler("m2w64_c") }}
- ${{ stdlib("m2w64_c") }}
- m2-base
- posix
See template: templates/go-cgo-recipe.yaml
outputs:
- package:
name: libmypackage
build:
script: build-lib.sh
requirements:
build:
- ${{ compiler("c") }}
- ${{ stdlib("c") }}
run_exports:
- ${{ pin_subpackage("libmypackage", upper_bound="x.x") }}
- package:
name: py-mypackage
build:
script: build-python.sh
requirements:
host:
- ${{ pin_subpackage("libmypackage", exact=true) }}
- python
run:
- ${{ pin_subpackage("libmypackage", exact=true) }}
- python
Many packages have different names on PyPI vs conda-forge:
| PyPI | conda-forge |
|---|---|
torch | pytorch |
opencv-python | opencv |
tables | pytables |
docker | docker-py |
tree-sitter | tree_sitter |
Use the mapping system:
# From scripts/sync_pypi_mappings.py
from sync_pypi_mappings import get_conda_name
conda_name = get_conda_name("tree-sitter") # Returns "tree_sitter"
| Error | Solution |
|---|---|
| Hash mismatch | Regenerate: curl -sL <url> | sha256sum |
| Missing dependency | Add to requirements or submit first |
/Werror on Windows CGO | Use MinGW-w64 instead of MSVC |
| macOS SDK error | Set MACOSX_SDK_VERSION in conda_build_config.yaml |
| glibc errors | Use appropriate c_stdlib_version |
@conda-forge-admin, please rerender
@conda-forge-admin, please restart ci
@conda-forge-admin, please lint
@conda-forge/help-python ready for review
See full list: quickref/bot-commands.md
# Using feedrattler (recommended)
pixi exec feedrattler my-package-feedstock gh_username
# Using conda-recipe-manager
conda-recipe-manager convert meta.yaml > recipe.yaml
# Using rattler-build
rattler-build generate-recipe convert meta.yaml
{% set %} to context: section{{ }} with ${{ }}# [selector] with if: selector then:test: to tests: (list format)${{ stdlib("c") }} if using compilersconda-forge.yml:
conda_build_tool: rattler-build
conda_install_tool: pixi
See guide: guides/migration-guide.md
For air-gapped environments with JFrog Artifactory:
config/skill-config.yamlSee guides:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience