Agent skill
memex-fallback
Fallback to memex-cli when codeagent-wrapper is unavailable. Automatically converts codeagent-wrapper syntax to memex-cli stdin protocol and executes.
Install this agent skill to your Project
npx add-skill https://github.com/chaorenex1/coding-workflow/tree/main/skills/memex-fallback
SKILL.md
Memex Fallback
Automatically detect codeagent-wrapper availability and convert to memex-cli when needed.
Detection Logic
# Check if codeagent-wrapper exists
if command -v codeagent-wrapper &> /dev/null; then
# Use codeagent-wrapper directly
codeagent-wrapper {{LITE_MODE_FLAG}}--backend <backend> {{GEMINI_MODEL_FLAG}}- "$PWD" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
<content>
</TASK>
OUTPUT: <output requirement>
EOF
else
# Fallback to memex-cli with parameter conversion
invoke memex-cli bridge mode
fi
Parameter Conversion
codeagent-wrapper → memex-cli
| codeagent-wrapper | memex-cli stdin |
|---|---|
--backend <backend> |
backend: <backend> |
--model <model> |
(use default or pass via content) |
"$PWD" |
workdir: <working_directory> |
ROLE_FILE: <path> |
role_prompt: <path> |
<TASK>...</TASK> |
---CONTENT---...---END--- |
OUTPUT: <req> |
(include in ---CONTENT---) |
{{LITE_MODE_FLAG}} |
(ignore, not applicable) |
{{GEMINI_MODEL_FLAG}} |
(ignore, not applicable) |
memex-cli Invocation
memex-cli run --stdin <<'EOF'
---TASK---
id: <unique_task_id>
backend: <codex|gemini|claude>
workdir: <working_directory>
role_prompt: <role_prompt_path>
timeout: 3600000
---CONTENT---
<TASK>
<content from original TASK block>
</TASK>
OUTPUT: <output requirement from original OUTPUT line>
---END---
EOF
Task ID Generation
Generate unique task ID:
- Format:
<feature>-<timestamp> - Example:
auth-impl-20260322-143052
Exit Handling
- Success: Return memex-cli output directly
- Failure (exit code ≠ 0):
- Stop execution
- Report: failure reason, exit code, error output
- Wait for explicit user instruction
- NO automatic fallback
Security Notes
- Do not expose sensitive information in task instructions
- Verify file paths are within expected directories
- Task instructions should not include passwords, API keys, or personal data
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
tdd
Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.
codex-cli-bridge
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
git-code-review
Get git records for specified users and days, perform code review for each commit, and generate detailed code review reports
component-tester
This skill should be used when the user asks to "test memex-cli", "test code-with-codex", "test ux-design-gemini", "test /multcode", "run component tests", "validate workflow components", "run integration tests", or "verify plugin functionality". Provides comprehensive testing framework for coding-workflow plugin components.
test-case-organizer
This skill should be used when the user asks to "测试用例整理", "测试整理", "organize test cases", "reorganize tests", "consolidate scattered tests", or mentions test cases scattered in business code that need to be moved to proper test directories.
api-document-generator
Parses interface/API information from files or directories and generates OpenAPI-compliant documentation with timestamps
Didn't find tool you were looking for?