Regarding
http://www.smogon.com/dp/pokemon/shedinja.
On all three sets you use a negative defense nature (lonely/hasty) for the theoretical situation of a Porygon2's / Porygon-Z's download ability, so the Porygon will receive an attack boost instead of a special attack boost. However, this is not the case.
You would need at least a defense IV of 12 or lower (along with the negative defense nature) and the movement of the 4 Def EVs to 4 Special Defense EVs (special defense must be higher to change download boost). In order to actually put the defenses to any use I'd suggest natures, EVs, and IVs, be changed to the following for each set:
Swords Dance
Code:
Nature: Lonely
IVs: 12 Def
EVs: 252 Atk / 4 SpD / 252 Spe
Trick
Code:
Nature: Lonely
IVs: 12 Def
EVs: 252 Atk / 4 SpD / 252 Spe
Baton Pass
Code:
Nature: Hasty
IVs: 12 Def
EVs: 252 Atk / 4 SpD / 252 Spe
This gives Shedinja 96 Def and 97 SpD which will work against the Porygons' download ability. For those who don't care for Download (such as in Ubers) and/or pass substitutes to Shedinja a simple Adamant or Jolly, 252 Atk / 4 Def or SpD / 252 Spe and regular max IVs would do of course :). That could be explained in the EV section.
Also, it isn't explained in the Baton Pass set why it is better for Shedinja to be Hasty over Lonely, although I'm not saying it shouldn't be. Shedinja hasn't been updated in a long time though, so uh yeah this probably isn't that much of a priority and would probably need a full update as well when the time comes ^^.