The onboard energy supply of Autonomous Underwater Vehicles (AUVs) is one of the main limiting factors for their development. The existing methods of deploying and retrieving AUVs from mother ships consume a significant amount of energy during submerging and surfacing, resulting in a small percentage of actual working time. Underwater docking chambers provide support to AUVs underwater, saving their precious energy and addressing this issue. When an AUV cluster is assigned multiple tasks, scheduling the cluster becomes essential, and task allocation and path planning are among the core problems in AUV cluster scheduling research. In this paper, based on the underwater docking chamber, an Improved Genetic Local Search Algorithm with Prior Knowledge (IGLSAPK) is proposed to simultaneously solve the task allocation and path planning problems. Under constraints such as onboard energy supply, AUV quantity, and AUV type, the algorithm groups AUVs, assigns tasks, and plans paths to accomplish tasks at different locations, aiming to achieve overall efficiency. The algorithm first generates an initial population using prior knowledge to improve its search efficiency. It then combines an improved local search algorithm to efficiently solve large-scale, complex, and highly coupled problems. The algorithm has been evaluated through simulation experiments and comparative experiments, and the results demonstrate that the proposed algorithm outperforms other algorithms in terms of speed and optimality. The algorithm presented in this paper addresses the grouping, task allocation, and path planning problems in heterogeneous AUV clusters. Its practical significance lies in its ability to handle tasks executed by a heterogeneous AUV group, making it more practical compared to previous algorithms.