<@U016EM8L91B> try this: there is a menu option `...
# xschem
s
@User try this: there is a menu option
Simulation -> LVS netlist: top level is a .subckt
. If you enable this option the top level will be wrapped into a subckt. This can be done also from command line, may be not super simple but works like this:
xschem /path/to/schematic.sch  --tcl 'set top_subckt 1' -n -s -q
-n means netlist, -s means spice, -q means quit after doing netlist. The --tcl option overrides a tcl variable for wrapping the top into a .subckt. If there is interest i can add a command line option to do this more easily. The 'set top_subckt 1' can also be added into the xschemrc to make this option the default.