(a) enough technical skills to do a good job, possibly without the kind of peer review and supporting framework you would have as an employee
(b) enough business skills and awareness of "how the game is played" to handle the commercial side of things and deal with non-technical people working for your clients.
These probably depend as much as anything on working in a variety of environments, with a variety of teams, on a variety of projects. In the absence of other factors, like having taken a year out during a degree to work in industry or being a long-term contributor to a major OSS project in your spare time, I'd suggest doing at least 2-3 different jobs as a permie before looking too closely at freelance work, even if you only stay for a year or two at each. This will probably be enough to start to figure out for yourself what works and what doesn't on real projects, and to understand how technical work fits into the bigger picture, and most importantly to figure out a huge amount of stuff you didn't know yet when you graduated and how to continue your professional development indefinitely under your own direction.
Obviously some people do go independent much earlier, but IMHO this is almost always a mistake. Lacking the kind of context and supervision that would broaden horizons and fill in missing understanding when employed as part of a team, premature contractors often don't even realise how bad they are and become textbook examples of the Dunning-Kruger effect. While many still earn enough as journeymen to pay the rent, most will never realise the potential they could have had if they'd spent a bit longer learning from others before branching out.