The NSW government has endorsed the Commonwealth's proposal for laws that could indefinitely detain convicted terrorists.

The proposed laws would allow better supervision or detention of high risk offenders, which matches NSW's existing laws for the most dangerous sex offenders, NSW Attorney-General Gabrielle Upton said on Monday.

"It is also designed to reduce reoffending by encouraging rehabilitation before an offender is released," she said.

Prime Minister Malcolm Turnbull says he will work with the state and territory leaders to roll out a system of post-sentence preventative detention for terrorists who are at high risk of reoffending.

The process will be overseen by the courts and informed by detailed medical and psychological checks.

The federal government's handling of the legislation made sense because most terror offences fell under Commonwealth jurisdiction and the proposal would provide a nationally consistent approach, Ms Upton said.