Chandi di Var is a Punjabi war ballad in the Dasam Granth, retelling the battle of the goddess Durga against the demons from the Markandeya Purana, in the vaar metre with a driving rhythm.
Its opening stanza remembers Bhagauti first and then Guru Nanak Ji, and that stanza is the first section of the Ardas, recited daily in every gurdwara in the world. The line about the one who first created the sword and then created the world comes in the stanza after it, and is not part of the Ardas.
The composition is not devotional to Durga in any Sikh reading. The standard interpretation is that it uses an existing heroic narrative to teach courage, and the framing at the start and end places it within the Sikh understanding of one formless divine.
It is the only composition in Punjabi rather than Braj among the Guru's major attributed works and it is written to be recited aloud at speed.
The presence of a Puranic battle narrative in the Sikh canon, and the opening of the Ardas being drawn from it, is one of the points on which the Dasam Granth argument is sharpest.
The vaar is the Punjabi heroic ballad form, sung by dhadis to the dhad and the sarangi, and it was old before this composition used it. Guru Arjan Dev Ji had the tunes of existing vaars prescribed for compositions in the Guru Granth Sahib Ji, which is how a battle metre came into the scripture in the first place.
Its Punjabi is plain and old and it is one of very few long compositions of that period in the spoken language rather than in Braj. It is used as evidence for what Punjabi looked like at the end of the seventeenth century quite apart from anything it says.
Whether the Dasam Granth is the Guru's work entirely, partly or not at all is the longest running argument in Sikh scholarship. The positions are held hard, the manuscript evidence is thin and contested, and this composition sits in the middle of it because a line from it is spoken every day by everybody.