Just because he’s dealing with the Ten Commandments, don’t think David Wain is trying to teach you anything. Wain and his co-writer Ken Marino use the commandments as jumping-off points not for moral lessons, but for as many non-sequiturs and boundary-pushing jokes they can squeeze in. The result is The Ten, ten shorts crammed with Wain’s (Wet Hot American Summer) brilliant lickety-split humor that nonetheless fail to add up to a satisfying whole.

The shorts take each commandment in an absurd yet satisfying direction—the golden calf worshipped here is a man stuck in the ground after a skydiving accident (Adam Brody), and the jealous neighbor (Liev Schreiber) covets his neighbor’s escalating number of CAT scan machines. They’re tied together by a narrator (Paul Rudd) who is busy breaking a commandment of his own, cheating on his wife (Famke Janssen) with a classic floozy (Jessica Alba—who else?).

Many characters cross over from one vignette to the next—Marino’s doctor who murders patients “as a goof” (“Thou shalt not murder”) is also a prisoner tentatively beginning a romance with another inmate (Rob Corddry) who wants to rape him (“Thou shalt not covet thy neighbor’s wife”), and Brody’s distraught fiancée (Winona Ryder) later leaves her husband for a ventriloquist’s dummy (“Thou shalt not steal.”) The result is a slightly patchy tapestry that tickles about as much as it annoys, full of unexpected laughs but also some torturous dead spots.

The best vignettes take a classic genre story and tweak it ever-so-slightly toward nonsense. In one favorite, a virginal librarian (Gretchen Mol) experiences a sexual awakening in having an affair with Jesus, as in Jesus Christ (Justin Theroux, disarmingly sexy and funny). The fact that this is the vignette for “Thou shalt not take the Lord’s name in vain” is only the beginning of the fun. Marino’s doctor’s journey through the legal system is a straight-up “Law & Order” parody, with the phrase “It was a goof!” earnestly repeated the way “I swear I’m innocent!” might be shouted as a defense on the show.

On the other hand, other stories head off in directions so bizarre they only serve to alienate or confuse. Ryder’s sex scenes with a ventriloquist’s dummy are, simply, creepy, and an animated segment about a rhino who bears false witness is both disgusting and dumbfounding. The rotten stories serve to shatter the momentum achieved by the good ones, so that The Ten never builds up to the giddy climax that made Wet Hot American Summer a triumph.

It doesn’t help matters that Rudd’s framing story, while funny when it becomes its own Woody Allen-inspired vignette (“Thou shalt not commit adultery,” naturally), is deadeningly slow. Rudd is charismatic, as always, and a brief appearance by Wain livens things up, but his all-too-typical story of adultery and redemption isn’t nearly twisted enough to fit in with the rest.

Still, the huge cast adds fun even in the weaker scenes, with well-known actors playing against type (Brody as a man ruined by fame, Oliver Platt as a terrible Arnold Schwarzenegger impersonator) and others cutting loose and having a ball (a mustached Schreiber is particularly great). Wain and Marino got their start on the MTV sketch show “The State,” and all 11 original members of the group are in The Ten; instead of turning the film into a big inside joke, the actors fit in perfectly with the film’s sensibility and turn in some of the best performances.

The final scene of The Ten kind of sums up its flaws: A rock concert purports to unite all the characters as they sing about their stories, but the actors are clearly CGI-ed together, making the sequence as patchy as the rest of the film. While The Ten offers something for just about anyone, there’s enough of the other stuff to alienate all but the most ardent Wain followers.