Know the chemistry and pack design
Many current cordless tools use lithium ion packs. Older tools may use nickel based packs. The charger and battery should be treated as a matched system unless the manufacturer says otherwise.
Heat is a warning sign
Stop using a pack that becomes unusually hot, swells, smells odd, leaks, or has a damaged case. Damaged lithium ion packs can present serious fire risk.
Storage habits matter
Keep packs away from extreme heat and follow the maker's storage guidance. Avoid makeshift charging arrangements and damaged chargers.
Pack repair is different from simple maintenance
Opening a battery pack can expose high current connections and cells that require controlled handling. For many users, replacement or professional rebuilding is safer than cell level DIY work.
For general concepts, see battery reconditioning explained.