From Get Strong at Attacking, problem 11:
The book gives the answer through 5. 
The book also gives this variation. 
Chris Hayashida: The problem I have is that if I play a move like that, White always plays a kosumi-tsuke. How should Black answer? I assume I need to make sabaki and wreck White's moyo at the top while keeping pressure on the weak white group. But how?
Charles A play like here is actually characteristic of weak players. (OK, we are mostly weak players - but ...) It really is characteristic of weak players that they play routinely, with no conception that the exchange / involves a local loss if Black simply extends as below. The loss is because has more influence on the game than , and White hasn't fully covered the weakness (the open skirt here has turned into an invasion point?).  See diagonal attachment as inferior shape.
Joonas Tyystjarvi: looks fine to me - after this, a and b are miai.
dnerra Fully agreed. You need to make sabaki when the opponent is strong. The white group at the top is weak. Btw, instead of b, Black also can jump out to c, leaving white with the problem of how to repair the horrible weakness at d.
Chris Hayashida: Funny, but was what I came up with. I didn't think it was a viable option because of a white response at a (or one space to the right), though. I guess my move wasn't wrong, but my judgement was. Thanks.
Dave: Presumably this is where the problem came from...
In every case that I found Black played when the position to the left was Black. There was not a single example of playing this when the position to the left was White. I would say use the book recommendation with caution.
A very general kind of point about this.
In reply to , sometimes is another possibility, It's a tighter plan, and can fix up your shape. Anyway, White playing at a automatically is a bad habit.