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.

Stars 1
Forks 0

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

bash
# 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

bash
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):
    1. Stop execution
    2. Report: failure reason, exit code, error output
    3. Wait for explicit user instruction
    4. 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

Expand your agent's capabilities with these related and highly-rated skills.

chaorenex1/coding-workflow

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.

1 0
Explore
chaorenex1/coding-workflow

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

1 0
Explore
chaorenex1/coding-workflow

git-code-review

Get git records for specified users and days, perform code review for each commit, and generate detailed code review reports

1 0
Explore
chaorenex1/coding-workflow

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.

1 0
Explore
chaorenex1/coding-workflow

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.

1 0
Explore
chaorenex1/coding-workflow

api-document-generator

Parses interface/API information from files or directories and generates OpenAPI-compliant documentation with timestamps

1 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results