Empathy. That is it!
You can argue that knowing fundamentals of computer science, reaching some level of expertise in a select few programming languages, or delving deep into software architecture are some of the hallmarks of a great software engineer, and single one of those as the most important skill to have. You might argue that writing code is the easy part of software engineering, and that soft skills such as communication and collaboration are paramount, and that knowing what to build in the first place is more important than how you end up building it.
After half a decade as a professional software engineer, I tend to agree more with the second premise. I believe that the single most important skill for software engineers is actually empathy. Empathy for your users. Empathy for your team. Empathy for yourself.
Empathy for users
The primary role of a software engineer, in my opinion, is to solve their users problems using software. Hence, it is primordial to have the ability to put oneself in their users' shoes to understand their issues and challenges, and figure out how software can help solve those needs. By fully empathizing with user, we, as software engineers, can truly understand their needs and ultimately build better products.
Empathy for users doesn't just stop there. It also involves having empathy when users make mistakes. It is far too easy to just brush user mistakes while using tools we built as a "user problem", and dismissed those mistakes as the user just not being "tech savvy" enough. I am using euphemisms here, but you get the idea. And truth be told, I used to think in a similar fashion myself. Some users are just not smart enough and are using my product wrong!
Not only is that approach arrogant and pedantic, but it is also plain wrong. If users make mistakes while using your product, it is because the product is allowing users to make those mistakes. Instead of attributing them to some limitations on the user side, empathize with the users and use that opportunity to improve the software you've engineered to meet their needs. All user issues are ultimately product issues.
Empathy for your team
Software engineering is quite akin to a team sport. You can only achieve so much on your own, and collaboration is key to successfully meeting your users' needs.
Code is read far more often than it is written. Hence, show empathy towards your fellow teammates optimizing for readability over "cleverness". Self-documenting code doesn't exist. Empathizing with your teammates means putting yourself in their shoes when they might need to maintain or build upon your code. Therefore, make sure that you have good documentation about your code. In a similar vein, testing your code is a gift not only to your teammates, but also to your future self!
With collaboration, sometimes come conflicts. Always assume good intent when interacting with your fellow teammates. Take the time to listen their point of view and understand their reasoning. This is also true when reviewing pull requests. Empathize with your teammates and make sure your comments are always an opportunity for better understanding or for growth.
Empathy for yourself
Finally, have empathy for yourself!
Despite software engineering being about, well, engineering, it is still a relatively young discipline and we lack a lot of the abstractions that other engineering profession rely upon. For example, when building yet another bridge, there is a clear and common understanding of all the forces and constraints in place, and how to make sure the bridge won't collapse. Unfortunately, we don't have such abstractions yet, which makes it fairly difficult to write bug-free code. Therefore, see mistakes that you make in the course of your career as opportunities to grow!
Software engineering is an industry that is always evolving. It is far too easy to feel like you don't know enough and that you need to keep up to date and learn the latest framework or programming language. If we pair this with the previous point of lacking abstractions and having to constantly reinvent the wheel, this can inevitably lead to burn-out, so please watch out! Another common issue within the software engineering industry is impostor syndrome where you feel like you are not as competent as others may think of you. Have some empathy for yourself, and be comfortable with not knowing. If you truly were incompetent, you most likely wouldn't have made it that far!
Empathy. That is it!