If you use the skill book from the menu, you can't know who to apply it to. If you require it to be used from the battle menu, you would need to add some stuff to Game_Battler_3 I think.
Here is how I worked around the problem. You could also skip the items and just have the merchant apply the skill directly to the character in question.
1. Create the skill. I assume you will use skill 1 for the example.
2. Create the item you want in the database.
Name: Skill Book: Fancy Skill
Icon: Whatever
Description: Use to teach one character the "Fancy" skill
Target: None
Usability: Menu
Common Event: 001 (blank right now)
Consumable: Yes
3. Create a common event to back up the skillbook (use event 001 to match the item in this example).
<> Message: Who will learn the skill "Fancy"?
<> Show Choices: \n[1], \n[2], \n[3], \n[4]
: [\n[1]] Handler
<>Conditional Branch: Hero [1] in the party
<>Script: $game_actors[1].learn_skill(1)
<>
:else handler
<>Change Items: [Skill Book: Fancy Skill] + 1
<>
: [\n[2]] Handler
<>Conditional Branch: Hero [2] in the party
<>Script: $game_actors[2].learn_skill(1)
<>
:else handler
<>Change Items: [Skill Book: Fancy Skill] + 1
<>
: [\n[3]] Handler
<>Conditional Branch: Hero [3] in the party
<>Script: $game_actors[3].learn_skill(1)
<>
:else handler
<>Change Items: [Skill Book: Fancy Skill] + 1
<>
: [\n[4]] Handler
<>Conditional Branch: Hero [4] in the party
<>Script: $game_actors[4].learn_skill(1)
<>
:else handler
<>Change Items: [Skill Book: Fancy Skill] + 1
<>
The magic is in the "$game_actors[
Character Number].learn_skill(
Skill Number)" Script snippet.
The number in
dark blue is the number of the character you want to learn the skill.
The number in
dark red is the number of the skill you want to grant. The "learn_skill" code won't let you add a skill you already know. It will consume the book with no effect.
in this example if you select a character that isn't in the party, you just get the skill book back. This example assumes you have up to 4 characters in the party.