In a food processor, pulse 3/4 cup of the peanuts with 1/4 cup of the flour and the salt until the peanuts are very finely ground. Transfer to a large bowl. Repeat with another 3/4 cup peanuts and 1/4 cup flour. Coarsely chop the remaining 1/2 cup peanuts and place them in another bowl.
In the bowl of an electric mixer fitted with the paddle, beat the butter and sugar on medium-high speed until creamy but still gritty, about 2 minutes. Beat in the egg yolk and vanilla. Reduce the speed to low and beat in the remaining 1/2 cup flour, then the peanut flour, and finally the chopped peanuts.
Transfer the dough to a gallon-size heavy-duty resealable plastic bag and press it into a 1/2-inch-thick rectangle, squeezing the dough all the way to the bottom and sides of the bag. (The rectangle will be about 3 inches shy of the top.) Seal tightly and refrigerate until very firm, up to 1 day.
When ready to bake, preheat the oven to 350°F. Line several baking sheets with parchment paper if making cookies. Cut open the bag and peel off the dough.
If making cookies: Cut the dough into 1/2-inch dice. Place on the baking sheets, spacing them 1/2-inch apart. Sprinkle the tops of the cookies with a little fleur de sel if using. Bake until golden brown, about 15 minutes, rotating the sheets half-way through. Cool cookies completely on the sheets set on wire racks.
If making tart shells: Roll the dough between sheets of lightly floured parchment paper to an even 1/8-inch thickness. Use a 6-inch round cookie cutter to cut out rounds. Gather and reroll the scraps to cut more rounds; you should have 8 total. Carefully transfer the rounds to 4-inch round tart pans with removable bottoms, pressing the dough into the bottoms and up the sides. If necessary, trim the edge flush with the rim of the pan. Sprinkle with a little fleur de sel, if using. If the dough has softened, refrigerate again until firm. Prick the bottoms with a fork then bake on a baking sheet until brown, about 15 minutes. Cool completely in the pans set on a wire rack.