refactor to extract cg-is-skip