The Cameron-Sarkozy duet in Tripoli yesterday was suitably short on triumphalism. Not one Nato serviceperson died and the regime that the mission aimed to change fell within six months. So the temptation to crow was high.

But the two European leaders no doubt remember the Bush administration's rash boasts of mission accomplished in Iraq and Afghanistan. Their advisers must also have warned them that "liberation" can be a fragile concept with a short shelf-life. There may have been less looting in post-Gaddafi Tripoli than in post-Saddam Baghdad, but there has been far more brutality meted out to former regime supporters. Cameron and Sarkozy concentrated on measures to secure loose weaponry and offered medical and other aid. On their return home, they should also think of more innovative ways to help the war's victims.

On the same day as their visit, a new initiative was announced in London. Some three dozen NGOs launched the Charter for the Recognition of Every Casualty of Armed Violence. The brainchild of the Oxford Research Group, the charter calls on states to ensure that every casualty of armed violence, not just soldiers or "their own civilians", should be properly recorded, correctly identified and publicly acknowledged.

Every casualty counts but rarely is every casualty counted. That fact of war, particularly of the modern brand where civilian deaths far outnumber those of combatants, has slowly begun to be remedied. The Iraq Body Count made a start for the war that the US and Britain launched in 2003, carefully recording and cross-checking every reported victim and giving, wherever possible, the full name and date of death. The Research and Documentation Centre in Sarajevo has been doing the same for the Bosnian war, regularly updating the Bosnian Book of the Dead, which now has 99,000 names.

The just-unveiled Kosovo Memory Book is an impressively impartial collaboration between Serbs and Albanians at the Humanitarian Law Centres in Belgrade and Pristina. Listing the 2,046 people who lost their lives in Kosovo in 1998 (a further volume on the larger number from 1999 is underway), the book includes short details for victims of all ethnicities. One aim is to try to end the battle of statistics in which different sides focus only on their own group.

Another remarkable aspect of the volume is that no distinction is made between civilians and combatants, so that thumb-nail biographies of Yugoslav army soldiers who died in Kosovo are set alongside those of Albanian women and children. In the "irregular wars" which are increasingly today's norm, it is often hard to distinguish between combatants and civilians, especially when the "men with guns" may have been press-ganged into fighting or are child soldiers, or were illegally executed after being captured.

In Syria researchers for the human rights organisation Insan have been risking their lives to register the names of victims. Between March and this month they total 3,004 including 92 boys and 56 girls, all shot in the upper part of the body.

The dignified naming ceremonies held in New York on the 10th anniversary of 9/11 on Sunday were a model for how bereaved families can memorialise their loved ones. One day the same care should be shown for the tens of thousands in Iraq and Afghanistan who died because of American "payback".

It is good if civil society in a particular country starts to record and keep alive the fate of victims, but the main duty must rest with governments. They are accustomed to keeping lists of dead soldiers and erecting war memorials. Do civilian victims deserve less?

More than any other recent western military intervention, the Libyan campaign was explicitly based on the need to protect civilians. While the true purpose was regime change, the mission the UN security council approved cannot be passed over now that change has been achieved. Many of the civilians that Nato came to protect are dead, as are hundreds of combatants, some killed in detention.

An Amnesty report on Libya published this week shows that beside the atrocities committed by Gaddafi's forces, scores of pro-Gaddafi supporters were rounded up and killed after the fall of Tripoli. Dozens of sub-Saharan Africans were wrongly accused by rebel forces of being mercenaries and then detained, tortured or murdered.

In Syria the Assad regime has been doing everything to block information about its massacres, as Wissam Tarif, Insan's director pointed out yesterday. It has kidnapped researchers, cut telephone lines, and interfered with internet access. Britain and France should draw a contrast with these practices by funding a full accounting of the killings in Libya. A paragraph supporting this should be put in the new UN resolution they plan to bring forward. Making a record of every victim in Libya on the model of the Bosnian and Kosovo books of the dead can also help in the reconciliation the country urgently needs.

Nato should put its weight behind the every-casualty charter. A century after international humanitarian law was created, it is time states register the names and fates of the victims who die when those laws are broken.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.