Command Palette

Search for a command to run...

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

Feature Flag Conventions

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

Edit Cargo features: ORT-free targets, aggregates, PDF backends and parity.

xberg-ioот xberg-io★ 9 642 звезды на GitHub

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

Feature-flag conventions

Shared concerns use the same flag name with the same semantics in every library. A consumer that learns otel or mcp once should get identical behavior across every library and its bindings. Repo-specific flags stay local — this contract governs only shared concerns.

Standard flags

Flag Meaning Default Notes
(none) tracing Structured tracing is always-on, never a feature. — tracing is a non-optional dependency. Do not gate span emission. Un-gate any legacy optional tracing feature.
otel Opt-in OpenTelemetry / OTLP export layer, on top of always-on tracing. off Pulls tracing-opentelemetry + the opentelemetry* stack. This is the only observability feature. Reconcile any always-on OTLP deps behind it.
mcp Embedded Model Context Protocol server (stdio transport). off
mcp-http MCP Streamable HTTP transport; implies mcp. off mcp-http = ["mcp", ...].
mimalloc Select the mimalloc global allocator. off Mutually exclusive with jemalloc; see the allocator rule below.
jemalloc Select the jemalloc global allocator. off Mutually exclusive with mimalloc.
cuda / metal / mkl / accelerate Device / BLAS acceleration backends where a crate exposes them. off Same names wherever acceleration is offered.

Rules

  • Names are the contract. Never invent a synonym for a shared concern (opentelemetry, observability, otlp for what is otel; model-context-protocol for mcp). Rename divergent flags to match.
  • Semantics travel with the name. otel must mean the OTLP export layer everywhere, not "enable tracing" (tracing is always-on) and not a metrics-only subset.
  • Always-on tracing, opt-in export. Do not force the opentelemetry dependency tree on library consumers — keep it behind otel so a plain dependency stays lean.
  • Implication edges are fixed: mcp-http ⇒ mcp; otel ⇒ (always-on) tracing.
  • Mutually-exclusive allocators carry a both-enabled compile_error! guard by default. Exception: a crate that must build with --all-features (a coverage gate, cargo doc --all-features) resolves by precedence instead, jemalloc winning via cfg(all(feature = "mimalloc", not(feature = "jemalloc"))), and states why in a ~keep comment at the #[global_allocator].
  • Adding a shared flag to a new library? Copy the name, default, and implication edges from this table rather than redefining them. Coordinate a change to this contract across all libraries before landing it — no repo diverges unilaterally.

Xberg features

All Xberg features are in crates/xberg/Cargo.toml.

ORT-Incompatible Targets (WASM, Android x86_64 emulator)

Only ORT-dependent paths are incompatible. The same paths block both WASM (no native ORT linkage at all) and the x86_64-linux-android emulator triple (no pyke prebuilt; aarch64-linux-android does ship a prebuilt and gets full ORT):

  • paddle-ocr — ONNX Runtime + native C++ deps: not WASM-safe; no Android x86_64 prebuilt
  • layout-detection — depends on ONNX Runtime layout models: not WASM-safe; no Android x86_64 prebuilt (RT-DETR + table classifier are available off-ORT via the layout-tract sibling, below)
  • embeddings — depends on ONNX Runtime sentence-transformer models: not WASM-safe; no Android x86_64 prebuilt
  • auto-rotate — depends on ONNX Runtime orientation classifier: not WASM-safe; no Android x86_64 prebuilt (available off-ORT via the auto-rotate-tract sibling, below)
  • formula-recognition — LaTeX recognition for layout formula regions (RapidLaTeXOCR ONNX): ORT-dependent, opt-in, excluded from full/formats

Pure-Rust type-only companion features expose the public config/result types for the above without pulling in ORT:

  • layout-types — LayoutDetectionConfig, TableModel, BBox, DetectionResult, LayoutClass, LayoutDetection, RecognizedTable. layout-detection implies layout-types.
  • auto-rotate-types — OrientationResult. auto-rotate implies auto-rotate-types.
  • embedding-presets — EmbeddingPreset (already existed; pure-Rust preset metadata).

Pure-Rust tract inference variants run select ONNX models where native ORT cannot link, loading the same .onnx artifacts through the tract engine (CPU-only, no native library):

  • layout-detection (ORT) → layout-tract (tract): RT-DETR layout detection + the PP-LCNet wired/wireless table classifier run on WASM and the Android x86_64 emulator. TATR, SLANeXT, PP-DocLayout-V3, and YOLO stay ONNX Runtime-only (tract 0.23.4 op-coverage gaps).
  • auto-rotate (ORT) → auto-rotate-tract (tract): PP-LCNet document-orientation on WASM and the Android x86_64 emulator.

WASM/Android-safe variants:

  • ocr (native) → ocr-wasm (uses tesseract-wasm + safe image deps) — Android keeps native ocr
  • excel (native) → excel-wasm (drops tokio-runtime) — Android
Полный SKILL.md на GitHub

Установить Feature Flag Conventions в Claude Code и Claude Desktop

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

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

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

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

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

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

Вложенные файлы

index.md

FAQ

Что делает скилл Feature Flag Conventions?

Edit Cargo features: ORT-free targets, aggregates, PDF backends and parity.

Как установить скилл Feature Flag Conventions?

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

Скилл Feature Flag Conventions запускает скрипты?

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

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

Сравнить Feature Flag Conventions с