Islam is a way of life, and in no way a weekly mosque visit that cleanses your sins.

We should repent before the actual sin.
If we didn't then we should repent immediately.

Any visit to the mosque has nothing to do with it, to repent is a personal issue, that has nothing to do with anybody other than the sinner themself, it's between them and God, a direct relation.