A tangle of spaghetti with a shot in the arm. Thank you, Pati Jinich.

Pantry pasta is a fulfilling, dependable dish. You take staples like spaghetti, garlic, olive oil, and dried hot chile flakes and fuse them into quick, easy sustenance.

Trouble is, those standbys occasionally swerve into a meal so boring my eyes loll back into my skull. We all need a jolt sometimes, right?

A few years ago, a recipe in Pati’s Mexican Table capsized what had become my ingrained method of cooking pasta with garlic and olive oil. I was intrigued by the recipes in Pati Jinich’s book—a combination of homey Mexican dishes, like pinto bean soup and chilaquiles in red salsa, alongside gently Mexicanized American classics, such as chipotle mashed potatoes and roast turkey marinated with citrus and achiote paste. Jinich’s cooking is a reminder to readers that borders are fluid. Ingredients and techniques cross nations and continents; people do the same. That kind of thinking—and cooking—is a humanizing beacon during these discouraging times, when the hopeful essence of the United States’ potential seems to be in jeopardy.

Jinich’s own recipe for pasta with garlic and olive oil features two simple, profound additions: mild, fruity dried Mexican chiles and strong fresh herbs. Her tangles of spaghetti breathe with a kind of worldliness. It is as if they have taken a sabbatical across central and northern Mexico, acquiring an obsession with guajillo chiles and oregano during their wanderings.

There is flexibility to nearly every component of the dish. The original recipe asks for guajillos, those gentle dried chiles that are one of the most common dried chiles in Mexico. You could also use dried New Mexican or Californian chiles. I have. On the page, Jinich calls for a small handful of big-flavored, chopped fresh herbs: rosemary, thyme, oregano, and marjoram. I have used a different permutation each time I make this pasta. Sometimes two of the four, and always in varying proportions. I insist on marjoram being there. Because I am a marjoram obsessive. Your blueprint: Use at least two different herbs. From there, the ratio is yours. Only mildly interested in rosemary? Use less of it and more of the others. You get the idea.

The cooking itself is seamless. First you add the pasta to salted boiling water. You then warm olive oil until it ripples, and add chopped garlic. In seconds, when the scent of garlic becomes incontrovertible, you toss in finely chopped dried chiles. Suddenly, the smell shifts from hot and garlicky to warm and chile-fruity. Quickly, the chopped herbs go in; the air blooms with musk and pine and sweet greenness. The drained noodles and a gurgle of pasta cooking water are slipped into the skillet and the lot is tossed until a slippery sauce coats the pasta.

If you like, add a grated salty cheese. Pecorino, Cotija, Parmesan. One in that vein. Add some chopped parsley, too, if you want more verdant lift. The result: Italian at the core; Mexican in spirit. Some might call it fusion. I call it smart, modern cooking.