I doubt if your manager really had to miss the meeting to put out a fire. It feels like things were set up so that your skip-level manager could upbraid you about your work. One possibility that does explain it satisfactorily is that your manager was promoted recently into people-management, and your skip-level manager is still handling some of the performance management conversations. If this is not the case, this is something of a red flag.
In the same vein, it's very unusual for your skip level to have a meeting about this and talk about design, code etc. People at that level typically do not get involved in things at this level: in fact, your manager is the one who will have a lower-level involvement.
Alternately, your immediate manager is leaving or being fired and your skip-level manager is taking stock of what he's going to have to deal with in the near future.
In either case, it does not look like a good situation. You should interview aggressively and take a new position, even if you really are at fault. Impressions of someone as a bad performer almost never go away, and it is rarely worth the effort to stay to fix that impression. You are better off being able to get a reasonable reference while things have not escalated.
In the same vein, it's very unusual for your skip level to have a meeting about this and talk about design, code etc. People at that level typically do not get involved in things at this level: in fact, your manager is the one who will have a lower-level involvement.
Alternately, your immediate manager is leaving or being fired and your skip-level manager is taking stock of what he's going to have to deal with in the near future.
In either case, it does not look like a good situation. You should interview aggressively and take a new position, even if you really are at fault. Impressions of someone as a bad performer almost never go away, and it is rarely worth the effort to stay to fix that impression. You are better off being able to get a reasonable reference while things have not escalated.