CodeExpander Pro ร AI: Use Case Library
Ready-to-use templates and real-world scenarios
Document index ยท AI & Productivity
Contents
- AI prompt templates
- Code snippet library
- Screenshot workflow
- Clipboard scenarios
- Automation scripts
- Cross-project reuse
AI Prompt Templates
Code generation
Use FillIn: %fillmenu% for language, %fillarea% for requirements, %fillcheck% for options (comments, tests, best practices). Example abbreviation ai-gen; in ChatGPT/Claude type ai-gen + Tab โ form โ full prompt.
Test case generation
%cv% inserts clipboard; copy code then trigger e.g. ai-test with %fillmenu% for framework (Jest, Pytest, etc.).
Code review prompts
Use %cv% to paste code, %fillcheck% for review dimensions. See FillIn variables.
Doc generation
README/API doc generators: %filltext%, %fillarea%, %fillmenu% for project name, type, language, description.
Code Snippet Library
Error handling
Python (e.g. try-py): try/except with %c% for body. JavaScript: try/catch + %c%.
Logging, tests, API routes
Structured log: %filltext% message, %fillmenu% level, %c% for extra. Jest/Pytest: describe + test, %filltext% name. Express/FastAPI: %fillmenu% method, %filltext% path.
Screenshot Workflow
Bug reports
Shortcut โ select region โ rectangle, arrows, text โ copy โ paste to Issue/Jira.
Docs
Capture code or UI โ gradient + rounded corners + shadow โ numbered circles + highlight โ copy or save.
Code comparison
Scroll capture Before/After; Pin Before, highlight After in green/yellow.
Clipboard Scenarios
- AI reply history: Copies go to history; search in clipboard window and paste; favorite important replies.
- Snippet from clipboard: Copy code โ clipboard window โ โCreate snippetโ โ abbreviation and group โ reuse and sync.
- Multi-step paste: Batch copy config; paste in order from clipboard (env vars, forms, migration).
Automation Scripts
Git (Shell / JS)
Quick commit: git add . + commit -m โ%filltext&name=message%โ + push. Feature branch: %filltext% type and name. Status: JS snippet with execSync(โgit status โshortโ).
Docker, scaffold, data
docker-clean (prune); init-node/init-python (mkdir + package manager + .gitignore); json-format with %cv% or {{clipboard}} โ JSON.stringify(parsed, null, 2).
Cross-Project Reuse
Groups: e.g. ProjectA (prefix pa-), ProjectB (pb-), Common (no prefix). ExpandIn: Limit by app or directory. Microservices: one group per service (us-dev, os-dev), shared scripts (k8s-status, k8s-logs) in Common.
๐ญ Prompt Variant Management
The same prompt scenario often needs multiple versions (quick/deep/strict). Use %fillmenu% to pop up a selection at expand time โ zero switching cost.
Code Review Variant Selector
Abbr: ai-review
Group: AI-Prompts/Review
Type: plain
---Content---
%fillmenu&name=Review Mode&opt=quick&opt=deep&opt=security%
{{if quick}}Please do a quick review of the code below โ focus only on the most critical issues:
{{elif deep}}Please do a deep review covering architecture, performance, maintainability, and security:
{{elif security}}Please audit the code below from a security perspective, focusing on OWASP Top 10:{{end}}
```%cv&md=%```Trigger
ai-reviewโ choose โquick / deep / securityโ in the popup โ the matching variant expands with clipboard code wrapped automatically.
Inline One-Liner Variant
When only a few words differ, embed the menu directly in the template:
Please %fillmenu&name=Action&opt=refactor&opt=optimize for performance&opt=add unit tests&opt=convert to TypeScript% the code below:
%cv&md=%Abbr: ai-action. After expanding: โPlease refactor the code below: โฆโ or โPlease optimize for performanceโฆโ.
๐ Multi-Clipboard Context Builder
Scenario: You have an error message, related code, and a config snippet โ you need to combine them into a single AI debugging prompt.
Steps (requires current CodeExpander version):
- Copy the error message โ clipboard history records it automatically
- Copy the related code โ same
- Open the Clipboard window, click the Batch Mode button (bottom-right)
- Check the history entries you need (Shift-click for range, Ctrl-click for multi-select)
- Click the ๐ค Combine as AI Prompt button in the bottom toolbar, choose a template:
- Debug / Error analysis: first entry โ Error block, rest โ Code blocks, with a debug request appended
- Code review: all entries merged into a code block with a review request
- Plain join: entries joined with
---separators
- Written to clipboard automatically โ paste into your AI tool
Sample debug output (2 items selected):
## Error / IssueTypeError: Cannot read properties of undefined (reading โmapโ) at processItems (app.ts:42)
## Related Codeconst data = await fetchData() const items = data.results.map(โฆ) // โ crashes here
Please help me debug the issue above.Efficiency Comparison
| Task | Traditional | CodeExpander | Gain |
|---|---|---|---|
| Complex prompt | 2โ3 min | ~10 s | โ ~92% |
| Snippet reuse | 1 min | ~2 s | โ ~98% |
| Bug screenshot | 2 min (multiple tools) | ~20 s | โ ~83% |
| Find past reply | 3 min | ~5 s | โ ~97% |
| Run common script | 30 s | ~3 s | โ ~90% |
More syntax: FillIn variables, Settings.
Last updated: 2026-01-29