As "Chinese Kapitan", he was vested with wide powers on par with Malay community leaders. He implemented law reforms and introduced new legal measures. He would also preside over a small claims court. With a police force consisting of only six officers, he was able to uphold the rule of law. He built a prison which could accommodate 60 prisoners. Kapitan Yap Ah Loy also built Kuala Lumpur's first school and a major tapioca mill in Petaling Street in which the Selangor's Sultan Abdul Samad had an interest.