The easiest way would be to do the duplicacy check in the stored procedure or query for inserting the record.
For example:
IF(NOT EXISTS(SELECT 1 FROM Skills WHERE skillname=@SkillName AND parentskill=@ParentSkill))
BEGIN
//insert logic
END
ELSE
BEGIN
//show duplicate exist msg
SELECT 'Duplicate exists'
END
Now you can check if the query/stored proc returns anything then it has failed inserting and need to show the duplicacy message and if it succeeds, it means it will return nothing.
Hope, it helps :)