Prep the salmon: Drain canned salmon well. Remove large bones and skin if desired, then flake into a mixing bowl. If using cooked salmon, flake it into small pieces.
Mix the base: Add pesto, Parmesan, almond flour, eggs, green onion, lemon zest, garlic (if using), salt, pepper, and red pepper flakes to the bowl.
Stir gently until the mixture just comes together.
Check texture: The mixture should be moist but hold its shape when pressed. If too wet, sprinkle in a little more almond flour. If too dry, add a teaspoon of pesto or a splash of olive oil.
Form patties: Divide into 8 small cakes or 6 larger ones.
Press to about 3/4-inch thick for even cooking.
Chill briefly: Place patties on a plate and refrigerate for 10–15 minutes. This helps them firm up and sear cleanly.
Heat the pan: Warm a large skillet over medium heat. Add 1–2 tablespoons of oil and swirl to coat.
Sear the cakes: Add patties in a single layer without crowding.
Cook 3–4 minutes per side until deep golden and crisp, adding more oil as needed. Adjust heat to avoid burning.
Finish and serve: Transfer to a plate. Squeeze with fresh lemon and serve with lemon-garlic mayo or a dollop of extra pesto.