Kapitan China Yap Ah Shak (Chinese: 葉亞石甲, Pinyin: Yè Yǎshí Jia) of Petaling served as the fourth and penultimate Kapitan China of nineteenth-century Kuala Lumpur. He was a wealthy Huizhou Hakka merchant and a Hai San leader.
Yap Ah Shak was selected by Wong Ying, a prosperous Cantonese miner and several others to take over from Kapitan China Shin (Sheng Ming Li) of Sungai Ujong six months after the disturbances there had died down. The late Kapitan Shin was slain in the 1860 uprising of the Chinese miners at Sungai Ujong attributed to excessive taxation by the local Malay chiefs.
Yap Ah Shak then passed the title to Yap Ah Loy in 1859.
Yap Ah Shak moved from Sungai Ujong to Kuala Lumpur in 1870 and, even after passing on his title to Yap Ah Loy, continued to serve as magistrate for the settlement of Chinese disputes and as High Court Assessor.
By 1880 Yap Ah Shak had 10 tin mines around Kuala Lumpur.
Yap Ah Loy died in the middle of April 1885 and (in 1885/1886), after consulting representatives of different dialect groups in Kuala Lumpur, the British chose Yap Ah Shak, who had passed the title to Yap Ah Loy twenty-six years earlier, to serve as Selangor's new Kapitan China and state councillor.
Yap Ah Shak died in 1889 and his title passed to Yap Kwan Seng.
Yap Ah Loy was the protégé of Yap Ah Shak. His life, which began with him running from problem to problem, was transformed when he met Yap Ah Shak, who put him in charge of his gaming farm in Sungai Ujong.