{"id":"9383fe4e0fab09f4d039d69dc47c3b98c33dc5e13e19518739eabe226f96cce1","pubkey":"97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322","created_at":1782431058,"kind":30817,"tags":[["d","slash-commands"],["title","Slash Commands"],["alt","Nostr Implementation Possibility: Slash Commands"],["k","33318","Slash Command Manifest"],["client","NostrHub"]],"content":"A slash command manifest is a `kind 33318` which defines a command. Its `name` tag is the name of the command.\n\nOne or more `k` tags indicate what event kinds are monitored; one or more `h` tags indicate which [NIP 29](29.md) groups are monitored (if omitted, the command can be invoked anywhere). Clients SHOULD NOT surface commands to users outside a matching group/kind context.\n\nThe `param` tag indicates a parameter to the command, along with its label, type hint, and whether it's optional.\n\nA parameter's `type hint` may be `number`, `pubkey`, `topic`, or `relay`. This allows clients to provide auto-complete options or different inputs for parameters.\n\nCustom options can also be provided for any param by including an `option` tag with the parameter's label and an option.\n\n```typescript\n{\n  kind: 33318,\n  content: \"A command that generates images using an LLM.\",\n  tags: [\n    [\"d\", \"generate\"],\n    [\"k\", \"1\"],\n    [\"k\", \"9\"],\n    [\"h\", \"98d9s\"],\n    [\"param\", \"model\", \"string\"],\n    [\"param\", \"prompt\", \"string\"],\n    [\"param\", \"style\", \"string\", \"optional\"],\n    [\"options\", \"model\", \"GPT Image 1.5\"],\n    [\"options\", \"model\", \"Nano Banana Pro\"],\n    [\"options\", \"model\", \"Midjourney v7\"],\n    [\"options\", \"style\", \"illustration\"],\n    [\"options\", \"style\", \"photorealistic\"],\n    [\"options\", \"style\", \"miyazaki\"],\n  ]\n}\n```\n\nThis can then be invoked by typing a matching command (with optional client assistance). For example:\n\n```\n/generate <Nano Banana Pro> <An image of a turtle> <photorealistic>\n```\n\nArguments MUST be wrapped in angle brackets for unambiguous parsing.\n\nThe command string should be added to an event with one of the supported kinds, and MUST `p`-tag the command manifest's author.\n\nA monitor SHOULD respond immediately using an appropriate event kind for a reply, for example a `kind 9` with a matching `h` tag, or a `kind 1111` comment in response to a `kind 20` image post.","sig":"400a663532089cf86bf19a8f2c5d3544590d3311813c5537d6dbd849f9ae39f3531ec1914f20c194edb57bdefb808b590c5a08502dae8a674cbc4758dd907b3b"}