Create custom AI commands
Write the prompt once, run it on any page in two keystrokes.
On this page
A custom command is a prompt you save once and run on any page. It can read the page, ask you a question, call AI and then act: click, paste, send to a webhook. Start with a single prompt; add steps when you need them.
# Create a command in a minute
- Open HARPA on any page: Alt+A on Windows, Ctrl+A on Mac.
- Click ⋮ at the bottom left of the chat and choose New command.
- Give it a title, like "Pros and cons".
- Keep Include opened page content on, so the command reads the page you run it on. Load the page decides how far HARPA scrolls first, for pages that load more as you scroll.
- Write the prompt and click Save.
Your command is saved to your favorites. To run it, type / and its name in the chat, or press Ctrl+K on Mac or Alt+K on Windows anywhere on a page: see Command palette.
# Add steps
Click More in the form (or type / in the chat and click Create) to open the full editor. It has the Title, an Icon, a Description and the Steps, starting with the GPT step that holds your prompt.
- Add step adds one at the end: Ask a question, Extract an element, Click, Wait, send a Request and more.
- Canvas opens the command as a flow, where you can move and branch steps and test them on a real tab: see Build workflows on the flow canvas.
- Click Save when you're done.
The ⋮ menu of a saved command has Run on tabs…, Share link, Lock editing, Duplicate and Delete.
# Use parameters in prompts
Parameters in double curly brackets are filled in when the command runs. Type {{ in the chat to see them all.
| Parameter | Becomes |
|---|---|
{{page}} | The text of the page you run the command on |
{{language}} | Your answer language from HARPA's settings |
{{url}}, {{domain}} | The page's address and its site |
{{selection}} | The text you selected on the page |
{{transcript}} | A YouTube video's transcript |
{{p1}}, {{budget}}… | Your own parameters: an Ask step's answer or a value set by a Calc step |
More in Parameters and Automation steps.
# Duplicate and edit a built-in command
Built-in commands, like Summary or Reply, are a good start for your own version.
- Type / in the chat and hover the command.
- Click the copy icon, Duplicate & edit.
- Change what you need, usually the prompt in the GPT step: fewer key points, a different tone, a fixed format.
- Rename it or keep the name, then click Save.
A copy with the same name takes the built-in's place in your list. Delete the copy and the original comes back.
# Write prompts that work
- Say what you want and in what shape. "Summarize the page" is vague; "Five bullet points, each under 15 words, then a one-line verdict" is not.
- Give the role and the reader. "You are a procurement analyst. Write for a manager who has two minutes."
- Put the page last. Instructions first, then
Page: {{page}}, then what to write:Answer:.
List the pros and cons of the product on this page as two short bullet lists,
then a one-line verdict for a buyer on a budget.
Answer in {{language}}.
Page: {{page}}
# Good to know
- Commands live in your space and sync to your account. In a team space every member can run them.
- Free includes up to 3 custom commands. Pro and X make them unlimited and let you edit built-in commands, see pricing.
- Commands run on the model you pick in the chat. On HARPA's cloud models they use cloud credits, see Cloud models and credits.