Most jobs remain safe, of course. But even people who feel immune sometimes get that heart-stopping tap on the shoulder. “There’s a feeling of insecurity,” says financial planner Janet Briaud of Briaud Financial Planning in Bryan, Texas. “Clients say, ‘It’s still good, but it might get bad so I need to be prepared’.”

Surprisingly, planning isn’t much different whether your job is tenuous or not. First, secure your base, so a turn of fortune can’t wipe you out. Only then is it safe to stretch for extra spending and investments. Here’s a primer for the times:

Your home. If you missed the recent refinancing boom, when 30-year mortgage rates fell to an average of 7.2 percent, keep an eye on the news. Everything’s easier when your mortgage payments drop, and your chance may come again. Even now, with rates at 8.3 percent, it pays to refinance a loan that costs just 0.5 percent more, if the lender charges zero upfront.

You’ll save even more by choosing a 15-year loan. It carries a lower interest rate (averaging 7.9 percent today), which you’re charged for fewer years. Because of its shorter term, however, you pay more each month than you would for a 30-year loannot a smart buy when your job’s at risk. Instead, consider a 30-year loan with no prepayment penalty, advises planner Daniel Roe of Budros & Ruhlin in Columbus, Ohio. That gives you flexibility. As long as you’re working, you can make larger payments each month to retire the loan as fast as you can. And you have the option of dropping back to lower payments if you’re fired.

Your company might give you up to $50,000 in term insurance free and let you buy more with payroll deductions. But you can’t keep that policy if you’re firedbad news if you develop an illness that makes you hard or impossible to insure. To maintain coverage, you’d then have to convert the company insurance into an individual policy. Typically, you’d pay through the nose.

A smarter move is to buy life insurance outside the company while you’re still healthy, says planner Michael Martin of Financial Advantage in Columbia, Md. At the age of 40, a $200,000 annually renewable policy from First Colony Life costs $180 a year for a female nonsmoker and $196 for a man.

Cut out new spending and repay debt as fast as you can, especially if you feel a pink slip blowing your way. You’ll save a lot of interest expense. If you’re fired and need cash to live on, you can always borrow again.

Your savings. Keep paying into your company retirement plan. That saves taxes and may also generate extra employer contributions.

For quick cash, take a new view of the traditional rule of thumb. You’re supposed to have an emergency fund that covers at least three months’ worth of expenses (six months’ or more if your job might vaporize). But your “fund” doesn’t have to be money in the bank. In fact, bank savings are better used to pay down debt. For emergencies, arrange for six to 12 months of instant borrowing power. That means credit lines tied to your checking account and credit cards, plus a home-equity line if you own where you live. (Credit lines are no help, of course, if they’re already borrowed to the max.)

Your company health insurance. If you’re lucky enough to have a spouse with a company health plan, find out how fast you could switch to it if you lost your job. Alternatively, you’re entitled to COBRA benefits if your firm employs at least 20 people. COBRA lets you carry your current plan for as long as 18 months, at your expense. You have 60 days from your termination date to sign up.

Your college kids. If your income drops, call the student-aid office. Colleges rarely reduce tuition but may offer loans to help you cover the rest of the year. After that, you should reassess, says planner Bert Whitehead of Cambridge Advisors in Franklin, Mich. Don’t wreck your retirement fund to keep your kids in an expensive school.

Your tax-deferred retirement plan. In general, here’s what you’re up against if you leave your job:

(1) If you’ve borrowed against your 401(k), a few companies give you time to repay. Most, however, want repayment on the spot. If you don’t have the money, the loan becomes a taxable withdrawal, subject to the 10 percent penalty if you’re under 59 1/2. Consider clearing this debt by tapping your home-equity line of credit (the interest would be tax deductible).

(2) You can usually leave your 401(k) with your ex-employer. That gives you investment stability, which is one less thing to worry about while you’re looking for another job.

(3) If you use up your cash and credit and have to break into your 401(k), roll it into a new Individual Retirement Account at a bank or mutual-fund group. Put it in the IRA’s money-market fund, which is stable and safe, and withdraw a little bit every month to help cover your bills. When you’re working again, any remaining IRA money can be redeployed for growth.

Vultures cluster around employees who leave a job with a pot of money. Take Norman Nevins, 57, who was laid off last month by BASF Corp. in Milford, Ohio. BASF’s manager of human relations handed him a packet from a local investment adviser, touting tax-deferred annuities.

“A terrible idea,” says his present adviser, Michael Chasnoff of Advanced Capital Strategies, in Cincinnati. Had Nevins bought (paying a $6,300 sales commission), he might have immobilized his money or subjected himself to high withdrawal penalties. BASF didn’t authorize the solicitations. It was a personal gesture, meant to be helpfulbut one that could have led to trouble. Risks like these are the very best argument I could make for leaving your 401(k) money in the company plan.