Extensions are generated inside an app repo, never a theme. shopify app generate extension asks for a type and a name, then scaffolds under extensions/.
Inside: blocks/ holds the Liquid entry points, snippets/ the partials they {% render %}, assets/ the CSS and JS, locales/ the translations.
A block's schema decides its kind: "target": "section" is an app block merchants place in sections, "target": "head" or "body" is an app embed.
AI tell: the retired --type flag (now --template), or running the command inside the theme.