From powerbuilder-dev
Use when modifying PowerBuilder source code (.srw, .srd, .sru, .srm files). Guides the complete workflow from reading to compilation. MUST be used for any PB code change.
How this skill is triggered — by the user, by Claude, or both
Slash command
/powerbuilder-dev:pb-modifyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before changing any PowerBuilder file:
Before changing any PowerBuilder file:
pb_read_object to get the full source + parsed metadatapb_get_inheritance — understand what this object inherits from and what inherits from itpb_get_dependencies — who uses this object? What will break?pb_get_object_summary if you need a quick overviewNEVER modify a PB file without first understanding its inheritance and dependencies.
Before writing code:
Use pb_modify_script for targeted find-and-replace:
For new functions/events, insert at the correct location in the file:
type variables ... end variables sectionend type declarationAfter each modification:
pb_validate_syntax to check basic syntaxpb_compile to do a full compileThe compilation process:
pb_compile executes PBAutoBuild250 and returns structured resultsis_ = instance string (e.g., is_customer_name)il_ = instance long (e.g., il_customer_id)ib_ = instance boolean (e.g., ib_dirty)id_ = instance decimal/dateii_ = instance integerls_ = local string, ll_ = local long, etc.of_ = object function (public method)wf_ = window function (private to this window)gf_ = global functionue_ prefix = user-defined events (custom)w_ = windownvo_ = non-visual objectuo_ = user object (visual)d_ = datawindowm_ = menust_ = static text, sle_ = single line edit, mle_ = multi-line editcb_ = command button, dw_ = datawindow controlddlb_ = dropdown list box, rb_ = radio button, cbx_ = checkbox$PBExportHeader$objectname.srw
forward <- DO NOT MODIFY unless you understand it
global type ... from ...
end type
end forward
shared variables <- shared across instances
end variables
type variables <- instance variables
end variables
forward prototypes <- function declarations
end prototypes
type prototypes <- more declarations
end prototypes
event open;...end event <- events
public function ...end function <- functions
on objectname.create <- lifecycle - DO NOT MODIFY
on objectname.destroy <- lifecycle - DO NOT MODIFY
NEVER modify forward, on create, or on destroy sections unless you fully understand the impact. These are generated by the PB IDE.
SQLCA = default transaction object (database connection)this. = reference to current objectparent. = reference to parent windowmessagebox() = show message dialogdestroy = free memory for dynamically created objectscreate = instantiate objectstrigger event = fire an eventpost event = queue an event for later processingIf compilation fails:
.bak backup file exists — you can restore if needednpx claudepluginhub juliendetilleux/powerbuilder-devPerforms coordinated multi-file fixes in ObjectScript projects when a change in one class requires updates in dependent classes (e.g., method signature changes, renames).
Compiles ADVPL source code via plugadvpl (TOTVS advpls wrapper). Includes a mandatory 4-step workflow for the Claude Code agent.
Builds (npm run build) and deploys Power Apps code apps to Power Platform using pac code push. Handles TS errors, user confirmation, Mac auth fallback, and memory bank updates.