AI Integration
Give an LLM agent a skill file so it can open files and folders in Marked, jump to a Settings section, and change preferences. The agent uses Markedās URL handler. You do not need a separate plugin or server.
Contents
DownloadĀ theĀ skill
The file is plain Markdown with a short header your agent reads before it acts. Hand the same file to any agent that accepts a skill or a standing instruction.
InstallĀ it
Put the file in a folder named for the skill, and keep the filename SKILL.md.
For Cursor, either location works:
~/.cursor/skills/open-in-marked/SKILL.md
.cursor/skills/open-in-marked/SKILL.md
The first is available in every project. The second applies only to that project. Other agents can use the same text as a project instruction if they do not have a skills folder.
After it is installed, ask the agent to open a file or folder in Marked. It should run a command like:
open "x-marked-3://open?file=/Users/me/Notes/draft.md"
A folder uses the same command. The path has to exist, and spaces and other reserved characters must be percent-encoded. See URL Handler for the full scheme, including refresh, Streaming Preview, and callbacks.
Preferences
The skill also covers two preference commands:
-
pref - Opens Settings to a named section, such as Preview or Style. It does not change a value.
-
defaults -
Sets a preference Marked already stores, then reloads open previews. Pass
refresh=0to leave the previews alone. The agent should read the current preferences before it writes one, because an unknown key is ignored.
open "x-marked-3://pref?page=Preview"
open "x-marked-3://defaults?syntaxHighlight=0&refresh=0"
Related
Using Marked with Agentic Coding covers watching a folder of plans and notes while an agent writes them. The command line utility is the same kind of access from a shell, without an agent.