The Messenger of Allah ﷺ used to teach us the tashahhud just as he would teach us a surah from the Quran.
حدثنا يحيى بن آدم حدثنا شريك عن جامع بن أبي راشد عن أبي وائل
كان رسول الله ﷺ يعلمنا التشهد كما يعلمنا السورة من القرآن
Its isnad is sahih. The whole group narrated it at length, as in Muntaqa 995, and see 3622.