Sync your local agent skills into the Drafts macOS and iOS app.
Drafts is a notes and automation app for Mac and iPhone/iPad. This repo adds a Drafts action workflow on top of it: you can type a skill or free-form prompt, apply it to the current selection or whole note, and replace the note content with the model output. If you want more background on the action model and scripting APIs, the Drafts scripting reference is the best companion.
This repo contains:
- A Raycast command,
Sync Drafts Skills, to trigger sync without leaving Raycast - A local sync script that reads
SKILL.mdfiles from your local skills folder - Drafts templates and runtime scripts written into Drafts' iCloud folders
- A mobile-friendly Drafts HTML picker with skill filtering and free-form prompt fallback
The picker template itself is part of the repo at templates/agent-skills/skill-picker.html. Your private skill names and instructions are still generated locally and are not committed.
- Reads every
SKILL.mdunder your local skills folder - Builds a small Drafts picker index for fast loading on mobile
- Writes per-skill instruction files for on-demand loading when a skill is chosen
- Updates Drafts iCloud Templates and Scripts folders
- Generates one-time bootstrap script steps in a local output folder
- Put your skills in
~/.agent/skills, with oneSKILL.mdper folder. The sync also falls back to~/.agents/skillsfor compatibility with older setups. - Install dependencies:
npm install- Run the sync:
npm run sync:draftsOr run the Raycast command Sync Drafts Skills if you have this extension installed locally in Raycast.
Generated files are written locally to:
~/Library/Application Support/drafts-skills/drafts-generated
That folder contains:
INSTALL_DRAFTS_ACTION.mddrafts-agent-skill-step1.jsdrafts-agent-skill-step3.js- a local copy of the synced Drafts template/runtime files
Only the generated skill data is local-only. The reusable picker template source is committed in this repo.
After syncing, open:
~/Library/Application Support/drafts-skills/drafts-generated/INSTALL_DRAFTS_ACTION.md
Then create the Drafts action once:
- Add a Script step and paste
drafts-agent-skill-step1.js. - Add an HTML Preview step with:
[[template|agent-skills/skill-picker.html]] - Add a second Script step and paste
drafts-agent-skill-step3.js.
After that one-time setup, re-running npm run sync:drafts updates the synced Drafts runtime automatically.
This repo is safe to share publicly because it only contains the generic sync logic and committed picker template.
Do not commit:
~/Library/Application Support/drafts-skills/drafts-generated- your
~/.agent/skillsor~/.agents/skillsdirectory - Drafts' synced
skills-index.jsonor per-skill.txtinstruction files if they contain private prompts
npm install
npm run build