alef-generated-bindings
Alef-managed generated bindings in packages/* and binding crates — the regeneration workflow (task alef:generate / alef:verify), the alef.toml section layout…
Skill by xberg-io
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/xberg-io-alef-generated-bindings
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/alef-generated-bindings
What's inside
- Skill name
alef-generated-bindings- Description
- Alef-managed generated bindings in packages/* and binding crates — the regeneration workflow (task alef:generate / alef:verify), the alef.toml section layout, the core-side edits that break a regen, and the FFI bridge's JSON marshalling requirement. Load before editing anything under packages/* or a binding crate, before adding a trait method or extractor, or when regenerating or verifying Alef output.
- License
- MIT
- Instructions
- 88 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: missing
Files (2)
- SKILL.md
- index.md
SKILL.md (first lines)
# Alef-Generated Bindings Xberg specifics on top of the shared Alef workflow skill (generic regenerate/verify/commit loop). - Check `alef.toml` before touching anything in `packages/*/` or a binding crate. - `task alef:generate` runs `alef all --clean` and formats via poly; there is no `task alef:format`. - `task alef:verify` runs `alef verify --exit-code`. - The `alef:*` namespace is exactly: `generate`, `verify`, `build`, `sync`, `docs`, `verify:readme-paths`, `verify:ffi-formats`, `verify:fields`. ## Freshness check `task alef:verify`. A hand-rolled `git diff` over `packages/` is under-scoped — generated output also lands in `crates/xberg-py/`, `crates/xberg-php/`, `crates/xberg-jni/`, `crates/xberg-node/`, `crates/xberg-wasm/`, `crates/xberg-ffi/`, `packages/dart/rust/`, `packages/swift/rust/`, and `e2e/`. Each generated file carries an `// alef:hash:` header that `alef verify` recomputes; `.alef/` (`sources_hash.cache`, `hashes/`) is a gitignored local cache, empty in a new worktree. Neither makes a generated file safe to hand-fix — a regen restores it. Fix `alef.toml` or the Rust source, then regenerate and re-verify. ## Key `alef.toml` sections - `[workspace]`, `[workspace.sync]` (version-sync `extra_paths`), `[workspace.docs]`, `[workspace.poly]`, `[workspace.generate]` - `[[crates]]` — the Rust source crate parsed for type/function extraction, plus `[[crates.source_crates]]` - `[crates.<lang>]` — one table per binding: `python`, `node`, `ruby`, `php`, `elixir`, `wasm`, `ffi`, `go`, `java`, `dart`, `kotlin_android`, `jni`, `swift`, `csharp`, `zig` (each carrying `exclude_functions`, `target_dep_overrides`, stubs, …) - `[crates.e2e]` — e2e generation (`output = "e2e"`, `[crates.e2e.call.overrides.<lang>]`) - `[crates.readme]` — README generation (`template_dir = "templates/readme"`, `[crates.readme.languages.<lang>]`) - `[crates.exclude]`, `[crates.output]`, `[crates.custom_modules]`, `[crates.publish]` There are no `[crate]`, `[languages.*]`, `[e2e]` or `[readme]` top-level tables, and `alef.toml` declares **no rename mappings** — the generated Go trait type is `DocumentExtractor`, unchanged. Besides the canonical e2e tasks, this repo has `e2e:verify`, `e2e:lint`, `e2e:quick`, `e2e:lang`. ## Core-side edits that break a regen - **New extractor struct** — needs `#[cfg_attr(alef, alef(skip))]` on the struct declaration, not the impl block. Without it the regen aborts globally and nothing regenerates, leaving the tree silently stale. Check this first when a regen dies. (Most modules in `crates/xberg/src/extractors/` carry the attribute.) - **Binding-facing types must not be `#[non_exhaustive]`** — alef generates `impl From<Mirror> for xberg::TheType` with a struct literal in ~10 binding crates, and `#[non_exhaustive]` forbids that (`E0639`). Derive `Default` for forward-compat instead. Keep `#[non_exhaustive]` only on types listed in `[crates.exclude]`. - **A new enum variant on a binding-facing type** breaks exhaustive matches across the generated binding crates. ## Trait return types crossing the generated FFI bridge The generated `XbergOcrBackendBridge` in `crates/xberg-ffi/src/lib.rs` marshals **every** trait method's return value through JSON (218 `serde_json::from_str::<xberg::…>` call sites today) and falls back to `Default::default()` on an uninitialised vtable slot, a failing host callback, or a null result. Whether a variant carries a payload is irrelevant. Adding a method to a trait with a generated bridge means its return type needs `Default + Serialize + Deserialize`. Unit-only enums included. `crates/xberg-ffi` is linted in CI only by `cargo clippy --workspace` at default features. Verify a change to it with the scoped `cargo check -p xberg-ffi`. That check rewrites `crates/xberg-ffi/include/xberg.h` and `packages/go/include/xberg.h` to match whatever feature set you invoked it with, which is usually not the committed one. Revert that churn rather than committing it. ## Which alef answered `task alef:generate` runs whatever `alef` is first on `PATH`, not a `cargo run` against a sibling checkout; check `alef --version` against `alef.toml` `alef_version` before regenerating. A source fix in a sibling checkout has zero effect until it is installed. Generator fixes ship in order: land upstream → release alef → bump the pinned version → regen. Regenerating against a locally modified alef produces a tree the pinned version cannot reproduce.
From xberg-io/xberg, MIT.
More from xberg-io/xberg
- 0.769score
xberg-extracting-keywords
xberg-io
Use when extracting keywords (YAKE/RAKE) from documents — and, secondarily, when detecting document language or generating embeddings for RAG and search.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-extracting-with-ocr
xberg-io
Use when extracting text from scanned PDFs, photographed pages, or images that have no embedded text layer.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg
xberg-io
Extract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-chunking
xberg-io
Use when splitting extracted text into chunks for LLM context windows or RAG ingestion.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-extracting-tables
xberg-io
Use when extracting tabular data from PDFs, spreadsheets, or images.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
crate-structure
xberg-io
The Xberg workspace layout — the version source of truth (root Cargo.toml [workspace.package] version), the 19 workspace members and 3 excluded crates, the…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
wasm-constraints
xberg-io
WASM build constraints for the crates/xberg-wasm crate — the wasm-target feature set, no-tokio sync-only internal APIs, the crate-private SyncExtractor trait…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
feature-flag-policy
xberg-io
Cargo feature flags for crates/xberg — ORT-incompatible targets (WASM, Android x86_64 emulator), type-only and tract inference companion features…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
mime-detection-routing
xberg-io
MIME type detection and extractor routing in core/mime.rs — the FORMATS registry that EXT_TO_MIME and SUPPORTED_MIME_TYPES are derived from, the path-based…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-batch-extraction
xberg-io
Use when extracting from many files at once with shared config, bounded parallelism, per-file overrides, and error recovery.
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
config-loading-precedence
xberg-io
How Xberg resolves configuration — CLI-mode and server/MCP-mode precedence orders, project config walk-up, user config fallback, field-level inline JSON merge…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg-picking-a-format
xberg-io
Use when choosing an output format for extracted documents — plain text, markdown, djot, HTML, JSON, or DocTags.
SkillAFreshness: A★ 9.4KClaude Code +9
Signals
- Stars
- 9,441
- Forks
- 600
- Open issues
- 7
- Last commit (this folder)
- Oct 10, 2026 (17 days ago)
- Last release
- Oct 13, 2026 (14 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/xberg-io/xberg
- Website
- docs.xberg.io
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from xberg-io
- 0.769score
feature-flag-policy
xberg-io
Cargo feature flags for crates/xberg — ORT-incompatible targets (WASM, Android x86_64 emulator), type-only and tract inference companion features…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
mime-detection-routing
xberg-io
MIME type detection and extractor routing in core/mime.rs — the FORMATS registry that EXT_TO_MIME and SUPPORTED_MIME_TYPES are derived from, the path-based…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
config-loading-precedence
xberg-io
How Xberg resolves configuration — CLI-mode and server/MCP-mode precedence orders, project config walk-up, user config fallback, field-level inline JSON merge…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
crate-structure
xberg-io
The Xberg workspace layout — the version source of truth (root Cargo.toml [workspace.package] version), the 19 workspace members and 3 excluded crates, the…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
wasm-constraints
xberg-io
WASM build constraints for the crates/xberg-wasm crate — the wasm-target feature set, no-tokio sync-only internal APIs, the crate-private SyncExtractor trait…
SkillAFreshness: A★ 9.4KClaude Code +9 - 0.769score
xberg
xberg-io
Extract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg.
SkillAFreshness: A★ 9.4KClaude Code +9
Cite this page
alef-generated-bindings skill. Agent Mart. https://agentmart.dev/skills/xberg-io-alef-generated-bindings (last updated 2026-10-24)