/abapsmith:abapsmith-write-a-fluid-pluginfrom abapsmith
Adds a new fluid tool to abapsmith as an operator-installed plugin without changing abapsmith's source. Use when asked to add, extend, or package a custom fluid tool or action.
Ships in abapsmith. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A plugin is one directory the operator points abapsmith at. It becomes a
tool under abap_fluid with no MCP registration. You write the files, the
operator enables them, then you verify.
1 choose id/actions → 2 manifest → 3 body class → 4 check on the system → 5 self-check → 6 hand off → 7 verify
id: /^[a-z][a-z0-9_]{0,11}$/, unique across built-ins (classic core enh fpm img rt run ui)
and other plugins.category is read, execute or mutate.
mutate is anything that writes to the database or commits.<root>/<id>/fluid-plugin.jsonStart from test/fixtures/fluid-plugins/hello/fluid-plugin.json; the format is in
doc/FLUID-API/manifest.md. Non-obvious constraints:
contract is "1.0".objects[] is deploy order. Types CLAS/OC or INTF/OI only. description ≤ 60 characters.ZCL_ZMCP_X_<ID>* or ZIF_ZMCP_X_<ID>*. Anything else is refused.entry names the class the invoker calls; it must be in objects.mutate action should declare targets — JSON Pointers into its own args naming
object, package, transport — so the safety gate judges the real target. Without
targets the action is not gate-asserted at all.Start from test/fixtures/fluid-plugins/hello/abap/zcl_zmcp_x_hello.abap. The contract the
framework expects, which is not standard ABAP:
CLASS-METHODS run IMPORTING iv_action TYPE string iv_json TYPE string.
Its source never depends on a call's arguments; those arrive only in iv_json.zcl_zmcp_fluid_rt=>begin( iv_id = '<id>' iv_action = iv_action ) first and
zcl_zmcp_fluid_rt=>end( lv_rc ) last, rc 0 on success.zcl_zmcp_fluid_rt=>scan( iv_json ), then s( 'key' ) for a string,
b( 'key' ) for a boolean, n( 'key' ) for an array length with items at key/0, key/1, …out( '<json>' ) or out_chunk; report failure with
err( iv_kind = 'exception' iv_step = '<step>' iv_text = '<text>' ) and a non-zero rc.
WRITE output is not read as a frame.esc( ). It handles only backslash, quote,
CRLF, LF, CR and tab; strip other control characters yourself.COMMIT WORK in the body. The invoker commits after a mutate action and rolls back
when rc is non-zero; an execute action's database changes persist only with the request's
implicit commit. Do not claim otherwise in a manifest description.Plugins deploy only through the server, so check the source yourself: rename the class to
ZCL_<SOMETHING>_CHK, abap_write it into $TMP, abap_activate, fix, repeat — after the first
method, not after the last. Delete the scratch class before handing off. The ABAP traps that
pass this check and fail at run time are in abapsmith-write-abap-source.
The loader refuses the whole plugin, naming the file and line, on any of these:
CALL 'SYSTEM', EXEC SQL, INSERT REPORT, GENERATE SUBROUTINE POOL,
CALL FUNCTION … DESTINATION, SUBMIT … VIA JOB, dynamic CALL METHOD (…).COMMIT WORK/ROLLBACK WORK without ABAP_ALLOW_FLUID_PLUGIN_MUTATE on.CALL FUNCTION without ABAP_ALLOW_FLUID_CALL_FM on.FLUID_OBJECT_CONFLICT).source.file that resolves outside the plugin directory.Note which of the two flags the plugin needs; step 6 must ask for them.
Plugins load once at server startup, never mid-session. Tell the user to set these in the MCP server's env and restart it:
| Variable | Value |
|---|---|
ABAP_FLUID_PLUGINS | comma-separated absolute roots; each subdirectory with a fluid-plugin.json is one plugin |
ABAP_ALLOW_FLUID_PLUGINS | true — consent to run the ABAP there; the path alone is not consent |
ABAP_ALLOW_FLUID_PLUGIN_MUTATE | true if step 5 found a DB write or commit, or any action is mutate (the gate checks it per call) |
ABAP_ALLOW_FLUID_CALL_FM | true only if step 5 found CALL FUNCTION |
Read-only mode or a productive system disables the fluid API entirely, plugins included.
abap_fluid is abapsmith's single entry point to the fluid API — functions
that only work by installing generated ABAP into $ABAPSMITH_FLUID_API —
and even its read-shaped ops (list, describe, status, verify) need
write access to exist at all: the whole tool is absent from tools/list
under ABAP_MODE=read, and it refuses FLUID_API_DISABLED again if a
system that started writable later proves productive or trips the write
lockout. See doc/TOOLS/abap-fluid.md.
abap_fluid(op="list") — the id is present. If not, the same output lists it under
refused[] with path, error code and reason. Then op="describe", tool="<id>" to confirm
the schemas match what you wrote.abap_fluid(tool="<id>", action="<read action>", args={…}) — first call deploys the objects
into $ABAPSMITH_FLUID_API, then runs. A mutate call also needs confirm: "<id>.<action>".abap_fluid(op="verify", tool="<id>") — what is actually on the system.Any source change after the restart needs another restart: op="repair" re-deploys the loaded
version only. Batch every fix from one verify round, syntax-check them as in step 4, then ask
for one restart.
FLUID_PLUGINS_DISABLED means the path is set but consent is off. FLUID_ACTION_FAILED is
your own err frame; the text is what you passed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub freight-art/abapsmith --plugin abapsmith18 skills in this plugin
/abapsmith-browse-img-customizingBrowses the SAP IMG (SPRO) customizing structure with abap_img — activities, their tree position, and the tables behind them. Use when asked what a customizing activity does, where a setting lives, or which table backs a view/transaction./abapsmith-check-code-qualityRuns ATC static checks with abap_atc and lists or applies ADT quick fixes with abap_quick_fix. Use when asked to review, clean up, or check an object for findings before it is transported./abapsmith-create-an-objectCreates, changes, or deletes an ABAP object with abap_write and checks whether it worked. Use for any mutation, and whenever a write returned success but the result looks wrong./abapsmith-create-a-rap-serviceBuilds a RAP stack — CDS view, behavior definition, service definition, service binding — in the correct order. Use when creating or extending an OData service from ABAP RAP artifacts./abapsmith-create-ddic-objectsCreates domains, data elements, table types, tables, structures, message classes, lock objects, and search helps in the right order with the right payload shape. Use for any DDIC dictionary object./abapsmith-debug-a-failing-runTurns a failed ABAP run into a diagnosis — the ST22 short dump with abap_dumps, then a live breakpoint with abap_debug. Use when a class or report short-dumped, raised an unexpected exception, or produced the wrong value.Other plugins' skills for the same job