Go for a counter offer.
Skills talents are the problem NOT the salary. Don't trust HR people, they may keep something for themselves. Don't let that happen.
It's called a compensation,, you go there and 8 hours of your time , not always you will be doing what you like or what you really want to do.
At the end , you will be solving their technical matters to reach organization goals. This is my passion and what I love , is true if you are a SE-1 or SE-2
position. But if you are at the middle of your career ladder to climb into an staff engineer from Lead Engineer or something, then it's all about how you manage your time and direction to met the company goals.
If you are similar at my situation read this book:
https://www.amazon.com/Staff-Engine...+engineers+pa,stripbooks-intl-ship,367&sr=1-1
At the Tech Lead or Staff Engineer level, what company expect from you is not working as a teach ninja, But drive the engineering practices and improve quality to met organizational goals. That's why they hire you. So negotiating the compensation would not be an issue at all.
So the answer is go for a counter offer.