B4X Skill for Claude Code
A focused Agent Skill that helps Claude write, review, and explain idiomatic B4X code for B4A, B4J, and B4i.It gives Claude practical guidance for B4XPages, XUI, SQLite, JSON, resumable subs, platform-specific APIs, custom views, and .b4xlib libraries. Its main goal is to prevent common AI-generated mistakes such as mixing B4X with VB.NET or Java, using the wrong module scope, and combining incompatible B4A, B4J, and B4i APIs.
[!NOTE] B4R (Arduino and ESP boards) is intentionally outside the scope of this skill because it uses a different runtime, type system, and development model.
What this skill improves
- Correct B4X syntax, module types, and variable scope
- Modern B4XPages architecture for new UI projects
- Cross-platform UI code with XUI and B4XView
- Clear separation of B4A-, B4J-, and B4i-specific APIs
- Safe SQLite queries, file handling, and JSON processing
- Correct Sleep, Wait For, resumable-sub, and HttpJob patterns
- Practical checks for initialization, resource cleanup, and event signatures
- Review and modernization of older B4X code
Supported platforms
| Platform | Support | Main topics |
|---|---|---|
| B4A | Yes | Android, permissions, manifest, JavaObject |
| B4J | Yes | Desktop UI, JavaFX boundaries, headless servers, jServer |
| B4i | Yes | iOS UI, build and signing, ATS, NativeObject |
| Shared B4X | Yes | XUI, B4XPages, SQLite, JSON, I/O, networking |
| B4R | No | Intentionally out of scope |
Installation
Claude Code marketplace
Run these commands inside Claude Code:
Claude code:
/plugin marketplace add Jerryk133/b4x-skill
/plugin install b4x@b4x-marketplace
/reload-plugins
The plugin is then available across the installation scope you selected. Claude can activate the skill automatically when your request involves B4X.
Test locally without installing
Clone the repository and start Claude Code with the plugin directory:
PowerShell:
git clone https://github.com/Jerryk133/b4x-skill.git
claude --plugin-dir ./b4x-skill
This is useful when evaluating or developing the skill.
Install as a standalone Claude Code skill
Copy the skills/b4x directory to one of these locations:| Scope | Destination |
|---|---|
| Personal β all projects | ~/.claude/skills/b4x/ |
| Project β current repository | .claude/skills/b4x/ |
PowerShell:
PowerShell:
git clone https://github.com/Jerryk133/b4x-skill.git
New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null
Copy-Item -Recurse -Force ".\b4x-skill\skills\b4x" "$HOME\.claude\skills\b4x"
Bash:
Bash:
git clone https://github.com/Jerryk133/b4x-skill.git
mkdir -p ~/.claude/skills
cp -R ./b4x-skill/skills/b4x ~/.claude/skills/b4x
Start a new Claude Code session after copying the skill if it is not detected in the current session.
Usage
The installed plugin can be invoked explicitly as /b4x:b4x:
Claude code:
/b4x:b4x Review this B4A B4XPages code and fix any compile errors.
When installed as a standalone skill, invoke it as /b4x.
In normal use, explicit invocation is optional. Ask Claude naturally:
Claude code:
Create a B4XPages settings page shared by B4A and B4J.
Explain why Process_Globals does not compile in my B4XMainPage class.
Refactor this SQLite query to use ExecQuery2 and close the ResultSet safely.
Convert this B4A-only view code to cross-platform XUI code.
For the most useful result, include:
- the target platform or platforms;
- the module type, such as B4XMainPage, class, code module, or service;
- the relevant libraries;
- the complete compiler error and affected code when debugging.
Knowledge included
The skill uses progressive disclosure: SKILL.md contains the routing rules and essential checks, while detailed guidance is loaded only for the topic being handled.| Reference | Coverage |
|---|---|
| language-and-modules.md | Syntax, types, scope, modules, collections |
| b4xpages-and-xui.md | B4XPages, XUI, Designer, views, canvas, bitmap, fonts |
| data-and-io.md | SQLite, ResultSet, transactions, files, JSON |
| async-network.md | Sleep, Wait For, resumable subs, timers, HttpJob |
| custom-views-and-libraries.md | XUI custom views and .b4xlib packaging |
| platform-b4a.md | Android manifest, permissions, JavaObject |
| platform-b4j.md | Desktop, JavaFX, servers, handlers, packaging |
| platform-b4i.md | iOS build, signing, ATS, NativeObject |
| common-mistakes.md | Frequent AI and migration errors |
| compatibility.md | Version-sensitive B4X features and verification notes |
Repository structure
b4x-skill/βββ .claude-plugin/
β βββ marketplace.json
β βββ plugin.json
βββ skills/
β βββ b4x/
β βββ SKILL.md
β βββ references/
β βββ async-network.md
β βββ b4xpages-and-xui.md
β βββ common-mistakes.md
β βββ compatibility.md
β βββ custom-views-and-libraries.md
β βββ data-and-io.md
β βββ language-and-modules.md
β βββ platform-b4a.md
β βββ platform-b4i.md
β βββ platform-b4j.md
βββ LICENSE
βββ README.md
Limitations
- This is a knowledge skill, not a B4X compiler, IDE extension, or language server.
- It does not install B4X, platform SDKs, libraries, or build tools.
- Code still needs to be compiled and tested in the appropriate B4X IDE.
- B4X and mobile-platform requirements evolve. Claims involving the latest IDE, Android SDK, iOS, or store policies should be verified against current official documentation.
- Some third-party B4X library APIs vary by version. Include the library name and version when asking about them.
Development and validation
Load the repository directly while making changes:claude --plugin-dir ./b4x-skill
Validate the plugin, marketplace catalog, and skill metadata from Claude Code:
/plugin validate .
After editing plugin files, run:
/reload-plugins
When publishing a new release, update the version in .claude-plugin/plugin.json.
References and credits
- B4X official website
- B4X documentation
- B4X Programming Forum
- Claude Code plugins
- Claude Code plugin marketplaces
- Agent Skills specification
B4X, B4A, B4J, B4i, and B4R are products of Anywhere Software.