Pack, list and extract archives without surprises.
tar
List before extracting
tar tzf archive.tar.gz | head
Extract into a directory, not into yours
mkdir -p out && tar xzf archive.tar.gz -C out
Create without recording your own paths
tar czf out.tar.gz -C source .
The -C source changes directory first and the trailing . archives contents rather than the folder.
Exclude a noisy directory
tar czf out.tar.gz -C source --exclude='node_modules' .