'Negotiators in Poland have finally secured agreement on a range of measures that will make the Paris climate pact operational in 2020.
Last-minute rows over carbon markets threatened to derail the meeting - and delayed it by a day.
Delegates believe the new rules will ensure that countries keep their promises to cut carbon.
The Katowice agreement aims to deliver the Paris goals of limiting global temperature rises to well below 2C.
"Putting together the Paris agreement work programme is a big responsibility," said the chairman of the talks, known as COP24, Michal Kurtyka.
"It has been a long road. We did our best to leave no-one behind."
The common rulebook envisages flexibility for poorer nations.
Developing countries seek recognition and compensation for the impact of rising temperatures.
The idea of being legally liable for causing climate change has long been rejected by richer nations, who fear huge bills well into the future.
Last weekend, scientists and delegates were shocked when the US, Saudi Arabia, Russia and Kuwait objected to the meeting "welcoming" a recent UN report on keeping global temperature rise to within the 1.5C limit.
The report said the world is now completely off track, heading more towards 3C this century.
Keeping to the preferred goal would need "rapid, far-reaching and unprecedented changes in all aspects of society".'
Read more: Another stage in elite transformation of human society using 'save the world' as the excuse
More Co2 is GOOD for Earth - Seeing is Believing Time Lapse Video: 2 Plants Growing