PromptScript CLI
A CLI compiler that takes rules, skills, agents and hooks written once and lays them out as native files for Claude Code, Cursor, Copilot and 47 more tools
- 344 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The compiler writes instruction, agent and hook files into the project's assistant directories
- The init command installs hooks by default, so preview the writes with the dry-run flag before agreeing
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/promptscriptDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The compiler writes instruction, agent and hook files into the project's assistant directories
- The init command installs hooks by default, so preview the writes with the dry-run flag before agreeing
This is third-party code. Review the repository files before installing.
What it does
PromptScript is a compiler for AI agent rules. You describe instructions, project standards, restrictions, skills, agents, MCP servers, hooks and workflows in `.prs` files and list the target tools in `promptscript.yaml`. The `prs compile` command emits each tool's native files: `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for Copilot, `.cursor/rules` for Cursor and so on. In all, 50 agent targets and two application prompt targets are built in. Sources inherit like code. The `@inherit` directive sets an organization base, `@use` pulls in local, registry or Git resources or Markdown, and `@extend` and `@override` change individual blocks. Remote dependencies are pinned in `promptscript.lock` with a commit and an integrity hash, and vendor mode copies them to `.promptscript/vendor` for offline builds. Skills can be pulled from Git: `prs skills add github.com/acme/agent-skills/security-review@2.1.0`. A model is named once with an alias such as `opus`, and the compiler writes the name each tool understands. A built-in scanner checks instructions and imported skills before any file is written: it looks for phrases like "ignore previous instructions", payloads in Base64 and hex, invisible characters and link shorteners. With `--strict` warnings count as errors, which suits CI.
Who it is for. For developers and platform teams who use Claude Code, Cursor and Copilot at the same time and are tired of keeping three sets of instructions in sync by hand.
Good fit when
- A team works in Claude Code, Copilot and Cursor and code standards drift across three instruction files
- A platform team wants to distribute standards across hundreds of repositories through inheritance and a Git registry
- You want to change a restriction once and review the diff of generated files in a pull request
- CI must reject instructions and skills carrying prompt injection through `prs validate --strict`
- A project is moving from one assistant to another and the rules must carry over without rewriting
Not a fit when
- You use a single assistant and a single rules file: the compiler adds a needless layer
- You only need to copy a ready skill into a project folder: copying the folder itself is enough
- You need rules the chosen tool does not have: unsupported capabilities are omitted and not replaced with approximations
- You want to maintain each file by hand: the `.prs` files are the source of truth here and the output files are rebuilt
Example request
Move our rules from CLAUDE.md into PromptScript sources, add the cursor and github targets, run prs validate --strict and show what changed after prs compile.Limitations
Node.js 20 or newer is needed, and there is also a run under Deno 2.9 and a Docker image `ghcr.io/mrwogu/promptscript`. Rich native generators exist for nine tools: Claude Code, GitHub Copilot, Cursor, Factory AI, Codex, Gemini CLI, OpenCode, Antigravity and Grok. Another 11 targets get AGENTS.md files, and the formats of the rest are listed in the target table in the docs, which also shows what each tool supports.
By default `prs init` installs hooks, `--no-hooks` turns that off and `--dry-run` previews the writes. If a tool cannot express a capability, the compiler skips it. For Codex the model name is omitted with a PS4004 warning. Remote imports are pinned in the lock file, but pull resources from third-party Git repositories only after reviewing them.
The license is MIT.
How to disable. Remove the package with `npm uninstall -g @promptscript/cli`. The generated files (`CLAUDE.md`, `.cursor/rules`, `.github/copilot-instructions.md` and others) stay in the project and work as plain files, and you can delete the `.promptscript` sources and `promptscript.yaml` if you wish.
FAQ
How do I install PromptScript and make a first build?
Run `npm install -g @promptscript/cli`, then `prs init`: it detects the stack and installed assistants and creates `promptscript.yaml` with `.promptscript/project.prs`. After that `prs validate --strict` and `prs compile` produce the native files. Without installing you can run the Docker image or open the browser playground.
Which tools does PromptScript support?
Fifty agent targets. Nine have full generators: Claude Code, GitHub Copilot, Cursor, Factory AI, Codex, Gemini CLI, OpenCode, Antigravity and Grok. Another 11 get AGENTS.md files, including Aider, Amazon Q, Warp and Zed. Two targets, bundle and prompt-text, serve application prompts.
How does PromptScript differ from Rulesync?
The task is shared, but PromptScript is built around its own `.prs` language with inheritance, block overrides, typed parameters and a built-in security scanner. It builds rules, skills, agents, hooks and MCP into each target's files and pins remote dependencies in a lock file.
How does PromptScript guard against prompt injection in third-party skills?
`prs validate` checks instructions and imported skills before any file is written. The rules catch phrases like "ignore previous instructions", fake authority overrides, encoded payloads, path traversal in `@use`, right-to-left characters and shortener links. With `--strict` warnings fail the build.
Can I pull skills from other people's repositories?
Yes, with the `@use github.com/acme/agent-skills/database-review@1.3.0` directive or the `prs skills add` command. The version is pinned in `promptscript.lock` with a commit and an integrity hash, and vendor mode puts a copy into the project for offline builds.
Discussion
No questions or reviews yet.
Related
CLI toolsClaude Code Prompts (RepoWise)
claude-code-prompts
Independently written prompt templates for AI coding agents: system prompts, tool prompts, delegation, memory and multi-agent coordination
The author's personal Claude Code toolbox: meta-prompt and todo commands, skills to create skills, hooks and MCP servers, auditors and a Ralph loop
PromptOps keeps Claude Code, Codex and Gemini CLI side by side by project and gives a lead agent MCP to launch helpers
A prompt template store with search and variable filling, plus a script that runs Claude agents across a whole project.
A meta-skill that folds rules scattered across AGENTS.md, CLAUDE.md and Cursor files into one project skill with task routes.
A plugin with six working skills and a prompt library: routing a task to a prompt, pre-commit checks and skill audits.
README in short
The README explains why to keep rules in one source and shows a full `.prs` example with identity, standards, skills, agents, hooks and plugins. Then come a table of language capabilities, composition, portable skills, model names, the scanner and the target table. It closes with sections on monorepos, gradual adoption and tooling around the compiler.