Dr McLellan said the prison service could be proud of its record on safety
The prisons inspector has called for an end to the incarceration of children, after an "unprecedented rise" in the number of inmates under the age of 16.
It is one of seven "frustrations" Dr Andrew McLellan identified in the system, along with overcrowding and the treatment of remand prisoners.
But an end to slopping out and improved safety are among seven "signs of hope" set out in his annual report.
Scotland's justice secretary said there were currently no under-16s in prison.
Dr McLellan, Scotland's chief inspector of prisons, claimed that Justice Secretary Kenny MacAskill had vowed to act on the incarceration of children in February.
But he said: "The weeks immediately following this most welcome announcement saw not a decline, but an unprecedented rise in the number of imprisoned children.
"It has been so frustrating.
"This practice should be abolished."
Mr MacAskill said he shared Dr McLellan's frustration that a "small number" of children under the age of 16 were in prison over the past year.
But he added: "I announced plans earlier this year to abolish unruly certificates, which allow children aged 14 and 15 appearing on a charge before a criminal court to be remanded in prison custody.
"We are also developing plans to ensure that more children who are placed in secure care following conviction remain there beyond their 16th birthday rather than being transferred to the prison estate - most often a young offenders' institution."
Kathleen Marshall, Scotland's children's commissioner, said: "Time and again there have been concerns raised about children in adult prisons.
"Prison is no place for under-18s, and can only cause the individuals more harm than good.
"I am aware that work is going on to ensure there are facilities for the small number of under-16s that have very challenging behaviour, and I would urge the government to give this priority and to ensure that resources are made available to achieve our common aim."
Dr McLellan is due to step down from his post next year
The quality of food and work provision were among the other "frustrations" highlighted by Dr McLellan, while ongoing concerns about overcrowding were again raised.
"How frustrating it is that the steepest rise in overcrowding has coincided with the years in which I have been seeking to draw attention to its danger," he said.
An independent commission into the prison systems, headed by the former Labour first minister Henry McLeish, warned that Scotland must tackle its high prison numbers through alternatives to jail, such as community sentences and cutting short-term jail terms.
The inspector welcomed an end to "slopping out" - where inmates empty out their own sanitary waste - in every Scottish prison except Peterhead.
This will end when the new HMP Grampian is built.
"Every other prison has moved on from the disgusting practice and has moved on from the humiliation, risk and smell which went with it," he said.
He also highlighted good links with the local community and recognition of alcohol abuse problems as some of the positive aspects of the prison system.
Safety had also improved, according to Dr McLellan, who said the Scottish Prison Service could be proud of its record on the issue.
But prisoners on remand often faced the "worst conditions" of any prisoners and could spend up to 22 hours a day locked up.
"This situation must not be allowed to continue," he said.
Richard Baker, Labour's justice spokesman, described the report as "a snapshot of a prison system in crisis".
The Conservative justice spokesman, Bill Aitken, said: "Of course the establishments are full but the fact is that the government has simply not applied their minds to finding additional facilities."
Liberal Democrat justice spokesman Robert Brown MSP said information obtained by his party showed that almost all of Scotland's prisons were over the "assessed operating limit" last month.
He added: "We have been campaigning for over a year for radical changes, including replacing very short-term prison sentences - that don't work and cost a fortune - with tough community sentences."