Always act to increase the survival chances of the largest group you are a part of.
Always
The universal quantifier is somewhat suspect outside of pure mathematics. I do mean always. However, sometimes you do not care to make a distinction, or to pursue the fine grained nuances of a particular action. That's okay, it is better to act and course correct than get caught in paralysis of analysis.

act
Thought without action does nothing. Publication is action. Discussing it with friends is action. Discussing it heatedly may or may not be action depending on who you are discussing it with, how many times you have had this particular discussion (no matter which person you have had it with), and how long you have been discussing it. Thinking about it, making lists, journaling is almost always not action. I am not discouraging either journaling or meditation: sometimes when logic fails to identify a path, journaling or meditation can.

to increase
I've argued with myself about this one and I go back and forth. Should it be "ensure the survival" or "increase the survival chances"? Today I chose "increase" but don't let that be an excuse for lax analysis. Note that some paths in the short term decrease the probability of survival only to increase it in the long term.

the survival chances
We could argue morality forever. One purpose for this site is to show that, survival can be a decent basis for ethics given the correct context.

A point here: "survival of the fittest" is more often misunderstood than not. Darwinian evolution doesn't have a ladder with one species higher or better than another; there are niches which can support life and species evolve for their niche. No species, humankind, whales, dinosaurs or bees, is "better" than any other according to evolution, only more fit for a given niche.

It is not only okay, however, but required to work for the survival of your group.

It's worth noting that death is part of life. Any attempt to deny death, for individuals, for groups or even the universe leads to faulty analysis.

of the largest
If I am a Hatfield and you are a McCoy, we still belong to the group of human beings, to the group of living beings and to the universe.

Maybe the conflict between Hatfields and McCoys threatens the existence of human beings (Uncle Caulfield McCoy has hatched a particularly nasty virus in his still out back and would rather wipe out all of humanity than let those dratted Hatfields exist.) Maybe the feud has wiped out so many that there are no longer any cousins left to continue the clans.

In all cases we owe our allegiance and survival efforts first to the largest group we identify with. If that survival is totally ensured or there is no possible way we can affect that survival, then we can devote our efforts to the next largest group, and so on.

group
The smallest possible group is a group of one. The survival of a smaller group is an appropriate goal when the survival of the larger group is assured.

Individuals live relatively short lives on any kind of time span other than our own egocentric one. It is possible to extend individual life span but the extension still pales by comparison with cosmic time scales and may take resources from others who could better extend the survival of a larger group. You are going to die anyway, why not identify with a group and work for it's continuation?

Before the mathematicians out there start quibbling too much, I do know that the smallest possible group is actually an empty group. However it has no members to act for its survival, and, at least mathematically its survival is assured, because even if there is nothing, the empty group still exists.

you
Who other than you can make the distinction? We each bring different perspectives to the party. It is part of humanity's strength that we both reconcile and distinguish these perspectives. Sometimes you will see an answer from your perspective that I'm incapable of seeing from mine.

are a part of.
I've mentioned some groups above, Hatfields are human beings as are McCoys. Republicans and Democrats, Buddhists and Christians, men and women, New Yorkers and Angelenos are all human beings. We have kinship with all living things; animals and plants. Extend that kinship to the earth, soil and rocks. Be large in your analysis.

There will be intervening groups in your analysis. Buddhists and Christians are a part of religious humanity and then are a part of humanity. All this contributes to the depth of your analysis and decision. No need to be nitpicky about the definition of your groups; just enough definition for action.

You may be a part of two overlapping groups with conflicting agendas. In that case you need to work for the survival of the commonality of the two groups. Even New Yorkers and Angelenos have some commonality. Find it and work for the survival of that group.