cyanheads/pubmed-mcp-server/add-prompt
Claude Code and agent skill by cyanheads/pubmed-mcp-server
- community
Checking that the SKILL.md file is still in the repository.
Scaffold a new MCP prompt template. Use when the user asks to add a prompt, create a reusable message template, or define a prompt for LLM interactions.
Install
npx vskill@latest install cyanheads/pubmed-mcp-server/add-promptSKILL.md
The same SKILL.md was published earlier as cyanheads/pubmed-mcp-server/add-prompt.
Context
Prompts use the prompt() builder from @cyanheads/mcp-ts-core. Each prompt lives in src/mcp-server/prompts/definitions/ with a .prompt.ts suffix. The standard registration pattern uses a definitions/index.ts barrel that collects all prompts into an allPromptDefinitions array for createApp(). Fresh scaffolds start with direct imports in src/index.ts — the barrel is introduced as definitions grow. Match the pattern already used by the project you're editing.
Prompts are pure message templates — no Context, no auth, no side effects. generate can be sync or async (returns PromptMessage[] | Promise<PromptMessage[]>).
Steps
- Gather the prompt's name, purpose, and arguments from the user's request — ask only if genuinely absent
- Create the file at
src/mcp-server/prompts/definitions/{{prompt-name}}.prompt.ts - Register the prompt in the project's existing
createApp()prompt list (directly insrc/index.tsfor fresh scaffolds, or via a barrel if the repo already has one) - Run `bun run devcheck` to verify
- Smoke-test with
bun run rebuild && bun run start:stdio < /dev/null— theCore services constructedlog record must list the new prompt in itspromptsfield (the message text shows only counts); if it doesn't, the prompt never reachedcreateApp()
Template
Multi-message prompt
Registration
If the repo already uses src/mcp-server/prompts/definitions/index.ts, add the prompt to that barrel the way it holds the existing ones — it must end up in the array passed to createApp(). A bare export … from line registers nothing on its own. The standard barrel shape:
Argument autocompletion
Wrap any args field with completable() (re-exported from @cyanheads/mcp-ts-core) to enable argument autocompletion. The SDK auto-installs completion/complete handling and advertises the completions capability when any registered prompt has a completable argument — no other changes are needed.
completable() is transparent to the linter — it does not affect describe-on-fields or schema-serializable rules. All completable-wrapped fields still require .describe() on the underlying schema.
For an optional argument, wrap the inner schema and apply .optional() outside: completable(z.string().describe('…'), cb).optional(). The SDK unwraps .optional() before checking for a completer, so completable(z.string().optional(), cb) type-checks but never completes.
Checklist
- [ ] File created at
src/mcp-server/prompts/definitions/{{prompt-name}}.prompt.ts - [ ] Prompt name passed to
prompt()uses snake_case - [ ]
descriptionfield set (lint warns if absent, butdevcheckwon't hard-fail — verify it's present) - [ ]
titlefield set if a human-readable display name is needed inprompts/list - [ ] All Zod
argsfields have.describe()annotations — orargsomitted entirely for no-parameter prompts - [ ]
argsfields use only JSON-Schema-serializable Zod types (noz.date(),z.transform(),z.bigint(),z.symbol(),z.custom(), etc.) - [ ] If using
completable(), the underlying schema still has.describe()on each wrapped field - [ ] JSDoc
@fileoverviewand@moduleheader present - [ ]
generatefunction present and returns at least one{ role, content: { type: 'text', text } }message - [ ] No side effects — prompts are pure templates
- [ ] Registered in the project's existing
createApp()prompt list (directly or via barrel) - [ ]
bun run devcheckpasses - [ ] Smoke-tested with
bun run rebuild && bun run start:stdio < /dev/null; theCore services constructedrecord lists the new prompt in itspromptsfield
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingframework-skills/add-prompt/SKILL.md
Popularity
- Repository stars
- 159
- Repository forks
- 24
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cyanheads/pubmed-mcp-server/add-prompt)