Sean Hayes the performer is not to be confused with the character of Jack McFarland on Will & Grace that he's blessed (or doomed) to be branded with as his career-defining role. And Hayes, currently appearing at the Golden Gate Theater in SHN's production of An Act Of God, continues his long transition away from petulant, flamboyant small-screen jester to wry, controlled comedic actor in this play, which just finished an LA run at the Ahmanson Theatre. He garnered a Tony nomination just a few years back for Promises Promises, after all, and his talent for comic delivery do indeed transcend "Just Jack" and motorboating Karen's boobs.

The play is written by 11-time Emmy winner David Javerbaum, formerly a writer on The Daily Show, who is behind the Twitter account @TheTweetOfGod, the satirically blasphemous and all-too-frank tone of which formed the basis for a subsequent book, The Last Testament: A Memoir by God, many punchlines from which make it into the play. (Examples: "The Bible is 100% accurate. Especially when thrown at close range."; "The difference between Bible prophecy and a Magic 8-Ball is no one uses 'Reply hazy, ask again later' as an excuse to kill people.")

Javerbaum's God, portrayed first by The Big Bang Theory's Jim Parsons in a Broadway production last summer, is an irreverent jokester with nothing to lose and a witty answer for (almost) everything. He's also pro-gay, anti-Republican, anti-evangelical, and anti-Kanye and generally pissed off that sports heroes and musicians are constantly thanking him for their successes. And he's a major fan of musical theater. ("People ask me how I could have allowed the Holocaust to happen. But, no Holocaust, no Cabaret.") And this isn't really a spoiler but there is one surprise musical number. I'll say no more.

The script is structured around 10 New Commandments that God has decided to deliver to theater audiences "through the earthly form of Sean Hayes, Emmy-winning actor of stage of screen." And Hayes, clearly, delights in the broad comic possibilities of the role as he holds court in a white robe on a white couch, center stage, and issues commands or generally browbeats his two archangels, Gabriel and Michael — played here with believable fatigue and reluctant obedience by James Gleason and David Josefsberg, the latter of whom reprises the role from the Broadway run with Parsons.

Michael initially serves the function of audience Q&A facilitator (though the people he picks out of the audience don't seem to be supplying any of the Big Questions that get lobbed at God, who's always ready with a quippy reply). But then Michael later becomes the source of the plays only conflict and brief dramatic arc, forcing God to admit, ultimately, that he has no real design, that the Bible is full of contradictions, and maybe he doesn't know what the hell is wrong with himself sometimes.

Really, though, An Act of God doesn't try to dwell on these Big Questions for long, and the awkwardness around the attempts to answer them is probably the play's biggest weakness. This is mostly a showcase for a talented comedian like Hayes to deliver some good one-liners and snappy patter about the creation of the universe, the mysteriousness of his ways, and the burden of having to watch the entire world masturbate all the time.

The sleek set by Scott Pask, kind of like the set of a divine talk show complete with a light-up stairway to heaven, deserves props, as does the timing and pacing of the direction by Joe Mantello — though there are moments when Hayes rushes things, which is an occupational hazard when one has deliver this many monologues.

If nothing else, the production is incontrovertible proof that Hayes deserves a Tony at some point, because he can command an audience for 90 minutes like no other, and never misses a beat when it's leading to a laugh.

'An Act of God' is playing at the Golden Gate Theatre through April 17. Find tickets here, or show up at the box office two hours prior to each performance for a limited number of $40 rush tickets. Also, check out the TodayTix app for other ticket possibilities.