Snape knew Harry was under his Invisibility Cloak in at least one specific instance described in the books.
In the reference provided, Snape determined Harry's presence when Harry was hidden under the cloak in Snape's office during Book 4.
Key Instance of Snape Knowing Harry Was Under the Cloak
The reference highlights a specific moment where Snape identifies Harry despite him being hidden:
- Location: Snape's office.
- Context: Harry was under his Invisibility Cloak.
- Clues: Snape saw two key items:
- The Golden Egg (Harry's task in the Triwizard Tournament).
- The Marauder's Map.
Upon seeing these items together, which were undeniably Harry's and related to his activities, Snape deduced Harry's presence. As stated in the reference, Snape said, "'Potters here' to mad eye. Potters here. This is his egg and he's in his invisibility cloak."
This demonstrates that while the cloak makes the wearer invisible, other evidence or magical means can still reveal their location or identity to a skilled wizard like Snape. In this particular scenario, it was the combination of Harry's distinctive personal items (the egg and the map) found in a place Harry had reason to be (though secretly) that gave him away, allowing Snape to deduce he was present and using his cloak.