Skip to content

mrwogu/promptscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

443 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
PromptScript Logo

PromptScript

One Source of Truth for All Your AI Coding Assistants

Write once. Compile to 37 AI coding agents: GitHub Copilot, Claude Code, Cursor, and more.

CI codecov npm version Docker License: MIT

Try Playground · Documentation · Quick Start


The Problem

  • ❌ 50 repos × 37 AI tools = 1,900 files to keep in sync
  • ❌ Security policy update? Manual changes across every repo
  • ❌ Switching from Cursor to Claude Code? Rewrite everything
  • ❌ No audit trail, no inheritance, no validation

The Fix

  • ✅ Write once in .prs → compile to all 37 agents
  • ✅ Update the source → propagates everywhere automatically
  • ✅ Hierarchical inheritance like code, not copy-paste
  • ✅ Full validation, audit trail, and version pinning

Quick Start

Install & Run

npm install -g @promptscript/cli

prs init       # auto-detects your tech stack
prs compile    # outputs to all AI tools

Or Use Docker

docker run --rm -v $(pwd):/workspace ghcr.io/mrwogu/promptscript:latest compile

Or Try Online

Open Playground - no install needed.


See It In Action

Source: .promptscript/project.prs

@meta { id: "checkout-service" syntax: "1.0.0" }

@inherit @company/backend-security
@use @fragments/testing
@use @fragments/typescript-strict

@identity {
  """
  You are an expert Backend Engineer working on the Checkout Service.
  This service handles payments using hexagonal architecture.
  """
}

@shortcuts {
  "/review": "Security-focused code review"
  "/test": "Write unit tests with Vitest"
  "/migrate": "Generate Prisma migration"
}

Run: prs compile generates native config files for every AI tool:

📄 .github/copilot-instructions.md
📄 CLAUDE.md
📄 .cursor/rules/project.mdc
📄 .agent/rules/project.md
📄 AGENTS.md
📄 OPENCODE.md
📄 GEMINI.md
   ... and 30 more agent formats

Example output - the generated CLAUDE.md:

# CLAUDE.md

You are an expert Backend Engineer working on the Checkout Service.
This service handles payments using hexagonal architecture.

## Code Style

- Use strict mode
- Prefer interfaces over types
- Never use `any` type

## Commands

- `/review` - Security-focused code review
- `/test` - Write unit tests with Vitest
- `/migrate` - Generate Prisma migration

One .prs file. Every AI tool gets native, idiomatic output. No manual formatting.


Key Features

Hierarchical Inheritance - compose standards from organization → team → project level, just like code:

@inherit @company/global-security
@inherit @team/backend-standards
@extend @standards.testing { coverage: "95%" }

Parameterized Templates - reusable stacks with typed parameters, like Infrastructure as Code:

@inherit @stacks/typescript-service(projectName: "checkout", port: 8080)

Skills - define reusable AI skills with SKILL.md files, resource bundles, and input/output contracts. Compile them to native skill formats for Claude Code, Copilot, Cursor, and more:

@skills {
  deploy: {
    description: "Deploy service to production"
    userInvocable: true
    allowedTools: ["Bash", "Read"]
  }
}

Registry Resolver - import from any Git repository with Go-style URL imports or short aliases. Auto-discovers skills from repos that don't have .prs files. Lockfile support for reproducible builds. Vendor mode for offline/air-gapped CI:

# Alias (configured once in promptscript.yaml)
@use @company/security

# Or direct URL import — no config needed
@use github.com/acme/shared-standards/@fragments/security@^1.0.0
# promptscript.yaml
registries:
  '@company': github.com/acme/promptscript-base

AI-Assisted Migration - already have CLAUDE.md or .cursorrules? Convert automatically:

prs init --migrate

Watch Mode - auto-recompile on every change:

prs compile --watch

Bundled Language Skill - AI agents automatically learn PromptScript syntax via an injected SKILL.md, so they can help you write .prs files.

Docker CI/CD - validate in any pipeline:

docker run --rm -v $(pwd):/workspace ghcr.io/mrwogu/promptscript:latest validate --strict

37 AI Agents, One Source

PromptScript compiles to native config formats for every major AI coding agent:

  • 🟢 GitHub Copilot.github/copilot-instructions.md
  • 🟢 Claude CodeCLAUDE.md, .claude/skills/*.md
  • 🟢 Cursor.cursor/rules/*.mdc
  • 🟢 Google Antigravity.agent/rules/*.md
  • 🟢 Factory AIAGENTS.md
  • 🟢 OpenCodeOPENCODE.md
  • 🟢 Gemini CLIGEMINI.md

Plus 30 more: Windsurf, Cline, Roo Code, Codex, Continue, Augment, Goose, Kilo Code, Amp, Trae, Junie, Kiro CLI, and others. Each outputs to its native config path. See the full list of formatters.


Enterprise Ready

  • 🔒 Private registries - host standards on internal Git repos
  • 📌 Version pinning - @inherit @company/security@2.1.0
  • CI validation - prs validate --strict --output json
  • 📋 Full audit trail - all changes tracked in version control

Documentation

Resource Description
Getting Started 5-minute quickstart guide
Language Reference Full syntax documentation
Guides Inheritance, registry, migration, and more
Enterprise Scaling across organizations

Contributions welcome! See CONTRIBUTING.md.  |  Full Roadmap →


Built for the AI-First Engineering Community

Documentation · Playground · Issues