The assailant, who cannot be named for legal reasons, was just 13 at the time of the attack on a 14-year-old boy who he knew outside the Co-op shop in Ironbridge on March 27, 2021.
The boy, who is now 15, was one of three to be detained for more than 10 years on Friday for murdering 26-year-old Peter Cairns, who was stabbed in the heart on June 11 last year, 11 weeks after the previous attack in Ironbridge.
Stafford Crown Court was told that there had been a confrontation inside the shop, when the accused had used racist and foul language, including the word 'Golliwog'.
There was a gasp as a hushed court room one was shown a CCTV video of the moment the victim fell and the young teenager lunged at his victim. In an earlier exchange his dark puffa jacket had been ripped by the same knife.
The court was told that the victim received 'superficial' injuries.
Lisa Wilding QC, prosecuting, told the court that he had not been charged and had been released under investigation by police.
He was later charged with wounding with intent to cause grievous bodily harm and pleaded guilty.
Judge Mr Justice Spencer said he had "slashed" at his victim, who he had lived near but had fallen out with.
The injuries were superficial but this was "only by good fortune", he said. Racist comments, including "go back to where you come from", he said were an aggravating factor.
Phillippa McAtasney QC, in mitigation for the defendant who carried the wheelbrace in the murderous attack on Mr Cairns, said he had been emotionally immature, and had shown evidence of remorse. His mother and he had written notes to the judge, showing a change in his attitude.
He had been a victim of modern slavery in being forced to work in cannabis farms, under the influence of elders, He also had a difficult and troubling upbringing, she said.
She said there was hope for him to be reformed and be a decent member of society, which was supported by reports and attitude, and asked the judge to deal with him as leniently as possible.
Trial judge Mr Justice Spencer said although he was the youngest member of the gang who were found guilty of murdering Peter Cairns, he was the "instigator of the violence".
He said he would add one year onto the murder sentence for the earlier knife attack.
"At just 14 at time you instigated violence and encouraged others. It was serious gratuitous violence with no conceivable excuse."
The fact he was considered 'vulnerable' and a victim of modern slavery by being made to work in a cannabis factory were also considered.
"The reality is that you were seriously out of control," he said. He accepted that in the murder there had been no intention to kill.
Now aged 15 he received a minimum term of 13 years in detention, minus the 395 days he had been on remand.
For the wounding on March 27 he was handed a concurrent sentence of two and a half years. For carrying a weapon he received no separate penalty.
On the conclusion of the case, Mr Cairns' father John was visibly upset and told police he would "get to the bottom" of why the youngster had not been behind bars after the attack on March 27.
He and Mr Cairns's mother Lisa left the court building visibly upset and did not wish to speak.