一键导入
memex-cli
Execute AI tasks (codex/claude/gemini) with memory and resume support via memex-cli stdin protocol.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute AI tasks (codex/claude/gemini) with memory and resume support via memex-cli stdin protocol.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use this skill when the user asks to review performance hotspots, algorithmic complexity, memory usage, latency, caching opportunities, or concurrency tradeoffs. It performs evidence-based performance review and separates obvious fixes from issues that should be profiled first.
Use this skill when the user asks to review formatting, naming conventions, language idioms, lint/style consistency, or import organization. It checks style against project conventions and distinguishes auto-fixable issues from manual fixes.
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
Generates cross-platform commands and scripts for Linux, macOS, and Windows with security validation and compatibility guidance
根据用户需求检索项目代码,提取事实、模式、决策链条,并以自然语言生成一个或多个非代码知识文档到 /docs/kb/
Fallback to memex-cli when codeagent-wrapper is unavailable. Automatically converts codeagent-wrapper syntax to memex-cli stdin protocol and executes.
| name | memex-cli |
| description | Execute AI tasks (codex/claude/gemini) with memory and resume support via memex-cli stdin protocol. |
A CLI wrapper for AI backends (Codex, Claude, Gemini) with built-in memory and resume capabilities.
memex-cli uses stdin protocol to define tasks, allowing:
memex-cli run --stdin <<'EOF'
---TASK---
id: <task_id>
backend: <backend>
workdir: <working_directory>
timeout: 3000000
---CONTENT---
<task content here>
---END---
EOF
| Parameter | Description | Example |
|---|---|---|
id | Unique task identifier | implement-auth-20260110 |
backend | AI backend | codex, claude, gemini |
workdir | Working directory path | <working_directory> or /home/user/app |
<TASK_CONTENT> | Step by step instructions for the task | Implement authentication module |
| Parameter | Description | Example |
|---|---|---|
role_prompt | Task role prompt path | prompts/developer_role.md |
dependencies | Task dependencies | task-a or task-a,task-b |
timeout | Timeout in seconds | 3000000 |
files | File Or Directory paths to load | src/**/*.py (glob supported) |
Write task content as explicit, step-by-step instructions with clear outputs.
Objective:
- <target outcome>
Scope:
- <file/module boundaries>
Steps:
1. <step 1>
2. <step 2>
3. <step 3>
Output:
- <expected deliverable>
Validation:
- <verification criteria>
Objective:
- Implement JWT authentication for login and protected routes.
Scope:
- src/auth/**
- src/middleware/**
Steps:
1. Add token generation and verification utilities.
2. Add auth middleware for protected endpoints.
3. Add input validation and error handling.
Output:
- Updated authentication module and middleware.
- Brief summary of changed files and behavior.
Validation:
- Login returns a valid token.
- Protected route rejects invalid or missing tokens.
Use focused task content per task when using multi-task execution:
Specialized in deep code analysis, large-scale refactoring, and performance optimization.
Specialized in fast feature delivery from clear requirements, technical documentation design, and professional prompt engineering.
Recommended patterns:
# Timestamp format (unique)
task-20260110143052
implement-auth-20260110143052
# Semantic format (readable)
design-api
implement-backend
test-integration
# Hierarchical format (organized)
auth.design
auth.implement
auth.test
Avoid generic IDs like task1, task2.
Use role_prompt to attach a predefined role instruction file to a task.
role_prompt should be a readable file path relative to workdir.memex-cli run --stdin <<'EOF'
---TASK---
id: implement-auth-with-role
backend: codex
workdir: <working_directory>
role_prompt: prompts/developer_role.md
timeout: 3000000
---CONTENT---
Implement JWT-based authentication with input validation and tests.
---END---
EOF
role_prompt.Use files to load relevant context into a task. You can reference single files, directories, or glob patterns.
files: ./README.mdfiles: ./docs/files: src/**/*.tsfiles entries: use commas to separate pathsmemex-cli run --stdin <<'EOF'
---TASK---
id: api-doc-review
backend: claude
workdir: <working_directory>
timeout: 3000000
files: ./README.md,./docs/api/*.md
---CONTENT---
Review API documentation consistency and suggest improvements.
---END---
EOF
Run multiple tasks in a single stdin payload. memex-cli automatically schedules tasks by dependency:
dependencies run in parallel.dependencies run after their prerequisite tasks complete.Use this when tasks are independent and can run at the same time.
memex-cli run --stdin <<'EOF'
---TASK---
id: analyze-frontend
backend: codex
workdir: <working_directory>
timeout: 3000000
---CONTENT---
Analyze the frontend module and list refactoring opportunities.
---END---
---TASK---
id: review-api-contract
backend: claude
workdir: <working_directory>
timeout: 3000000
---CONTENT---
Review API contract consistency and propose improvements.
---END---
EOF
Use this when later tasks depend on earlier outputs.
memex-cli run --stdin <<'EOF'
---TASK---
id: plan-feature
backend: claude
workdir: <working_directory>
timeout: 3000000
---CONTENT---
Create an implementation plan for the notification feature.
---END---
---TASK---
id: implement-feature
backend: codex
workdir: <working_directory>
timeout: 3000000
dependencies: plan-feature
---CONTENT---
Implement the feature based on the approved plan.
---END---
---TASK---
id: validate-ui
backend: gemini
workdir: <working_directory>
timeout: 3000000
dependencies: implement-feature
files: ./mockups/notification/*.png
---CONTENT---
Validate UI consistency and accessibility.
---END---
EOF
Execution modes:
dependencies is set.CLI response text here...
---
RUN_ID: 019a7247-ac9d-71f3-89e2-a823dbd8fd14
Continue from a previous run using --run-id:
# Resume from that run
memex-cli resume --run-id <run_id> --stdin <<'EOF'
---TASK---
id: continue
backend: codex
workdir: <working_directory>
timeout: 3000000
---CONTENT---
基于之前的实现添加功能
---END---
EOF
Context preservation:
Use this pattern for one independent task.
memex-cli run --stdin <<'EOF'
---TASK---
id: <single_task_id>
backend: <codex|claude|gemini>
workdir: <working_directory>
timeout: 3000000
---CONTENT---
<clear task instruction>
---END---
EOF
Use this pattern when you need parallel or dependency-aware execution.
memex-cli run --stdin <<'EOF'
---TASK---
id: <task_a_id>
backend: <codex|claude|gemini>
workdir: <working_directory>
timeout: 3000000
---CONTENT---
<task A instruction>
---END---
---TASK---
id: <task_b_id>
backend: <codex|claude|gemini>
workdir: <working_directory>
timeout: 3000000
dependencies: <task_a_id>
---CONTENT---
<task B instruction>
---END---
EOF
Use this pattern to continue an existing run with preserved context.
memex-cli resume --run-id <run_id> --stdin <<'EOF'
---TASK---
id: <continue_task_id>
backend: <codex|claude|gemini>
workdir: <working_directory>
timeout: 3000000
---CONTENT---
<follow-up instruction>
---END---
EOF