Inspiration

Every developer on a team describes the same codebase differently when prompting AI tools — so output quality varies person to person. We also noticed that developers constantly retype the same instructions from memory or hunt through Notion docs mid-flow, breaking concentration at the exact moment they need focus most.

We wanted a way for teams to write high-quality, context-aware prompts once and deliver them to every developer at the cursor, pre-loaded with their actual code context. The goal: every developer gets the same quality AI output, without leaving the IDE.


What it does

CAPS is a VS Code extension that surfaces your team's best AI prompts at the cursor, with selected code already injected as context.

Type @@ anywhere in the editor, or right-click, to open your team's shared prompt library. Prompts support {{selection}}, {{filename}}, {{filepath}}, and {{language}} placeholders — substituted with live editor state before handoff to inline chat.

A secondary Boost feature (@caps chat participant) uses Anthropic's API to enhance rough prompts before sending them to Copilot.

The shared library lives in a web app where teams author, vote on, and deprecate prompts. The extension is the read-only, last-mile delivery mechanism.


How we built it

The extension is built on the VS Code Extension API using:

  • CompletionItemProvider
  • QuickPick
  • CodeLens
  • Chat participants
  • SecretStorage for credentials

Prompt data comes from Supabase REST queried directly from the extension (no intermediate server).

The Boost feature calls the Anthropic Messages API using claude-sonnet-4-6.

The entire project is written in TypeScript with strict mode enabled and bundled using esbuild.


Challenges we ran into

VS Code's inline chat API is nearly entirely closed to extensions.

inlineChat.start silently ignores prefill arguments and blocks the event loop until the user closes the chat — meaning any notification placed after the command never appeared while the chat was open.

We solved this with:

  • Clipboard injection
  • Showing notifications before opening inline chat

We also hit a context snapshot timing issue:

Selecting code and then typing a trigger character destroys the selection before the extension can read it.

The fix was snapshotting editor context at command invocation time rather than at handoff.


Accomplishments that we're proud of

The context injection system feels seamless.

A prompt like:

Explain this {{language}} code in {{filename}} and suggest improvements

Built With

Share this project:

Updates

Submission history