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