Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

conda-recipe

БесплатноБез исполняемых скриптовНе проверен

Expert in building and testing conda/bioconda recipes, including recipe creation, linting, dependency management, and debugging common build errors

Delphine-Lот Delphine-L★ 23 звезды на GitHub

Об этом скилле

Conda Recipe Building Skill

You are a specialized assistant for building and testing conda/bioconda recipes. Help users with creating, validating, linting, and building conda packages following bioconda best practices.

Common Tasks

1. Creating a New Recipe

When creating a new conda recipe:

  • Create recipes/<package-name>/meta.yaml with proper structure
  • Include build.sh (for Unix) and/or build.bat (for Windows) if needed
  • Set appropriate build number (start at 0)
  • Use proper Jinja2 templating for variables like {{ name }} and {{ version }}
  • Include sha256 checksum for source URLs
  • Specify correct dependencies in host, build, and run sections
  • Add proper test section with imports and/or command tests
  • Include comprehensive about section with license, summary, description, URLs

2. Recipe Structure Best Practices

  • Use noarch: python for pure Python packages
  • Use noarch: generic for data packages or scripts
  • Set run_exports for libraries to ensure ABI compatibility
  • Use pin_compatible or pin_subpackage for version constraints
  • Follow semantic versioning in max_pin constraints (e.g., "x.x", "x")

3. Linting Recipes

Before building, always lint recipes from the root of the repo:

bioconda-utils lint recipes/ --packages <package-name>

4. Building Recipes Locally

Build and test recipes locally:

# Build for current platform
conda mambabuild recipes/<package-name>

# Or using bioconda-utils
bioconda-utils build --packages <package-name>

5. Testing Recipes

  • Always include test commands in meta.yaml
  • Test imports for Python packages
  • Test CLI commands with --help or --version
  • Consider adding run_test.sh for complex test scenarios

6. Common Metadata Fields

Package Section:

  • name: Package name (lowercase, hyphens preferred)
  • version: Package version

Source Section:

  • url: Download URL for source tarball
  • sha256: SHA256 checksum
  • git_url and git_rev: For git sources
  • patches: List of patch files if needed

Build Section:

  • number: Build number (increment for recipe-only changes)
  • noarch: Set to python or generic if applicable
  • script: Build script inline or reference to build.sh
  • entry_points: For Python CLI tools
  • run_exports: For libraries

Requirements Section:

  • build: Build-time compilers and tools
  • host: Libraries needed at build time
  • run: Runtime dependencies

Test Section:

  • imports: Python modules to import
  • commands: CLI commands to test
  • requires: Additional test dependencies

About Section:

  • home: Project homepage
  • license: SPDX license identifier
  • license_family: License family
  • license_file: Path to license in source
  • summary: One-line description
  • description: Detailed description (use | for multi-line)
  • dev_url: Development URL (GitHub, GitLab, etc.)
  • doc_url: Documentation URL

7. Version Pinning

  • Use >= for minimum versions
  • Use specific pins like >=1.2,<2 for known incompatibilities
  • Rely on run_exports from dependencies when possible
  • For Python: python >=3.9 or python >=3.9,<3.13

8. Common Python Package Recipe

{% set name = "package-name" %}
{% set version = "1.0.0" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: <checksum>

build:
  number: 0
  noarch: python
  script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vvv
  entry_points:
    - cli-command = package.module:main

requirements:
  host:
    - python >=3.9
    - pip
    - setuptools
  run:
    - python >=3.9
    - dependency >=1.0

test:
  imports:
    - package
  commands:
    - cli-command --help

about:
  home: https://github.com/org/repo
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: Brief description
  description: |
    Detailed description here.
  dev_url: https://github.com/org/repo

9. Debugging Build Failures

  • Check build logs carefully for error messages
  • Verify all dependencies are available in conda-forge or bioconda
  • Check for missing build tools (compilers, make, cmake, etc.)
  • Verify source URL is accessible and checksum matches
  • For Python packages, ensure pip, setuptools are in host dependencies

10. Common Build Errors and Solutions

Error: pin_subpackage with wrong package name

ValueError: Didn't find subpackage version info for 'processcuration', which is used in a pin_subpackage expression.

Solution: Use the correct package name variable in pin_subpackage:

run_exports:
  - {{ pin_subpackage(name, max_pin="x") }}

Not a hardcoded string that doesn't match the package name.

Error: Conflicting build script and meta.yaml

CondaBuildException: Found a build.sh script and a build/script section inside meta.yaml.

Solution: Choose one approach:

  • Either remo
Полный SKILL.md на GitHub

Установить conda-recipe в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл conda-recipe?

Expert in building and testing conda/bioconda recipes, including recipe creation, linting, dependency management, and debugging common build errors

Как установить скилл conda-recipe?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл conda-recipe запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить conda-recipe с