A common topic on Stack Overflow (and possibly many other places) is developers looking for some measure of their skills. Many ask what they should learn next (or learn first), some ask what they should do for a job search or an interview, some simply and directly ask how they can know how good they are at what they do. (My personal favorite, and I'm currently having no luck finding a link, was when somebody asked if it was possible to completely master a programming language. Most of the responses were similar to what I am about to write, but one was simply the word "Yes" linked to Jon Skeet's profile.)
It's a natural question, really. Humans have a psychological need for positive reinforcement. We want to know how good we are at something, most specifically in relation to how good other people are at that something. We want to be weighed and measured in the hopes that we can pin a badge on ourselves demonstrating that we're experts at this and that. Hell, there's an entire industry of certifications and courses built around this. And I've certainly met a fair amount of people who cling to those certifications as ironclad proof of their superiority in the field. (After all, if Microsoft says you're good at something, then you must be, right? Why else would they be willing to sell you the course materials over and over again every time they release a new version of something that they also sell you?)
But it's relative. We all know the old saying: "The more you know, the more you know you don't know." It's a popular saying because it's essentially true. So true, in fact, that the most common answers I see to such questions as above are that as long as you're striving to improve, you're good. It's only when you believe that you've mastered something and that you have no room for improvement that you should worry. No matter how good you get at something, you should always be aware of your limitations. It's not entirely necessary that you have the ambition to overcome those limitations, so much as it's necessary that you be aware of them.
We've met the people who thought they were the top dog. Hell, I've been that person. Back when I worked at a state job, I was the man in terms of software development. I knew my stuff, I was up to date on technologies, I was the hot shot codeslinger. I had what I now refer to as "big fish in a small pond syndrome." It was a state government job, it presented no challenges or growth. There was no evidence that my skills were lacking or reason to improve. The job I took after that corrected this syndrome. The pond, the size of which being measured by the overall skill and talent of my fellow developers, grew and grew and grew. (It eventually tapered off and I found myself needing to expand and take upward flight under my own strength, which led to my seeking a new job again, but that's another story. Still seeing how that's playing out.)
I've discussed this with Tony a few times as well. He's mentioned that the team at his current job as a big fish in a small pond. Some developer who is "the senior developer" for no other reason than he's unopposed. He's not really skilled, but until Tony got there he had no means to measure his skills against anybody else. Recognizing this in the professional world, Tony now finds himself wanting to be the smaller fish in the bigger pond. This is because our skills are relative. You only know how good you are at something when standing next to someone who's better. (American Idol auditions notwithstanding.)
So, to really answer the question of "how do I know how good I am at something?" is to find someone who's better at it. Learn from them. There is no certification or online test that can measure you quite so well as you can measure yourself when you work with someone more knowledgeable or more experienced. Keep in mind that the business model of certification courses isn't to make better developers, it's to sell certification courses. Online tests (the kind I loathe when required by a hiring manager) don't actually test your ability to perform on the job, they test only your ability to take online tests. Unless you're interviewing to be an online test taker, they're not particularly applicable. (Though all too often they're a necessary evil to get past the first line of defense in an interview process. Even though the code seen in such tests is generally the kind of code a qualified candidate would run from screaming rather than choose to support as a career.)
If you believe yourself to know all there is to know on a subject, that's a bad sign. The more you know, the more you know you don't know. Or, as I once saw it comically expressed online somewhere: "When I graduated high school I thought I knew everything. When I graduated college I realized I didn't know everything. When I received my Master's Degree I realized I didn't know anything. And when I received my PhD I realized that it's alright because nobody else does either."