Ok. Here’s the story about the Chengyu 鸡鸣狗盗.
In ancient China, there was a minister named 孟尝君 [Mèngchángjūn]. At the beginning, the emperor liked him a lot. One time, 孟尝君 was invited to the palace to have a party. At that time, 孟尝君 gave the emperor a white fox-fur coat as a gift.
However, things didn’t go well afterward. A bad guy spoke ill of 孟尝君, and the emperor was going to arrest 孟尝君. 孟尝君 asked the queen for help. She said, “I would help, if you can give me the white fox-fur coat.” But the one that 孟尝君 gave the emperor was the only one that he had. He didn’t have another one for the queen. One of his retainers (Let’s call him A) said he had an idea. A imitated a dog’s bark and sneaked into the palace. The guards thought it was the dog kept in the palace, so they didn’t find anything wrong. Therefore A successfully stole the coat and gave it to the queen.
孟尝君 took advantage of the occasion. He fled with his retainers. He finally reached the border, Hangu Pass. But the gate would not open until the roosters went cock-a-doodle-doo. Then, another retainer B imitate the rooster. Simultaneously, real roosters were woken, so the gatekeeper opened the gate. Once the emperor’s soldiers reached the border, they had gone.
**Retainers: Retainers in China from pre-Qin through Han times were a special social group, who lived as dependents under a noble, an officeholder, or a powerful landlord. Retainers stayed long-term at the house of their host, were fed by him, and obtained also many other benefits through him, such as money, reputation, social position, appreciation, and so on. In return, a retainer would have rendered certain services to his host. But he was free to come and go, and he could leave when he was not treated politely or when he disapproved of the behavior of his host. (from Wikipedia)