For your scenario to be plausible, Russia would have intended to get caught using a nerve agent to kill a traitor to their state. On foreign soil.
Russia is already under significant sanctions from their invasion of Ukraine. Nothing to lose there.
And Putin is former KGB and may have taken Skripal's actions personally and want to set an example for other former agents that might try what he was doing.
It seems similar to the radioactive Polonium poisoning of a dissident Russian, or the toxic chemical poisoning of a Ukranian leader. It seems like what they do, set an ugly example to scare others.