PromptsMay 12, 2026·2 min read

Prompty — One Prompt File for VS Code/Python/TS

Prompty is a Markdown-based `.prompty` format that runs the same prompt from VS Code, Python, or TypeScript with consistent templating and providers.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 27/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Prompt
Install
Stage only
Trust
Trust: Established
Entrypoint
Asset
Safe staging command
npx -y tokrepo@latest install d270b1e5-26cf-4f73-9ef6-deac2d0953df --target codex

Stages files first; activation requires review of the staged README and plan.

Intro

Prompty is a Markdown-based .prompty format that runs the same prompt from VS Code, Python, or TypeScript with consistent templating and providers.

  • Best for: teams standardizing prompts across IDEs and runtimes, with reproducible config and templating
  • Works with: VS Code extension, Python package, TypeScript packages, providers like OpenAI/Anthropic/Foundry
  • Setup time: 10–25 minutes

Practical Notes

  • Quant: keep prompts in git and require PR review for .prompty changes.
  • Data point: .prompty files embed model/provider settings next to the template.

Pattern: prompt as an interface contract

Use .prompty as a contract between product and engineering:

  • define inputs (variables),
  • define provider + model settings,
  • and keep the prompt body readable Markdown.

Pattern: run the same prompt in three places

  1. In VS Code for authoring and preview.
  2. In Python for batch jobs / eval harnesses.
  3. In TypeScript for web backends.

This reduces "works on my machine" drift where the template differs per runtime.

FAQ

Q: Is Prompty stable? A: It’s labeled v2 alpha in the repo; expect API/file-format changes.

Q: Can I use it without VS Code? A: Yes. You can invoke .prompty from Python or TypeScript runtimes.

Q: How do I keep secrets out of git? A: Reference env vars in connections (e.g. ${env:OPENAI_API_KEY}) instead of hardcoding.

🙏

Source & Thanks

Source: https://github.com/microsoft/prompty > License: MIT > GitHub stars: 1,209 · forks: 114

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets