The million-dollar view of the Manhattan skyline was wasted on Nolan Gutierrez.

He cared only about the danger lying at his feet: a missing railing atop an 11-story luxury condominium building under construction in Brooklyn. All that kept a distracted or careless worker from falling was some flimsy yellow hazard tape.

Mr. Gutierrez, a New York City construction inspector, shows up without warning at major construction sites to conduct spot safety checks. He is part of a new SWAT team of inspectors who swoop in to ferret out any safety lapses, often leaving behind frayed nerves and a stack of violations that can bring hefty fines or even stop the work.

The surprise inspections are New York’s most aggressive effort to tighten oversight of construction sites after a surge in worker injuries as the city undergoes its biggest building boom in more than half a century.

Construction injuries soared by 61 percent to 761 last year from 472 in 2015, according to city data. Construction fatalities, however, remained constant at 12 a year during that same period.