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
@company/baseorganization@team/webteamproject.prsthis repo
Your sources, inherited like code
-
Claude Code
CLAUDE.mdinstructionsskillsagentsMCPhooks -
GitHub Copilot
.github/copilot-instructions.mdinstructionsskillsagentsMCPhooks -
Codex
AGENTS.mdinstructionsskillsagentsMCPhooksplugins -
Factory AI
.factory/droids/instructionsskillsdroidsMCPhooksplugins -
Gemini CLI
GEMINI.mdinstructionsskillsMCPhooks -
Windsurf
.windsurf/rules/instructionsskillsMCPhooks
+ 44 more targets, written for you
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
.prssources 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
Less copy-paste. More control.
Every agent, same rules
Claude Code, Copilot, Cursor, and the rest read the same standards, each in the format it expects.
securityPrompts scanned before they ship
Catches prompt injection, authority overrides, encoded payloads, and invisible Unicode in your files and in imported skills.
governancePolicy that teams cannot skip
Organization rules flow down to every team and project. Sealed properties and policies keep them in place.
portabilityNo lock-in to one AI tool
Add, drop, or mix agents by changing the target list. Your source stays the same.
reuseSkills built like software
Compose skills from phases, pass parameters, define contracts, and share them through a Git registry.
adoptionStart from the files you have
prs import converts existing CLAUDE.md, Copilot, Cursor, and AGENTS.md files.
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.
# 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"
}
Inherit a base
Single-parent "IS-A" chains from organization to team to project. Blocks merge with predictable rules.
Compose fragments
Mix in multiple "HAS-A" capabilities like security or testing. Later imports win on conflicts.
Pass arguments like functions
A base declares typed parameters with defaults, like
port: number = 3000, and uses them as {{projectName}}.
Extend and override
Patch specific paths, append or negate references, and seal properties that layers cannot change.
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.
$ 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
Injection and overrides
Phrases like "ignore previous instructions" and fake authority overrides fail the build.
Encoded payloads
Base64, hex, URL encoding, HTML entities, ROT13, and more are decoded and checked.
Invisible Unicode
Right-to-left overrides, zero-width characters, and homoglyphs.
Suspicious links
Plain HTTP, link shorteners, and credentials in URLs.
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.
$ 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
From any Git repo or folder
HTTPS, SSH, or a local path. SKILL.md is checked against the Agent Skills spec before anything is written.
Pinned and verified
The commit and a sha256 integrity hash go to promptscript.lock. Plain
HTTP sources are rejected.
Native in every agent
One skill, with its scripts and resources, lands in each agent's own skill folder.
Update or remove in one command
prs skills update refreshes lock entries, prs skills remove
drops the import and its lock entry.
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.
@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
}
}
Phases with boundaries
Each phase brings its own instructions and declares only the tools it needs.
Typed inputs and outputs
Skills declare what they take and return, so they plug together cleanly.
Extend without forking
Teams layer changes on a shared skill. Sealed properties stay locked.
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.
@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"]
}
}
.mcp.json
.claude/agents/incident-responder.md
.claude/skills/triage/SKILL.md
.factory/mcp.json
.factory/droids/incident-responder.md
.factory/plugins.json
.codex/mcp.json
.codex/agents/incident-responder.toml
.codex/plugins.json
.vscode/mcp.json
.github/agents/incident-responder.md
.github/skills/triage/SKILL.md
.prs, like the one above
prs compile
- 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
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).
@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 |
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 repositoryprs registry publishpublish it to your Git remote@inherit @company/platformuse it in every projectprs vendor syncvendor it for offline builds
@company/platform
@team/web@team/services@team/dataYour 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.
$ 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
Always in the box
On by default. The skill covers every block, the CLI, and validation errors, and it ships with the version you compile.
Migration done by your agent
prs migrate --llm prepares the prompt, the agent converts your existing
files. prs migrate --static imports them without AI.
Checked by the compiler
Whatever the agent writes goes through prs validate --strict and
prs compile, like code from a teammate.
Start from where you are
Create a new platform definition, import existing agent files, or establish shared configuration for many repositories.
Initialize in minutes
prs init
Detect the stack, choose targets, and generate a validated starting point.
Start the tutorial → Existing setupImport what already works
prs import CLAUDE.md
Convert current Claude, Copilot, Cursor, AGENTS.md, and other instruction files.
See import options → OrganizationBuild a control plane
@inherit @company/platform
Layer organization policy, team capabilities, and project context with Git-native governance.
Plan the rollout →
Watch the introduction
Explore PromptScript in your browser
Edit a real PromptScript source and inspect generated output without changing your local environment.
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.
Runs on your machine and CI
Compiling needs no hosted service and no proxy. The output is plain files in your repository.
privacyYour prompts stay yours
Anonymous usage telemetry never includes source, prompts, or file paths. Turn it off with
prs telemetry disable.
Pinned and reproducible
Imports are locked by commit and sha256 hash. prs vendor sync supports
offline and air-gapped builds.
Security checks in every build
Prompt injection, encoded payloads, and suspicious links fail validation in CI.
disclosurePrivate vulnerability reports
Report issues through GitHub Security Advisories. The 1.x line gets security fixes.
licenseMIT and open source
Read, fork, and audit every line. Versioned releases with a public changelog on GitHub.
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.
Give every AI agent the right context.
Start with one repository today. Scale the same model across teams when you are ready.