Proteins regulate a wide range of biological processes inside and outside cells by binding to specific molecular partners. In recent years, short peptides that can selectively recognize disease-related proteins have attracted attention as compact molecular tools for biosensors, diagnostic technologies, and drug discovery. However, how such small peptides recognize different proteins depending on their surrounding chemical environment has not yet been fully understood.