The hosts secured the points after scoring two goals in three second-half minutes through Jordan Slew and Matt Warburton.
Both goals came totally against the run of play when the Blues were on top.
Defeat for the Spireites means they stay fifth in the league but now trail the third-placed Shaymen by seven points.
"It is disappointing to lose a game that at a stage in the second-half was as well as we have played in a long time,” Cook said.
"We were in total control of the game, creating chances, the balance of the team looked excellent and we were under no pressure.
"I did not see the two-nil defeat coming.
"At times I just don’t trust us as a team and that is at both ends of the pitch.
"Today we had opportunities, great situations, and a heartbeat later we are two-nil down and you go ‘what’s just happened there?’
"It is not good enough from our lads.
"We need to be stronger at both ends of the pitch and I feel today epitomises where we are. Not defensively solid to keep a clean sheet and certainly not taking chances well enough so we have got to work harder.
"When you come under pressure away from home you revert to type and our type is to panic at times and not do the right things and make individual errors.
"Their goals are soft, ridiculously soft. You can’t be totally dominant and concede two. We should be sitting here now saying we drew nil-nil, weren’t really good enough to open them up, but we take a point and move on, that should be the conversation.”
Tom Denton controversially had a goal ruled out in the first-half with the game goalless.
On that, Cook said: "We have watched it back, it is a good goal, and we find a way for the referee to disallow it. The fourth official says to me it is a clear push. We are standing here 80 yards away with bodies in the way. If I can’t see it, I don’t see how he can. Those are the moments that change games. That is probably not the reason why we lost but I don’t think it has helped us.”
He added: "The hardest thing for me today is that it is probably as well as we have played for a period of time yet we have been beaten two-nil and as a manager that is tough to take.”
Gavin Gunning was forced off at half-time with a calf problem.
Laurence Maguire missed out on a place in the squad with an ankle issue, while Saidou Khan was not involved due to a neck problem.
The Spireites next face Dover at home on Saturday.