Scientifically understanding the rules of migration and accumulation of gob gas is the basis for gas development of sealed gobs or abandoned mines. Based on the rules of the movement and failure of surrounding rocks and the migration of gas in the stope, the theory of gas trap in stope is put forward. The theory holds that the strata of continuous deformation zone, coal pillars and their roof and floor strata around the stope, the underlying strata of the floor failure zone, and gas emission zone (GEZ) can be acted as the caprock, the lateral barrier, the bottom barrier and the reservoir respectively, thus forming the gas trap in stope together. The gas trap is a place where abandoned gob methane (AGM) can be prevented from migrating and accumulated. Once there are enough AGM resources in the trap, the gas reservoir can be formed. Mining methods, the layout of the working face, mining space, burial depth and mechanical properties of the surrounding strata of the stope directly affect the formation of the trap. Based on the requirements of waterproof and sealing ability, the thickness and lithology requirements of the strata in the continuous deformation zones as the trap caprock are proposed, and specific calculation and determination methods are given. The influence of the stability of coal pillar, the gas conductivity of overlying and underlying strata of coal pillars, and the overlapping of GEZ in adjacent gob on the formation of traps is studied, and the conditions of using coal pillar and its roof and floor strata around the stope as lateral barriers are proposed. The relationship between mining height, lithology of overlying strata of coal seam,and development height of GEZ is analyzed. The influence of interval between adjacent coal seams on the formation of traps in upper and lower gobs is studied, and the criteria for the formation of traps separately in upper and lower gobs are proposed. After analyzing the function of the reservoir, it is considered that the GEZ should have enough AGM resources and void volume. And both are indispensable. The traps with void volume but not enough AGM resources are of no development value, and the traps with only AGM resources but not enough void volume cannot be exploited with surface borehole. To fully reflect the storage conditions condition and void volume of the reservoir, the quantity and quality of AGM resources in the trap and the water accumulation in the gob, the measurement parameters of traps are proposed, including AGM resource, methane concentration, free gas pressure, void volume and effective void volume in GEZ, effective void volume ratio, residual rate of excavation space, and residual rate of the mining area. The trap can be formed by one gob alone or by multiple gobs. According to the number and spatial location of the gobs, gas traps can be divided into single-stope type, multi stope horizontal type, multi stope vertical type and multi stope mixed type. The source of AGM resources in traps is limited to the resources within the scope of GEZ, mainly including coal pillars, residual coal, adjacent unminable coal seams and gas-bearing strata, as well as free gas in the void of the GEZ. At the same time, according to the characteristics of different kinds of AGM sources, the calculation range and calculation method of AGM resources are proposed.