It’s not necessarily aggression. Depends on what you are doing. If you are taunting a cat, they are perfectly within their rights to respond with their claws. They might scratch you when they’re overexcited. I’ve noticed that many cats get overstimulated if you tickle them enough in a particular spot, and they just can’t help grabbing you or swiping at you with their claws out. Cats swipe at each other all the time, and it is often a matter of playfulness. They have much looser skin than we do, and their fur protects them as well, and so they don’t understand that we poor naked humans don’t have such defenses. Sometimes it’s for attention. I had a feral rescue who used to sit on her scratching post and swipe at me with her claws extended every time I went by. The only way to train her out of it was to completely ignore her every time she did that.