B4X Skill for Claude Code

Jerryk

Active Member
Licensed User
Longtime User

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​

PlatformSupportMain topics
B4AYesAndroid, permissions, manifest, JavaObject
B4JYesDesktop UI, JavaFX boundaries, headless servers, jServer
B4iYesiOS UI, build and signing, ATS, NativeObject
Shared B4XYesXUI, B4XPages, SQLite, JSON, I/O, networking
B4RNoIntentionally 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:

ScopeDestination
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.

ReferenceCoverage
language-and-modules.mdSyntax, types, scope, modules, collections
b4xpages-and-xui.mdB4XPages, XUI, Designer, views, canvas, bitmap, fonts
data-and-io.mdSQLite, ResultSet, transactions, files, JSON
async-network.mdSleep, Wait For, resumable subs, timers, HttpJob
custom-views-and-libraries.mdXUI custom views and .b4xlib packaging
platform-b4a.mdAndroid manifest, permissions, JavaObject
platform-b4j.mdDesktop, JavaFX, servers, handlers, packaging
platform-b4i.mdiOS build, signing, ATS, NativeObject
common-mistakes.mdFrequent AI and migration errors
compatibility.mdVersion-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​

The Working Style guidance in SKILL.md adapts ideas from multica-ai/andrej-karpathy-skills, licensed under MIT.

B4X, B4A, B4J, B4i, and B4R are products of Anywhere Software.

License​

Released under the MIT License.
 
Top