Not sure where you are located so I don't know what varieties of snakes are common where you are. Assuming you are in the US what little I can see does not look like a poisonous snake. The body shape is not right. So yes, probably a black racer or black rat snake, though there are other possibilities. Do you have an estimate as to how long it was?
Snakes will eat eggs and baby chicks. As long as they are not poisonous or in my coop I leave them alone. Poisonous snakes I kill. They eat things I don't want around, such as mice. Supposedly a black racer of black rat snake will eat a smaller poisonous snake but I'm not sure how often that actually happens. King snakes certainly will if you are lucky enough to have one of those around. I think they do a lot more good than harm, though I'll admit being surprised by one can get your heart pumping. They are highly unlikely to bite you or harm you in any way unless you step on them or somehow threaten them. So the main thing when you see one is to leave it alone. I have sprayed one with a water hose when it was hanging around on my porch. It left and I did not see it much after that.
The best way to try to reduce snakes around your house is to remove any trash or places they can hide. They are probably looking for food. Trash piles, wood piles, heavy vegetation, things like that make good places for mice, chipmunks, and other things they like to eat to hide. It also gives them cover so they can hide from things that want to eat them. So keep your yard mowed and things cleaned up.
There are snake repellents you can buy. I haven't tried any so I don't know how effective they really are.