Dont be precious about credit or glory let them have it. They know they owe you.
Pay attention to their safety. Stop them doing the wrong thing: move sharp objects out of the way, redirect them. This is most effective if you can make it their idea.
Note what is not on this list: delivering to your own KPIs. That is just expected. If you do, you have done no more than your job. Your boss will like it but not particularly notice it.
People will say this is too Dilbertesque: that not all bosses are pointy-haired idiots. Indeed they are not, but what we are describing here is simple human nature. Even the nicest, most caring, most enlightened boss cannot help but subconsciously favour the person who made their job easier.
Besides, there are way more managers positions than there are good managers.
Look after your organisation Management Management may manipulate um manage your boss to protect your own interests, but those interests must also align (to some extent) with the interests of the organisation. The more they dont, the more you travel into areas which are ethically or legally questionable.
Secondly, as you work with your boss you have a responsibility to look at their actions that are not initiated or encouraged by you but nevertheless you are aware of them or a party to them. Is your boss doing what is good for the entity? At some point you have a responsibility to escalate an alert, but first try to redirect them as above.
Connect to them
Accept the reality: your manager is seldom going to come to you. You share their attention with how many other direct reports? Add in their peers, their boss and their customers and you can see you have to go get attention.
For a small number of you, you get on well with your manager as human beings: you have a friendly relationship. For the rest, in order to engage with your manager you may need to study up on communication models how to connect.
There are several systems to better understand how to relate by profiling your manager (see my article on profiling). Take your pick from DISC®, Herrmann Brain Dominance Instrument®, personality colours (red, green, yellow and blue), or Myers-Briggs among others.
Also study up on situational leadership. This has four modes of interaction: directing, coaching, supporting, delegating. Which mode is your boss in when dealing with you, and where do you want them to be? If there is a mismatch you can talk to them about it, and/or try to manage them into your preferred mode.
Developing your negotiation skills wont hurt either.
And finally steep yourself in business understanding and language. I did it by subscribing to the Economist and the McKinsey Quarterly for several years.
There are those who see this as sucking up. If you see your role to be one where you do not co-operate with your boss, or you actively work against them, then you are in the wrong job. You are employed to be an effective agent of the organisation. For good or ill the organisation has decided that your boss is the one to direct you in that. Your goal should be to maximise the personal benefit of working for the organisation whilst also meeting the needs of that organisation. That benefit will be best when your boss sees you as their most valued employee.
You can change the system and you can work around your boss. But you will be more effective if you can manage your boss than if you are their biggest problem.
Rob England is an IT industry commentator and consultant, and nascent internet entrepreneur, best known for his blog The IT Skeptic. For a more facetious version of Management Management, see Robs satirical book "Introduction to Real ITSM" to learn about Keeping Away From Sharp Objects, Mopping Up The Mess, and Playing With The Car-keys.