← All skills

Write a skill

A skill teaches Peanut Butter one more thing to do when it's asked. Fill this in and the page checks it as you go, with the same rules the phone uses. When it's ready, download it to try on your iPhone or send it to the community.

Name it

Made from the name. The file is called this.
Raise it each time you change a published skill.

When it runs

Peanut Butter only considers a skill when a message contains one of its trigger phrases. Then its model reads the description and decides whether this skill is what was asked for.

the user asks
Written for Peanut Butter's router, not for people. Say what the request is about, and what it isn't if that's easy to confuse.
Short and generous. A phrase that fires wrongly costs a quick "no"; one that misses means the skill never runs. Capitals are lowered for you.

      What it reads

      The skill sees only what you tick, plus the request and the date and time. People see this list before they install it, so tick only what the skill needs.

      Or look something up outside the phone A skill with an errand reads nothing of theirs. Peanut Butter's own code builds the search from the words they said, sends it, and shows what comes back. The prompt only writes those words down.

      What it shows

      Checks Peanut Butter runs on the answer A small model follows descriptions but not prohibitions, so these are enforced in code after it answers.
      What it may do beyond showing a card Each one happens only after the person says yes.

      The prompt

      • Describe the output; never quote an example sentence. A quoted example is a sentence the model will one day say to someone.
      • Let the model write words; let the reads supply facts. Counts, dates and names come from what the skill is given.
      • Keep every string short. The card is read aloud and drawn on a phone.
      • Say what to do when something is missing. Every source says so in words when it has nothing.
      Insert what the skill is given

      Tests

      A test is a request and a pretend day for it to run in. Nothing of anyone's real data is used. Peanut Butter runs these on the phone's model before installing, and checks properties, never exact wording. The requests above also run as tests.

      Readme