- Keep your existing accounts open
- If you have no existing credit in the US, get some
- Pay off your bills on time
- As a last resort, talk with American Express
Keep your existing accounts open
If you have existing cards and bank accounts, do not close them all before leaving the country or while abroad. If you do not use the account for months, it may be marked as inactive, and will not be a benefit, so be sure to regularly use your credit if you have it.
Set up a line of credit
If you don't have a credit card (maybe you went abroad prior to turning 18, or your left the US with bad credit and couldn't get a card, relied on debit, or never needed one), then you can apply for a secured credit card which can be obtained with a US bank account and address and a bit of capital.
Pay off your bills
Since you need to use your cards regularly, make sure you pay off the resulting debt that comes from using the cards regularly. Late payments and carrying revolving debt can lower your payment (especially if the debt is a large portion of the credit limit you have across all cards), so making small regular payments may be preferable.
Consider American Express
According to this 2007 article citing an American Express spokesperson, American Express will consider an existing relationship with them in another country when applying for a credit card in the US, even with a lack of US credit history:
Alfonso reassures existing card members that American Express would do everything in its power to make the transition seamless. A new application doesn't negate a previous relationship, she says.
...
Alfonso says that at American Express, every application is evaluated case by case, even when an American credit report is not available. "We definitely want to be able to establish income verification from a reliable source," she says. "But every application is evaluated on its own merits. It is not one size fits all."
This may apply to other international banks (like Citibank or the like) which issue credit cards in both the US and your country of residence, so you may consider asking when considering which cards to apply for.