Skip to content
Prompts as code for AI coding agents

Write your AI rules once.
Every agent follows them.

PromptScript is an open-source compiler for AI coding agent rules. Write instructions, skills, agents, and MCP servers once, inherit them like code, and get native files for 50 tools.

npm install -g @promptscript/cli Open source · MIT · Git-native · CI-ready

★ 384 GitHub stars · 2.9k npm downloads last month

  1. @company/baseorganization
  2. @team/webteam
  3. project.prsthis repo

Your sources, inherited like code

  • Claude CodeCLAUDE.md instructionsskillsagentsMCPhooks
  • GitHub Copilot.github/copilot-instructions.md instructionsskillsagentsMCPhooks
  • CodexAGENTS.md instructionsskillsagentsMCPhooksplugins
  • Factory AI.factory/droids/ instructionsskillsdroidsMCPhooksplugins
  • Gemini CLIGEMINI.md instructionsskillsMCPhooks
  • Windsurf.windsurf/rules/ instructionsskillsMCPhooks

+ 44 more targets, written for you

Native output for 50 AI coding agents
Claude CodeGitHub CopilotCursorCodexGemini CLIWindsurfFactory AIOpenCodeClineRoo CodeKilo CodeAmazon QJunieZedAiderContinueGooseDevinJulesKiro CLIWarpTraeAmpAugmentAntigravityGitLab DuoQwen CodeMistral VibeGrokKimiOpenHandsCrushQoderCodeBuddyCommand CodeCortexDeep AgentsForgeCodeHermes AgentiFlowKodeMCPJamMimoMuxNeovateOpenClawPiPochiZencoderAdal
See all targets →
The problem

AI instructions do not scale by copy-paste

Every AI tool wants its own file. Every repository keeps its own copy. Soon nobody knows which rules the agents actually follow.

Without PromptScript

  • A different file for every tool: CLAUDE.md, .cursor/rules, copilot-instructions.md, AGENTS.md
  • Copies drift apart across dozens of repositories
  • Company standards live in a wiki the agents never read
  • Third-party skills can carry hidden prompt injection
  • Switching AI tools means rewriting everything

With PromptScript

  • .prs sources inherited like code, native output for 50 agents
  • Company standards inherited by every repository, not copied
  • Changes reviewed in Git and validated in CI
  • Built-in security scanner for every prompt and imported skill
  • Add or switch tools by editing one target list
50 AI coding agents from the same sources
40+ validation rules on every build
9 encodings decoded by the security scanner
0 runtime proxies between you and your tools
Why teams use it

Less copy-paste. More control.

Prompts as code

Inherit, compose, and extend

Configuration is composable source, not copied text. Inherit a shared base, pass it arguments like a function, mix in reusable fragments, and override only what changes - with deterministic, reviewable merges.

project.prs source
# IS-A: inherit a base, with arguments
@inherit @stacks/react-app(projectName: "Checkout", port: 8080)

# HAS-A: compose reusable fragments
@use @core/security
@use ./fragments/testing(framework: "vitest")

# override only what changes
@extend standards.code {
  framework: "react"
}

@extend restrictions {
  - "Use functional components only"
}
Built-in security scanner

Stop prompt injection before it ships

prs validate scans every instruction, skill, and imported file. Encoded payloads are decoded first, so hiding an attack in hex or Base64 does not get it through.

terminal output
$ prs validate --strict
✖ Validation failed

✗ Blocked pattern detected:
  ignore\s+(all\s+)?previous\s+instructions
  at project.prs:8:1

✗ PS012: Malicious content detected
  in raw hex (spaced): Prompt injection
  Decoded: "IGNORE SAFETY RULES"
  at project.prs:16:14

✗ PS010: URL shortener detected:
  http://bit.ly/deploy-help
  at project.prs:16:14
prs skills

Install skills like packages

Pull a skill from any Git repository or local folder. PromptScript validates it, pins the exact commit, and compiles it into the skill folder of every agent you use.

terminal output
$ prs skills add github.com/anthropics/skills/skills/pdf
✔ Skill added
  ✓ @use github.com/anthropics/skills/skills/pdf
    Lockfile updated: promptscript.lock

$ prs compile
  ✓ .claude/skills/pdf/SKILL.md
  ✓ .github/skills/pdf/SKILL.md
  ✓ .github/skills/pdf/scripts/fill_fillable_fields.py
  ✓ .factory/skills/pdf/SKILL.md
✔ Compilation successful
Skill composition

Build big skills from small, owned pieces

Split a complex skill into phases. Each phase is its own .prs file with its own context, parameters, and allowed tools, so different teams can own different parts.

ops.prs source
@skills {
  ops: {
    description: "Production operations"

    # every phase is a separate .prs file
    @use ./phases/health-scan
    @use ./phases/triage(severity: "critical")
    @use ./phases/code-fix as autofix

    # shared phases from the Git registry
    @use @shared/phases/monitoring
  }
}
Agents, MCP servers, and plugins

Build agent plugins once, ship everywhere

Describe MCP servers, specialized agents, and the plugin that bundles them in one file. Each target gets its own native MCP config, agent files, and plugin manifest.

incident.prs source
@skills {
  triage: {
    description: "Classify incidents by severity"
  }
}

