Thanks for your query.
Do you have respiratory distress
too along with that sensation you are having under rib cage
?May be you are having asthmatic attacks.Please get a clinical checkup from a pulmonologist.Get a PFT done.
For such attacks take inhaled levosalbutamol
Are you having fever too?If you are having associated respiratory tract
infection then it needs to be treated too.
Hope this helps.
Update here how you stay.