From macos-automation
This skill should be used when the user asks to "automate Notes app", "read notes programmatically", "create notes", "search notes", "access note folders", "get note content", or mentions Notes.app automation, note scripting, or macOS notes workflows.
How this skill is triggered — by the user, by Claude, or both
Slash command
/macos-automation:notes-automationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automate Notes.app using JXA for reading, creating, and searching notes programmatically.
Automate Notes.app using JXA for reading, creating, and searching notes programmatically.
Notes.app provides scripting support for note management. Use this skill for knowledge management automation, note search, and integration with other workflows.
| Category | Operations | JXA Support |
|---|---|---|
| Reading | Access notes, read content, check properties | ✅ Full |
| Creating | Create notes, set content | ✅ Full |
| Searching | Search by title, content, folder | ✅ Full |
| Folders | List folders, access notes in folder | ✅ Full |
| Task | JXA Pattern |
|---|---|
| Get all notes | Notes.notes() |
| Get note name | note.name() |
| Get note content | note.body() |
| Get creation date | note.creationDate() |
| Create note | Notes.Note({name: '...', body: '...'}) |
| List folders | Notes.folders() |
interface Note {
name: string
body: string
creationDate: string
folder: string
}
async function getRecentNotes(limit: number = 10): Promise<Note[]> {
const script = `
const Notes = Application('Notes')
const notes = Notes.notes()
return JSON.stringify(
notes.slice(0, ${limit}).map(note => ({
name: note.name(),
body: note.body(),
creationDate: note.creationDate().toISOString(),
folder: note.container().name()
}))
)
`
return await runJXA<Note[]>(script)
}
async function searchNotes(query: string): Promise<Note[]> {
const script = `
const Notes = Application('Notes')
const allNotes = Notes.notes()
const matching = allNotes.filter(note =>
note.name().toLowerCase().includes("${query.toLowerCase()}") ||
note.body().toLowerCase().includes("${query.toLowerCase()}")
)
return JSON.stringify(
matching.slice(0, 20).map(note => ({
name: note.name(),
body: note.body().substring(0, 200),
creationDate: note.creationDate().toISOString()
}))
)
`
return await runJXA<Note[]>(script)
}
async function createNote(title: string, content: string): Promise<void> {
const script = `
const Notes = Application('Notes')
const note = Notes.Note({
name: "${title}",
body: "${content}"
})
Notes.notes.push(note)
return "Note created"
`
await runJXA<string>(script)
}
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub mattwag05/mw-plugins --plugin macos-automation