Explain why you're doing something. Don't leave them wondering, whether it's a consequence or whatever.
Don't impose preferences or sanctions that leave them howling with rage. Protest, yes, but don't give them a sense of their powerlessness. They need to feel their decisions matter.
Don't go soft on consequences of unkindness. If they've bashed someone and the person is hurting, they can't run off. They have to witness the consequences and experience a bit of the righteous indignation you would have for then in if the tables were turned.
Encourage whatever bent for diligence and kindness they have. If they like pets, watch pet rescue and discuss how/why the animals came to be in that state. Discuss what changes they'd make it they were in charge. Discuss the good causes people might fight for. Create a link between independence, power, justice and kindness.
Encourage a vocation, but don't hold them to it.
Avoid addictive habits. These curtail the development of other skills, rewards and conscience. Same for food.
Read. Stop and talk about why characters make choices. Get into the habit of drawing a line between bad decisions and hurt/fear/greed and discuss the consequences. Admire admirable behaviour.
Nurture relationships with role models.
Tell stories of heroes and discuss what it may have felt like to carry that out. Recognise that goodness doesn't feel fun at the time. It feels like sacrifice or endurance.
Don't impose your moral preferences on them before they're developmentally ready. A child too small to share will not learn to share by being forced before they understand it. They will learn be being obliged to reciprocate when they can understand what they're doing.
Watch what conversation they overheard. Decent children overhear kind, decent adults.
Treat them decently.
Invest time. Decent people know they are valuable and worth spending time with. They don't need to act out to get attention.
Accept that decency looks like many different things. There are very courteous people, very cantankerous people, people who are not terribly agreeable, very non relational people - all or none may be decent. A well behaved people pleaser may look decent but you want to aim for a decent version of themselves so don't censor them to fit your ideas.
No such thing as perfection. Model growth.
Apologise if necessary. It's the decent thing to do.
Prioritise values you'd like them to have as a family. Whether that's volunteering, donating, investing time, watching documentaries and learning, celebrating key events that are correcting injustice.
Introduce empathy at the earliest stage by modeling it and then talking about it. Give emotions language so it can be processed without judgement. Being angry is fine. Yelling is helpful to no one. A lot of decency is self regulation or knowing what to do while waiting for self regulation.
Decency is easier for a child who is not struggling just to survive and get basic needs met. A child who is frightened, bullied, scorned, exhausted, bewildered is not in a good place to develop a moral compass. Ultimately it might lead them to a kind adulthood of course but you're aiming for an adult who grew up well because of their childhood not despite it.
Recognise their time is valuable and their thoughts matter. Encourage interests. Excessive amounts of time with no direction and screens won't produce a person who has a sense of their worth or how much they're needed.
Introduce tasks that require diligence and duty an a very early stage. Point out how these are kind habits. If possible make these consistent with their interests. I had a child who loved dusting. Another who loved feeding the dog. The point is that life must contain the rituals of love.
Answer their questions carefully. They're listening.
Admire volunteers, not rich people.
Encourage them to self identify as strong and kind. Tell them. Tell others. One of my children was going through an experience that made him very very frightened. One day he pointed out that something near the aga was smoking. I got him a hero trophy because he had saved the house from burning down. He loved being a hero stuff grew in confidence.
Laugh. It's so important. You're aiming to demonstrate why the norm - a stable, meaningful, worthwhile life - is ultimately worth it. It needs to be the normal that feels familiar and right, albeit with frequent learning, rupture and repair.
Be uncompromising with penalties for unkind behaviour. Never punish to the point of fear or excessive frustration, just show it's a bloody big deal. Unlike the time they scored an own goal, cut their own hair or drew on the walls with a lipstick. Those are not important.
Every now and again we all do something horrifying. A child brought up carefully will probably be appalled at what this says about them. As much as you make a big deal of it, make it very clear from the outset that this hasn't altered your perception of them. That's not going to change. You already know its not something they'd want to repeat. Part of being decent is not writing yourself off as a hopeless case. It helps no one. No one lives well out of a sense of shame.