Skip to main content
Glama

PromptShift ⚔ Universal AI Coding Agent Transpiler & Drift Guard

PromptShift Certified GitHub release License: MIT AST Parity PromptShift MCP server Zero-Data-Retention MCP Compatible

Deterministic AST transpilation and secret sanitation between Cursor (.mdc), Claude Code (CLAUDE.md), Windsurf (.windsurfrules), GitHub Copilot, Cline, and Roo Code.

🌐 Web Application: https://promptshift.dev
šŸ“¦ CLI Package: npx promptshift
šŸ¤– MCP Server: npx promptshift --mcp
šŸ”„ GitHub Action: topaisaas-dev/promptshift@v1


The Problem: AI Rule Fragmentation & Multi-IDE Drift

Modern engineering teams often collaborate across multiple AI-assisted developer environments:

  • Cursor uses granular frontmatter-annotated markdown rules (.cursor/rules/*.mdc) and .cursorrules.

  • Claude Code expects a unified root instruction context (CLAUDE.md).

  • Windsurf relies on .windsurfrules.

  • GitHub Copilot looks for .github/copilot-instructions.md.

  • Aider, Cline & Roo Code each define custom agent boundaries.

When an engineer updates CLAUDE.md but forgets to synchronize .cursor/rules/, AI coding agents develop conflicting behaviors, hallucinate mismatched constraints, and accidentally commit sensitive API keys.

PromptShift eliminates fragmentation with certified 98.5% AST semantic parity, OWASP In-RAM secret sanitization, and instant CI/CD drift guards.


Related MCP server: Fetch MCP Server

⚔ Quick Start

1. One-Command Continuous CI/CD Guard

Bootstrap automated PR parity verification and secret scanning in 2 seconds:

npx promptshift --init-ci

2. Zero-Install CLI (NPX)

Transpile rules locally without permanent installation:

# Audit workspace for rules drift and exposed secrets
npx promptshift --check

# Transpile from current project to Claude Code
npx promptshift --to=claude

# Transpile from current project to Cursor
npx promptshift --to=cursor --key=polar_ord_xxxx

# Get official certified badge for your README.md
npx promptshift --badge

2. Model Context Protocol (MCP) Integration

PromptShift includes a native STDIO JSON-RPC 2.0 MCP server compatible with Claude Desktop, Cursor, Glama.ai, and Smithery.ai.

Claude Desktop Configuration (claude_desktop_config.json)

{
  "mcpServers": {
    "promptshift": {
      "command": "npx",
      "args": ["-y", "promptshift", "--mcp"]
    }
  }
}

Docker Container Execution (Glama Firecracker & Local MicroVMs)

# Build and run the lightweight MCP server via Docker
docker build -t promptshift .
docker run -i --rm promptshift

Exposed MCP Tools (TDQS 5-Star Grade A):

  • promptshift_transpile: Deterministically compiles rules between Cursor, Claude Code, Windsurf, Copilot, Cline, and Aider with 98.5% AST parity.

  • promptshift_sanitize_secrets: Automatically redacts exposed OpenAI, Anthropic, AWS, GitHub, and Stripe API keys in-RAM before commits.

  • promptshift_validate_ast: Measures semantic AST fidelity and prompt drift percentage between source and target instruction documents.


šŸ”„ GitHub Actions CI/CD Drift Guard

Add PromptShift to your pull request workflows to automatically enforce rule synchronization across your team:

# .github/workflows/ai-rules-sync.yml
name: AI Agent Rules Synchronization & Drift Guard

on:
  pull_request:
    paths:
      - 'CLAUDE.md'
      - '.cursor/rules/**'
      - '.windsurfrules'

jobs:
  sync-rules:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Run PromptShift AST Sync
        uses: topaisaas-dev/promptshift@v1.1.0
        with:
          from: 'cursor'
          to: 'claude-code'
          license_key: ${{ secrets.PROMPTSHIFT_LICENSE_KEY }}

šŸ”’ Security & OWASP Secret Sanitizer

All transpilation processes run 100% in-memory with zero disk persistence and zero telemetry. Before converting instructions, PromptShift runs an OWASP heuristic regex scanner to sanitize:

  • OpenAI API Keys (sk-proj-...)

  • Anthropic API Keys (sk-ant-...)

  • GitHub Tokens (ghp_..., github_pat_...)

  • AWS Access Keys (AKIA...)

  • Stripe API Keys (sk_live_..., rk_live_...)

  • Private RSA / OpenSSH Cryptographic Headers

Leaked credentials are substituted in-place with [REDACTED_API_KEY].


šŸ’³ Pricing & Commercial Access (Polar.sh)

  • Free Starter: Up to 2 rule files completely free forever (1 master context + 1 specialized rule).

  • Single Deposit Pass ($1.99 one-time): Lifetime unlock for a single repository migration. šŸ‘‰ Direct Checkout Link

  • Pro Developer ($5.99/mo): Unlimited rule files, priority AST compilation, and CLI unlocks. šŸ‘‰ Direct Checkout Link

  • Team CI/CD & Agency ($19.99/mo): Multi-seat license keys for GitHub Actions CI/CD drift guards. šŸ‘‰ Direct Checkout Link


šŸ“„ License & Compliance

Distributed under the MIT License. Compliant with OWASP Top 10 API Security guidelines, SOC-2 Zero Data Retention principles, and WCAG 2.1 AA accessibility standards.

Available Tools

3 tools
promptshift_sanitize_secretsA

Inspect and redact exposed private credentials (OpenAI sk-, Anthropic sk-ant-, AWS AKIA*, GitHub ghp_*, Google AIza*, Stripe sk_*) from prompt instructions in-RAM. Use this tool before committing, sharing, or deploying AI prompts to prevent credential leaks. Do not use for cryptographic key generation or data encryption. Pure idempotent scanner executing with zero persistent retention.

NameRequiredDescriptionDefault
textYesText, system prompt, or configuration file content to inspect and sanitize.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and discloses meaningful behavior: in-RAM processing, zero persistent retention, and idempotent scanning. It still does not clarify whether the input text is mutated in place or whether a redacted copy/report is returned, which is important for a redaction tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three tight sentences, front-loading the core action and credential examples. Every sentence contributes: the first states what it does, the second states when to use it, the third states an exclusion and key behavioral traits.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter scanner with no output schema, the description is largely complete: it explains purpose, timing, exclusions, patterns, and retention behavior. The main gap is the lack of return-value description, since there is no output schema to define whether the caller receives redacted text, a report, or both.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the single 'text' parameter is already documented in the input schema. The description adds useful context about the credential patterns being detected, but it does not add syntax, formatting, or validation details beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb pair, 'Inspect and redact,' on a clear resource: exposed private credentials in prompt instructions. It lists concrete credential patterns (OpenAI sk-*, AWS AKIA*, GitHub ghp_*, etc.), so an agent can immediately distinguish this sanitization tool from its transpile/validate siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit usage timing: 'before committing, sharing, or deploying AI prompts' and a clear exclusion: 'Do not use for cryptographic key generation or data encryption.' It does not name alternatives such as promptshift_validate_ast or promptshift_transpile, so it stops short of full when/when-not/alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

promptshift_transpileA

Transpile agent instructions, master prompts, and modular rules across Cursor (.cursorrules / .cursor/rules/*.mdc), Anthropic Claude (CLAUDE.md / Claude Projects XML), OpenAI Assistants, and Google Gemini. Use this tool when migrating or porting AI coding configurations between different developer environments. Do not use for general natural language translation or non-AI code refactoring. Operates 100% in-memory with deterministic AST mapping and active secret sanitization.

NameRequiredDescriptionDefault
rulesNoOptional array of modular rule files, each containing a filename and text content.
license_keyNoOptional Polar.sh Order ID or Pro Developer License Key to unlock repositories with >2 modular rule files.
system_promptYesThe master instruction prompt or primary rule document content to transpile.
source_platformYesOriginating AI coding assistant or rule format (e.g., cursor, claude, gemini).
target_platformYesDestination AI ecosystem format to transpile into.

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It discloses important traits: operates 100% in-memory, uses deterministic AST mapping, and performs active secret sanitization. It does not describe output shape or error behavior, but the key operational model is stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three focused sentences. It front-loads the core action and supported platforms, then adds usage boundaries and behavioral context with no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, usage boundaries, and key behavioral traits for a 5-parameter tool with full schema coverage. The main remaining gap is that, with no output schema, it does not explain the return format or result structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters are already documented in the input schema. The description does not add meaning beyond the schema for source_platform, target_platform, system_prompt, rules, or license_key, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb (Transpile) and resource (agent instructions, master prompts, modular rules) and names supported source/target formats. It clearly distinguishes the tool from general translation or non-AI refactoring, but it does not explicitly differentiate from sibling tools promptshift_sanitize_secrets and promptshift_validate_ast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states when to use the tool (migrating or porting AI coding configurations between environments) and when not to use it (general natural language translation or non-AI code refactoring). It does not name alternative sibling tools or conditions for using them instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

promptshift_validate_astA

Evaluate semantic AST fidelity and measure prompt drift percentage between an original agent instruction document and its transpiled counterpart. Use this tool to verify cross-IDE parity and detect omitted constraints after rule conversion. Do not use for code compilation or syntax execution. Returns a normalized fidelity score (0-100%).

NameRequiredDescriptionDefault
source_textYesThe original agent instruction or rule document before transpilation.
target_textYesThe converted target rule document to benchmark for semantic equivalence.

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose that the operation is a pure analysis (explicitly not compilation or syntax execution) and that it returns a normalized fidelity score on a 0-100% scale. It does not say what happens on malformed input, whether the analysis is deterministic, or how drift is computed, so the behavioral picture is good but not complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each doing distinct work: what it measures, when to use/exclude, and what it returns. The core operation is front-loaded in the first clause and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, no-output-schema tool with no annotations, the description covers purpose, trigger conditions, exclusions, and the shape of the return value — enough for an agent to call it correctly. It stops short of explaining the score's interpretation or failure modes, which would be needed for a full 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so source_text and target_text are already fully documented as the original and converted documents. The description restates their relationship (original vs transpiled counterpart) but adds no formatting, size, or validation detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a precise verb+resource pair — evaluate semantic AST fidelity and measure prompt drift between an original instruction document and its transpiled counterpart — so the agent knows exactly what operation is performed. It implicitly separates itself from promptshift_transpile (conversion) and promptshift_sanitize_secrets (redaction) by framing itself as post-conversion verification, but never names those siblings to make the routing explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use this tool to verify cross-IDE parity and detect omitted constraints after rule conversion" gives a clear positive trigger, and "Do not use for code compilation or syntax execution" gives an explicit exclusion. It lacks a named alternative (e.g. 'use promptshift_transpile to produce the target first'), which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedpromptshift_sanitize_secrets
    • First observedpromptshift_transpile
    • First observedpromptshift_validate_ast

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct stage of the workflow: conversion (transpile), credential redaction (sanitize_secrets), and fidelity verification (validate_ast). The descriptions explicitly exclude adjacent use cases (e.g., no general translation, no cryptography), leaving no meaningful overlap.

Naming Consistency5/5

All three tools follow the same `promptshift_` prefix plus a clear snake_case verb_noun pattern (transpile, sanitize_secrets, validate_ast). The convention is predictable and readable throughout.

Tool Count4/5

Three tools form a tight, well-scoped pipeline for prompt transpilation, sanitization, and validation, with no redundant entries. It is on the lean side, but each tool clearly earns its place and the narrow domain does not demand more.

Completeness4/5

The surface covers the core lifecycle: convert prompts between environments, clean secrets, and verify parity afterward. Minor gaps exist around discovering supported source/target formats or retrieving detailed diffs, but agents can work around these from the descriptions.

Maintenance

ActivityActive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers