Skip to content

Aknirex/prompt-by-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

140 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Prompt by Prompt (PbP)

"Treating your prompts as first-class code, step by step, prompt by prompt."

Prompt by Prompt (PbP) is a VS Code extension that brings Prompt Engineering into your development workflow. It allows you to manage, version, and execute prompts with the same care you give to your code.

Key Features

Prompt Management

  • Prompt as Code: store prompts in the .prompts/ directory using YAML.
  • Tree View: browse and run prompts directly from the VS Code sidebar.
  • CRUD Operations: create, edit, and delete prompts inside the extension.
  • Team Library: load shared read-only prompts from synced team policy packs.

Rule System

  • Workspace + Global + Team Rules: resolve rules from local files, global storage, and team packs.
  • Rule v2: support Markdown rules with YAML frontmatter metadata such as ruleId, canonicalKey, kind, priority, and required.
  • Profiles: switch active rule profiles and bind projects to team policy packs.
  • Explainable Preview: inspect effective policy, preferences, guardrails, environment context, editor context, and final payload before dispatch.

Structured Execution

  • Execution Envelope: internally separate task, policy, and context instead of flattening everything into appended prompt text.
  • Segmented Delivery: format payloads by target agent while keeping a structured internal model.
  • Context Engine: capture selection, file path, language, project, cursor position, and more.
  • Handlebars Templates: use variables like {{selection}}, {{filepath}}, and {{project_name}}.

Team Policies

  • Team Policy Packs: sync shared prompts and rules from local folders or git sources.
  • Team Policies View: inspect sync sources, workspace binding, and installed packs in a dedicated sidebar panel.
  • Workspace Binding: bind a project to a pack/profile via .pbp/policy.json.
  • Sync-first Git: use clone/pull based team sync without exposing full Git workflow complexity.

Passive Rule Projection

  • Optional Compatibility Layer: generate AGENTS.md-style files for agents that automatically read project rule files.
  • Safe Overwrite: only overwrite files previously generated by Prompt by Prompt unless the user explicitly opts out.
  • Projection Formats: support .pbp/compiled/AGENTS.md and root AGENTS.md style outputs.
  • Commands: rebuild and open the projected rule file directly from the extension.

Agent Integration

  • Multi-Agent Support: send prompts to Cline, Roo Code, GitHub Copilot Chat, Continue, Cursor, Codex, Gemini, Tongyi, and more.
  • Clipboard and File Fallbacks: always have a portable delivery option.
  • Smart Detection: automatically detect installed agent extensions.

Multi-language Support

  • Localized UI: supports English, Simplified Chinese (zh-cn), Japanese (ja), Spanish (es), and Korean (ko) based on VS Code display language.

πŸ“¦ Installation

From VS Code Marketplace

Visit the Marketplace

From OpenVSX

Visit OpenVSX

From Source

git clone https://github.com/Aknirex/prompt-by-prompt.git
cd prompt-by-prompt
pnpm install
pnpm run compile

This repository is pinned with Volta, so node and pnpm versions are resolved automatically once Volta is installed and active. Then press F5 in VS Code to launch the extension.

πŸš€ Quick Start

  1. Configure an agent in VS Code settings.
  2. Create a prompt, or connect a Team Policy source.
  3. Open Team Policies and sync shared prompts/rules.
  4. Preview a prompt to inspect the effective policy and execution envelope.
  5. Optionally enable passive rule projection and generate a project AGENTS.md-style file.

Team Policy Pack Example

An official reference pack is maintained locally in:

  • .local/official-team-policy-pack/

It demonstrates:

  • shared prompts
  • team profiles
  • Rule v2 Markdown rules with frontmatter
  • passive projection friendly policies

That folder is intentionally excluded from the published extension package so it can be maintained and published as a separate Git repository.

πŸ”‘ Context Variables

Variable Description
{{selection}} Selected text in the editor
{{filepath}} Relative file path
{{file_content}} Full file content
{{lang}} Programming language
{{project_name}} Workspace folder name
{{git_commit_diff}} Git diff of changes

Current Release Highlights

Version 1.13.0 adds:

  • structured rule envelope preview and dispatch assembly
  • Rule v2 frontmatter support for Markdown rules
  • Team Policies view and team pack based prompt/rule governance
  • passive rule projection with rebuild/open commands

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for development guidelines.

πŸ“„ License

GPL v3 License - see LICENSE for details.


Your Prompts, Your Data - Nothing touches our servers.

About

VS Code extension for managing prompts & agent rules.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors