Feature Flag Conventions
БесплатноБез исполняемых скриптовНе проверенEdit Cargo features: ORT-free targets, aggregates, PDF backends and parity.
от 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,otlpfor what isotel;model-context-protocolformcp). Rename divergent flags to match. - Semantics travel with the name.
otelmust 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
opentelemetrydependency tree on library consumers — keep it behindotelso 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,jemallocwinning viacfg(all(feature = "mimalloc", not(feature = "jemalloc"))), and states why in a~keepcomment 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 prebuiltlayout-detection— depends on ONNX Runtime layout models: not WASM-safe; no Android x86_64 prebuilt (RT-DETR + table classifier are available off-ORT via thelayout-tractsibling, below)embeddings— depends on ONNX Runtime sentence-transformer models: not WASM-safe; no Android x86_64 prebuiltauto-rotate— depends on ONNX Runtime orientation classifier: not WASM-safe; no Android x86_64 prebuilt (available off-ORT via theauto-rotate-tractsibling, below)formula-recognition— LaTeX recognition for layout formula regions (RapidLaTeXOCR ONNX): ORT-dependent, opt-in, excluded fromfull/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-detectionimplieslayout-types.auto-rotate-types—OrientationResult.auto-rotateimpliesauto-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(usestesseract-wasm+ safe image deps) — Android keeps nativeocrexcel(native) →excel-wasm(dropstokio-runtime) — Android
Установить Feature Flag Conventions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic