context-bridge
git clone https://github.com/pasindudilshan1/context-bridge
git clone --depth=1 https://github.com/pasindudilshan1/context-bridge ~/.claude/skills/pasindudilshan1-context-bridge-context-bridge
SKILL.mdContext Bridge
A skill that generates a precise, pasteable Context Block — a structured handoff document that gives any AI tool instant full project context. Zero re-explaining. No context drift.
The problem it solves: You switch from Claude to Cursor, or start a new chat, and spend 10 minutes re-explaining your stack, decisions, constraints, and progress. Every re-explanation introduces drift — the new AI makes slightly different assumptions. Context Bridge eliminates this entirely.
Two Modes
Detect which mode to use from the conversation:
Mode 1 — Generate (default)
User has a project in progress. Generate a Context Block from what you know.
Mode 2 — Decompile
User pastes a raw AI conversation or messy notes. Extract and restructure into a clean Context Block.
Detect Decompile when: user says "extract context from this", "turn this convo into a context doc", "decompile this chat", or pastes a long block of AI conversation text.
Mode 1: Generate — Step by Step
Step 1: Silent Extraction
Before asking anything, silently extract every dimension you can from the current conversation:
| Dimension | What to extract |
|---|---|
| Stack | Languages, frameworks, libraries, databases, hosting |
| Auth / Security | Auth method, token storage, roles, policies |
| Architecture | Patterns chosen (monolith, microservice, API-first, etc.) |
| Decisions Made | Anything the user chose or ruled out during this session |
| Constraints | Hard limits — budget, performance, compatibility, style rules |
| Coding Conventions | Naming, file structure, component patterns |
| Current State | What is built and working |
| Next Step | Exactly what task the user is about to do in the next tool |
| Target Tool | Where this block is going (Cursor, ChatGPT, Gemini, v0, Bolt, Claude Code, etc.) |
Step 2: Ask Only What's Missing
Ask maximum 3 questions for any dimensions that are completely absent and critical. Never ask for something you can infer. Batch all questions in one message.
Priority order for questions (ask highest priority gaps first):
- What is the next task? (most critical — shapes the entire block)
- What tool is this going to?
- Any hard constraints the current session didn't cover?
Step 3: Route to Target Tool Format
Read
references/tool-profiles.md for the specific formatting rules of the target tool.
If the target tool is not in the profiles list, use the Universal Format defined at the bottom of this file.
Step 4: Generate the Context Block
Output the block in a copyable code fence. Always include:
## 🔁 Context Block — [Project Name] → [Target Tool] [Generated at: YYYY-MM-DD] ### Project [1-2 sentence project description. What it does. Who it's for.] ### Stack [List every confirmed technology. No guessing.] ### Architecture & Patterns [Structural decisions. What pattern is being used and why, if known.] ### Decisions Made (Do Not Revisit) [Numbered list. Each item is a closed decision. No soft language like "we're considering".] ### Constraints (Hard Rules) [Numbered list. Absolute limits. The target AI must not violate these.] ### Coding Conventions [Naming rules, file structure, component rules, style guide references.] ### Current State [What is fully built and working. Bulleted. Past tense.] ### What's Not Done Yet [What is known-incomplete. Do not invent.] ### Your Task Right Now [Single paragraph. Exact task for the target AI. Be surgical. State the success condition.] ### Memory Block [Compressed key-value pairs of everything that must carry forward. Formatted for direct injection.]
Step 5: Add the Footer
Always end every Context Block with:
--- 💡 Generated by context-bridge — github.com/[your-username]/context-bridge Paste this block at the top of your next conversation. Do not modify unless correcting errors.
Mode 2: Decompile — Step by Step
User pastes raw conversation text. Your job: extract signal, discard noise.
Step 1: Read the full paste
Identify:
- Decisions that were finalized (look for "let's go with", "we'll use", "decided", "confirmed")
- Things that were ruled out (look for "don't use", "avoid", "won't work because")
- Stack details mentioned anywhere
- Tasks that were completed vs tasks that are still open
- Any hard constraints stated
Step 2: Discard
Strip out: greetings, pleasantries, failed attempts, tangents, anything marked as "just testing", hallucinations the user corrected.
Step 3: Generate
Use the same Context Block format as Mode 1. Add a note at the top:
[Decompiled from conversation — verify accuracy before using]
Step 4: Ask for confirmation
After generating: "Does this look accurate? Anything to add or remove before you paste it?"
Universal Format (for unknown tools)
When the target tool is not in
references/tool-profiles.md, use this format. It works with every AI system:
You are continuing work on an existing project. Here is the full context: PROJECT: [name and 1-sentence description] STACK: [comma-separated list] DECISIONS: [numbered list of closed decisions] CONSTRAINTS: [numbered list of hard rules] DONE: [bulleted list of completed work] TASK: [exact next task, stated as an imperative] MEMORY: [key: value pairs, one per line] Begin immediately with the TASK. Do not re-ask for context already provided above.
Quality Rules
- Never guess stack. If a technology wasn't confirmed in the conversation, don't include it.
- Never soften decisions. If something was decided, write it as decided. Not "we're thinking about using React" — write "Frontend: React 18".
- Task section is always imperative. "Build the auth middleware" not "We need to work on auth".
- Memory Block is always compressed. Key: value. One per line. No prose.
- No padding. Every word in the block must be load-bearing. Cut anything the target AI doesn't need.
- Date stamp every block. Stale context is worse than no context.
Output Format
Always wrap the Context Block in a code fence with a copy button comment:
```context-block [block content here] ```
Then add below the fence:
How to use: Copy everything inside the code block above and paste it at the very start of your first message in the target tool.
Reference Files
— Target-tool-specific formatting rules (Cursor, ChatGPT, Gemini, v0, Bolt, Claude Code, GitHub Copilot, Windsurf, Replit, Perplexity)references/tool-profiles.md
— Signal extraction patterns for Decompile Modereferences/decompile-patterns.md
Read only the section you need. Do not load both files unless running Decompile Mode on a Cursor/Windsurf conversation.