In the renewables sector, the Scottish government has been perfecting a form of political alchemy over the last decade. In this, Nicola Sturgeon and her ministers have succeeded in spinning mere optimism into hard political currency.

The title of its manifesto for the 2011 Holyrood election asked voters to “Re-elect a Scottish Government Working For Scotland” and claimed that developing the low-carbon economy would create “around 130,000 jobs”. At the current growth rate of real jobs in this sector, you wouldn’t bet on that figure of 130,000 being reached before that big asteroid with Earth’s name on it finds its bearings.

The fabled potential of this sector for the economy has long mesmerised the political classes. Offshore Wind Scotland’s offering to potential investors reads like a licence to print money: “With over 25% of Europe’s offshore wind resource passing over Scottish seas, it’s no wonder some of the biggest names in offshore wind are already operating here,” it trills. “If your company is interested in the UK’s multibillion-pound offshore wind and renewables opportunity, then Scotland’s enterprise agencies are able to assist.”

The 20 or so workers at the mothballed BiFab construction yards in Methil and Burntisland on the Fife coast have another perspective. The future of these yards is crucial to the wider, working-class communities that surround them. That future is now subject to the whims of the French energy giant EDF, which has a £1bn contract to supply jacket foundations, which support and anchor wind turbines to the seabed.

The Scottish government, to give it its due, bought a significant stake in BiFab to help JV Driver, its new Canadian owner, navigate its way through the treacherous currents that dictate global contracts and processes in this sector. The EDF contract could create more than 1,000 long-term, skilled and well-paid jobs. It has the potential to revive and sustain communities that still haven’t recovered from Thatcherism. These hopes now hang by slender threads thanks to a mixture of what might generously be described as economic opportunism by EDF and rank incompetence by the Scottish government.

Facebook Twitter Pinterest The now mothballed BiFab construction yard in Methil. Photograph: Ken Jack - Corbis/Corbis via Getty Images

The French firm plans to award this lifesaving contract to an Indonesian firm, effectively saying that it can’t afford a skilled Scottish workforce. Hard questions are being asked about the worth of job guarantees linked to the work and the quality of the contractual obligations laid down by the Scottish government. Independent advice given to the GMB union about the scope for taking legal action in the event that these jobs flit to the other side of the world indicates that these ought to be scrutinised further, but you wouldn’t bet on it.

There has been almost £5bn of investment in offshore renewables in Scotland that, if properly managed and negotiated, could amount to several thousand sustainable and skilled jobs. According to the GMB, only 100 temporary jobs currently derive from this. In this global sector, we are often taking a penknife to a gunfight, with foreign-owned outfits heavily backed by governments that underwrite losses. Thus, our contracts need to be watertight and stringent.

The Scottish government spent a great deal of money securing all the necessary consents for the wind farm and said that jobs would be created in the Fife yards. That was before EDF bought the project from the previous owners for £500m, before crudely jettisoning all prior commitments to local jobs. How the Scottish government failed to get these jobs nailed down legally, even in the event of the contract being bought out, may yet be scrutinised in court. Scotland faces the bizarre and humiliating prospect of a French firm riding on the crest of our spanking new green energy revolution by moving it to the other side of the world, before towing it back on diesel-burning ships to stick it 10 miles off the coast of Fife as a permanent insult to the communities that must look at them every day.

UK taxpayers are entitled to ask why they are paying fortunes to subsidise green energy and create jobs everywhere else in the world except here. By 2022, all UK energy bill payers will be paying an extra £500 a year for renewables. EDF and the other global firms that have filled their boots on Scotland’s energy potential will make a lot of money from this. Gary Smith, secretary of GMB Scotland, said: “The electricity produced by this work will be very expensive. As a society, we are entitled to insist that the jobs created should be made here in Scotland.”

In another consent document granted by the Scottish government for offshore work in Kincardine, there is no mention of any jobs until page 58. The following is both instructive and depressing: “It is expected that all of the WTG unit (tower, blade and nacelles) will be fabricated outside of Scotland and transported to the construction base for assembly… the construction of the development is expected to create a small number of short-term employment opportunities in the area… employment and economic impacts are considered to be a temporary, beneficial effect; of minor significance for the economy of Aberdeen City and Shire.” In this case, it didn’t matter anyway as the work went to a state-owned Spanish firm, Navantia.

The Scottish government needs to get real here and get its finger out. It could start by seeking robust legal counsel to establish if EDF has misled ministers and Marine Scotland on their commitments to the economic and employment benefits deriving from the project to Scotland.

• Kevin McKenna is an Observer columnist