@mcpServers {
  observability: {
    transport: "http"
    url: "https://mcp.example.com/api"
  }
}

@agents {
  incident-responder: {
    description: "Investigate incidents"
    mcpServers: ["observability"]
    skills: ["triage"]
  }
}

@plugins {
  incident-suite: {
    version: "1.0.0"
    skills: ["triage"]
    mcpServers: ["observability"]
  }
}
Claude CodeMCP, agent, skill
.mcp.json .claude/agents/incident-responder.md .claude/skills/triage/SKILL.md
Factory AIMCP, droid, plugin
.factory/mcp.json .factory/droids/incident-responder.md .factory/plugins.json
CodexMCP, agent, plugin
.codex/mcp.json .codex/agents/incident-responder.toml .codex/plugins.json
GitHub CopilotMCP, agent, skill
.vscode/mcp.json .github/agents/incident-responder.md .github/skills/triage/SKILL.md
34 lines of .prs, like the one above
17 native files written by prs compile
3 formats: Markdown, JSON, and TOML
4 tools: Claude Code, Copilot, Codex, Factory AI
  • stdio, HTTP, and SSE servers, with tool allow and deny lists
  • Agents get only the MCP servers and skills you give them
  • When a target cannot express a field, the compiler warns (PS4003) instead of dropping it silently
Model mapping

Name a model once. Every tool gets its own spelling.

Each tool names models differently. Write opus or a full model id and PromptScript writes the name each target expects. When a target cannot run that model, the compiler warns (PS4004).

project.prs source
@agents {
  reviewer: {
    description: "Review pull requests"
    model: "opus"
  }
}
Target Writes
Claude Code opus
GitHub Copilot Claude Opus 5.5
Factory AI claude-opus-5-5
Cursor claude-opus-5-5
Codex omitted, PS4004 warning
Model catalog and aliases →
Built for one repo or an organization

Change policy once. Propagate with control.

Keep shared standards in Git, inherit them through explicit layers, pin remote dependencies, and enforce the result in CI.

  • prs registry initcreate a registry repository
  • prs registry publishpublish it to your Git remote
  • @inherit @company/platformuse it in every project
  • prs vendor syncvendor it for offline builds
Organization @company/platform
Frontend@team/web
Backend@team/services
Data@team/data
↓
100+ project repositories
PoliciesSkillsAgentsNative files
Built-in promptscript skill

Your AI agent already knows PromptScript

Every compile ships a language skill to each agent that supports skills. Ask in plain words and the agent writes the .prs for you: migrations, new skills, agents, or MCP servers.

terminal output
$ prs compile
  ✓ .claude/skills/promptscript/SKILL.md
  ✓ .github/skills/promptscript/SKILL.md
  ✓ .factory/skills/promptscript/SKILL.md
  ✓ .agents/skills/promptscript/SKILL.md
✔ Compilation successful

# then, in Claude Code:
/promptscript migrate our CLAUDE.md and Cursor rules

# or in Copilot Chat:
Use the promptscript skill to add an MCP
server for our issue tracker
Adopt without a rewrite

Start from where you are

Create a new platform definition, import existing agent files, or establish shared configuration for many repositories.

PromptScript introduction video Watch the introduction
See it before installing

Explore PromptScript in your browser

Edit a real PromptScript source and inspect generated output without changing your local environment.

Ready for security review

Nothing runs between your team and its tools

PromptScript is a compiler, not a service. It reads your sources and writes files you review and commit, like any other build step.

FAQ

Questions teams ask first

What is PromptScript?

PromptScript is an open-source compiler for AI coding agent configuration. You write instructions, skills, agents, MCP servers, hooks, and plugins in .prs files, and it generates the native files for 50 tools, such as CLAUDE.md, .github/copilot-instructions.md, and Cursor rules.

Which AI coding tools does it support?

It compiles to 50 targets, including Claude Code, GitHub Copilot, Cursor, Codex, Gemini CLI, Windsurf, Factory AI, and OpenCode. Each target gets the file layout and format that tool reads.

How is it different from a shared AGENTS.md file?

AGENTS.md is one file that some tools read. PromptScript is the source behind it: it adds inheritance across repositories, parameters, skills, agents, MCP servers, validation, and a security scan, and it writes AGENTS.md together with the formats of every other tool.

Can I start from the instruction files I already have?

Yes. prs import converts an existing CLAUDE.md, Copilot, Cursor, or AGENTS.md file, prs migrate imports a whole project, and the built-in promptscript skill lets your AI agent do the migration for you.

How do teams share one configuration?

Publish a Git registry with prs registry init and prs registry publish, then inherit it in every project with @inherit. Remote imports are pinned by commit and sha256 hash in promptscript.lock, and prs vendor sync copies them for offline builds.

Does PromptScript send my prompts anywhere?

No. Compilation runs on your machine or in your CI. Anonymous usage telemetry is on by default and never includes source, prompts, compiled output, file paths, or project names. Turn it off with prs telemetry disable or DO_NOT_TRACK=1.

Is PromptScript free?

Yes. PromptScript is open source under the MIT license. The CLI is published on npm as @promptscript/cli.

One source of truth

Give every AI agent the right context.

Start with one repository today. Scale the same model across teams when you are ready.