Flex connecting two black pipes mid line
Valve at the appliance
You didn't mention whether this valve here under the sink is the only one or whether there's another shutoff at the appliance. A valve somewhere in the plumbing system is a nice optional thing, but there really must be a valve at the appliance for service or emergency use. A person unfamiliar with the house is never going to think &quot;hmm, no valve behind the range... maybe under the sink??&quot;
Appliance connector.. not the right fit
The flexible tube connector shown in the photo is an appliance connector. When necessary, it is customary to have some hard pipe directly attached to an appliance and then use the flex connector to make the jump from the appliance to in-wall piping. Think of a furnace, for example: hard pipe extends from the gas valve to the exterior of the furnace cabinet and flex goes from there to the building piping. It's also not unheard of to join two flex connectors to gain additional length.
It's easy to imagine a mash-up of the furnace situation and the two-connectors-for-extra-length situation and morph it into something like what you've built here. I'm no expert in the fuel gas code, but I suspect that's taking things a bit too far. An appliance connector isn't the right material to use for making this connection.
Making things neater
So, how could things be better? First, put an elbow on each pipe stub and aim them both toward that left-rear corner. This at least gets you started on the right foot, keeping the connection out of the jungle in the middle of the space.
Next, if you really must have flexible tubing, CSST (corrugated stainless steel tubing) is the right material. I know, I know, it looks like exactly the same stuff as the appliance connector. Except it is listed as building piping. You can get this in many home centers now. It comes in coils of various lengths; you trim it to fit just right and then install connectors on the ends.
Save some money
CSST may be relatively expensive for the 2 feet that you need. So, about those left-right nipple/coupling sets.. Hang on, don't leave!
You can minimize in-cabinet wrenching by strategic pre-assembly of parts. I would do it as three:

90 degree elbow with left-right nipple pre-installed. This will go on the supply pipe.
Long piece of pipe, 90 degree elbow, short nipple, elbow, another long piece. This will go horizontal along the left side, upward in the rear corner, then horizontal across the rear wall.
Another 90 degree elbow with left-right nipple. This will go on the stub heading out to the range.

You can see how these will come together. Install the elbow-and-nipple assemblies on the stubs first. Then lift the pipes-and-elbows assembly into place in the rear corner. Use the two left-right couplers to pull it all together.