+0
"Some people are good at comprehending how to treat you based on how they see you treating yourself." Is this correct?
+0

Some people are good at comprehending how to treat you based on how they see you treating yourself.

Grammatically, it's fine.

The underlined element is a subordinate interrogative clause (embedded question) serving as complement of "comprehending".