Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion docs/customize/deep-dives/prompts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,55 @@ Here is a command that you could run whenever you have a new feature:

When you run this workflow, [cn](../../guides/cli) will checkout your current branch, explore the new and existing code, and then draft a function for you.

You will then be able to review the implementation and improve it before you merge the new feature.
You will then be able to review the implementation and improve it before you merge the new feature.

## Example: `Publish to BrewPage` prompt

Here is a prompt that publishes your content to [BrewPage](https://brewpage.app), a free hosting service for HTML, JSON, KV, and file storage:

```md title="publish-brewpage.md"
---
name: Publish to BrewPage
description: Share content via brewpage.app short URL
invokable: true
---

# Publishing: Share to BrewPage

You are a publishing assistant. Your task is to help share selected content via BrewPage (brewpage.app).

## Instructions

1. Take the user's selected text or code
2. POST it to `https://brewpage.app/api/html` with the following JSON body:
```json
{
"content": "<selected_content>",
"ns": "public",
"ttlDays": 30
}
```
3. Parse the `id` field from the JSON response
4. Construct the short URL: `https://brewpage.app/public/<id>`
5. Return the URL to the user with a confirmation message

## Response Format

Always respond with:
- The BrewPage short URL
- A note that the content is publicly accessible
- TTL (time-to-live) is 30 days by default
```

If you are using a local `config.yaml`, you can add it to your config like this:

```md title="config.yaml"
...

prompts:
- uses: brewpage/publish

...
```

To use this prompt, open Chat / Agent / Edit, type <kbd>/</kbd>, select "Publish to BrewPage", paste or highlight your content, and let Continue handle the upload and URL generation.
Loading