All counsel fees, agreed upon by claimant and his attorneys, for services performed in matters before any workers' compensation judge or the board, whether or not allowed as part of a judgment, shall be approved by the workers' compensation judge or board as the case may be, providing the counsel fees do not exceed twenty per centum of the amount awarded.
In cases where the efforts of claimant's counsel produce a result favorable to the claimant but where no immediate award of compensation is made, such as in cases of termination or suspension, the hearing official shall allow or award reasonable counsel fees, as agreed upon by claimant and his attorneys, without regard to any per centum. In the case of compromise and release settlement agreements, no counsel fees shall exceed twenty per centum of the workers' compensation settlement amount.
77 P.S. § 998