Skip to Content
Documents🤖 AI🎨 AI Use Cases

CodeExpander Pro × AI: Use Case Library

Ready-to-use templates and real-world scenarios

Document index · AI & Productivity


Contents


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):

  1. Copy the error message → clipboard history records it automatically
  2. Copy the related code → same
  3. Open the Clipboard window, click the Batch Mode button (bottom-right)
  4. Check the history entries you need (Shift-click for range, Ctrl-click for multi-select)
  5. 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
  6. Written to clipboard automatically → paste into your AI tool

Sample debug output (2 items selected):

## Error / Issue

TypeError: Cannot read properties of undefined (reading ‘map’) at processItems (app.ts:42)

## Related Code

const data = await fetchData() const items = data.results.map(…) // ← crashes here

Please help me debug the issue above.

Efficiency Comparison

TaskTraditionalCodeExpanderGain
Complex prompt2–3 min~10 s↑ ~92%
Snippet reuse1 min~2 s↑ ~98%
Bug screenshot2 min (multiple tools)~20 s↑ ~83%
Find past reply3 min~5 s↑ ~97%
Run common script30 s~3 s↑ ~90%

More syntax: FillIn variables, Settings.
Last updated: 2026-01-29

Last updated