code: @Pure
  	public static <S extends Capacity> S castInternalSkillReference(Agent agent,
  			ClearableReference<Skill> reference, Class<S> type) {
  		return agent.$castSkill(type, reference);
  	}
docs: Casts the internal skill reference of an agent.
  
  @param <S> the type of the capacity.
  @param agent the agent.
  @param reference the reference to cast.
  @param type the type of the capacity.
  @return the skill reference
  @throws UnimplementedCapacityException if the agent has not a skill for the given capacity.
  @since 0.6