Skip to main content

prompt

function

Declare reusable prompt text the user can drop into the composer. Put the result in the mod's top-level `prompts` array. It is text and nothing more: no model, no handler, no execution. An agent is the next step up, it binds prompt text to a model under a callable name. The same `Prompt` value can serve both, handed to `agent({ prompt })` and listed in `prompts`, so the agent and the user work from one wording.

function prompt(input: PromptInput): Prompt

Import

import { prompt } from '@modular/sdk';

Notes

example
```ts const commitStyle = prompt({ name: 'commit-style', description: 'Insert the commit message rules for this repo.', content: ` # Commit message Start with a bracketed area, for example `[terminal]`. `, }); ```
category
Authoring