返回 Skill 列表
extension
分类: 内容与媒体无需 API Key

aiclimenu

通过命名管道外包AI任务以获得隔离的上下文。在处理大文件、批量摘要或为了避免上下文污染时使用。每次调用都在新的上下文中运行。

person作者: jakexiaohubgithub

AICLIMenu Skill

Farm out work to a separate Codex instance running as a Named Pipe service. Each request gets fresh, isolated context - perfect for avoiding hallucinations when processing large amounts of data.

When to Use This Skill

  • Large file processing: Summarize files without filling your main context
  • Batch operations: Process multiple files with isolated context per file
  • Context pollution prevention: Keep your main conversation clean
  • Script automation: Write scripts that leverage AI for specific tasks

Prerequisites

  1. AICLIMenu service must be running:

    cd path\to\AICLIMenu\windows
    .\Start-Service.bat
    
  2. Ask the user: "Is the AICLIMenu service running?"

Usage Patterns

Direct Call (Interactive)

Use CodexClient.ps1 to send a request and get a response:

# Simple prompt
.\CodexClient.ps1 -Prompt "Summarize this: [content]"

# With options
.\CodexClient.ps1 -Prompt "Analyze this code" -Sandbox read-only -TimeoutSeconds 120

Script Generation (Automation)

Generate PowerShell scripts that use AICLIMenu:

# Example: Summarize a file
$content = Get-Content -Path "C:\path\to\file.txt" -Raw
$prompt = "Summarize this file:`n$content"

# Call the service
$result = & ".\CodexClient.ps1" -Prompt $prompt -Raw

# Parse the result
$responses = $result | Where-Object { $_ -match '^\{' } | ForEach-Object { $_ | ConvertFrom-Json }
$finalResult = $responses | Where-Object { $_.status -eq 'success' }
$summary = $finalResult.result.message

Batch File Processing

Use the built-in CSV processor with custom prompts:

# Create CSV with file paths
@"
FilePath,Category
C:\docs\report.docx,Reports
C:\code\app.py,Code
"@ | Out-File files.csv

# Run with default summarization prompt (outputs files_processed.csv)
.\Process-Files.ps1 -CsvPath files.csv

# Run with custom prompt using placeholders
.\Process-Files.ps1 -CsvPath files.csv -Prompt "Extract all dates from: {fileContent}"

# Resume if interrupted
.\Process-Files.ps1 -CsvPath files.csv -Resume

Prompt placeholders: {fileName}, {extension}, {filePath}, {fileContent}

Context Isolation

Each call to AICLIMenu spawns a fresh codex process. This means:

  • No memory of previous calls
  • No context pollution between requests
  • Clean slate for each task
  • Ideal for processing many items independently

JSON Request Format

{
  "prompt": "Your task here",
  "options": {
    "sandbox": "read-only",
    "timeout_seconds": 120
  }
}

JSON Response Format

{
  "status": "success",
  "result": {
    "message": "The AI response...",
    "events": [...]
  },
  "duration_ms": 1234
}

Service Commands

  • ping - Health check
  • status - Service info
  • shutdown - Stop service

Source Code

Optional: Get the latest version from GitHub:

git clone https://github.com/ai-servicers/AICLIMenu.git

Troubleshooting

  • "Pipe not found": Start the service with .\Start-Service.bat
  • Timeout errors: Increase -TimeoutSeconds parameter
  • Service not responding: Check the service window for errors