I'm pretty sure the form changes based on what follows. I.e. if the following clause is a verb, I think it's ごときに, and if it's a noun, I think it's ごとく. This will serve as a reminder though for me to check my grammar book later on.
Yes, 安努龍 is right. Though, ごとき has two different meanings. The one this grammar defines itself as has the following rules:
AごとくB (when B is a verb or adjective):
Nの (not optional) ごとく... V(辞)がごとく... [文]かのごとく...
AごときB (when B is a NOUN)
NのごときNoun V(辞)がごときNoun [文]かのごときNoun
When ごとく will be ending the sentence:
○○○のごとし。
The grammar 安努龍 was reminded of is a different meaning, with the particle afterward being decided based on what verb is being used later in the clause and it typically preceded by たかがNounごとき(_)