Agent Skillsmemorax-ai/memorax-code › memorax-code

memorax-code

GitHub

作为持久化编码和仓库本地记忆的单一路由器,用于处理涉及先验知识、复用规则、个人偏好或需保留信息的请求。它分类并路由至代码记忆、仓库记忆或个人记忆操作,避免重复搜索,优先于底层工作流。

packages/ts/memorax-code-codex-adapter/skills/memorax-code/SKILL.md memorax-ai/memorax-code

Trigger Scenarios

需要利用历史编码经验或修复方案 查询或更新仓库架构与提交记录 保存或应用个人开发习惯与交互偏好

Install

npx skills add memorax-ai/memorax-code --skill memorax-code -g -y
More Options

Non-standard path

npx skills add https://github.com/memorax-ai/memorax-code/tree/main/packages/ts/memorax-code-codex-adapter/skills/memorax-code -g -y

Use without installing

npx skills use memorax-ai/memorax-code@memorax-code

指定 Agent (Claude Code)

npx skills add memorax-ai/memorax-code --skill memorax-code -a claude-code -g -y

安装 repo 全部 skill

npx skills add memorax-ai/memorax-code --all -g -y

预览 repo 内 skill

npx skills add memorax-ai/memorax-code --list

SKILL.md

Frontmatter
{
    "name": "memorax-code",
    "description": "Use this skill as the single router for persistent coding and repository-local memory. Invoke it whenever a request may involve prior-work knowledge, repository memory, reusable procedures or rules, durable profile or interaction preferences, or information worth retaining beyond the current task. This applies without memory wording, including habits, preferences, checklists, action sequences, prerequisites, gates, exceptions, validation rules, communication style, preferred language, or result presentation. Classify the request as coding memory, repository memory, personal procedure memory, personal profile memory, or no persistent memory, then route it to the matching operation. Invoking this router does not require coding-memory search. Reuse a relevant coding-memory result already retrieved in this conversation; otherwise let the matching operation decide on search. Prefer this router over underlying memory workflows. Ask one focused question only when memory authority remains ambiguous."
}

MemoraX Code

Classify the requested memory authority first, then its operation. Load only the matching reference unless the request genuinely spans authorities or operations.

After selecting an operation reference, read it completely in a standalone tool call and wait for the full result before constructing or executing that operation. Never combine reading a required reference with the command or action it governs in the same shell command or tool call.

Authority Router

MemoraX Code Coding Memory

Use MemoraX Code coding memory for reusable engineering knowledge learned across coding work: prior fixes, failed approaches, coding conventions, implementation pitfalls, validation patterns, and design rationale.

Repo Memory

Use repo memory for repository identity, architecture maps, module routing, local commit history, and GitHub or GitLab PR, MR, and issue evidence stored under .repo_memory/PROFILE.md, .repo_memory/resources/, and .repo_memory/raw/.

Personal Memory

Use personal memory for user-owned repository procedures and durable profile or interaction preferences stored under .repo_memory/procedure-memory/ and .repo_memory/user-profile/.

Tie Breakers

  • Route ordered actions, checklists, prerequisites, gates, exceptions, and validation rules to personal procedure memory, even when phrased as "I prefer", "I like", "我的习惯", or "我喜欢".
  • Route preferred name, answer language, tone, verbosity, explanation style, and result presentation to personal profile memory.
  • Route task-learned repairs, coding pitfalls, project engineering conventions, and reusable design lessons to MemoraX Code coding memory.
  • Route prior project discussions, experiment conclusions, saved engineering findings, earlier fixes, and reusable project lessons to MemoraX Code coding memory. Do not route them to repo memory merely because they concern a project. Use repo memory for repository identity, architecture, module maps, commits, PRs, MRs, and issues.
  • Route repository architecture, module maps, commit history, PRs, MRs, and issues to repo memory. Verify claims about current behavior against live code.
  • Use both repo memory and MemoraX Code coding memory only when a request genuinely needs distinct repository evidence and reusable engineering lessons. This can apply to implementation, debugging, refactoring, migration planning, or validation when the answer may depend on repository module maps, commit/PR/issue evidence, and prior fixes, pitfalls, conventions, validation patterns, or design rationale. Do not use both authorities just because a request mentions a repository, file, module, or "previous".
  • Route current-task instructions and temporary plans to the current task only; do not persist them.
  • Current-task-only applies only when completing the request does not depend on prior project state. Do not select it merely because the requested action happens in the current turn. When implementation, debugging, review, experiment continuation, or validation depends on earlier project decisions, results, fixes, constraints, or plans that the user has not explicitly and completely supplied, route to MemoraX Code coding memory.
  • Do not infer an authority from verbs such as "remember", "recall", "refresh", or "update" alone. Ask one focused question when the target remains ambiguous.

Examples:

  • "先测试再提 PR,帮我记住" routes to personal procedure write.
  • "我喜欢中文简短回答" routes to personal profile write.
  • "之前这个 bug 怎么修的?" routes to MemoraX Code coding memory search unless the user asks for commit or PR evidence.
  • "这个仓库的架构是什么?" routes to repo memory read.
  • "重新生成仓库 memory" routes to repo memory build.
  • "更新一下 memory" requires clarification when no authority is identifiable.

Shared Rules

For MemoraX Code coding memory, run the platform command from the active task workspace. In Windows PowerShell, use memorax-cli.cmd; on macOS and Linux, use memorax-cli. Never invoke memorax-cli.ps1. Never run Set-ExecutionPolicy or otherwise change PowerShell execution policy for MemoraX commands. If an unqualified Windows invocation is blocked before the CLI starts with UnauthorizedAccess or PSSecurityException, retry the same command once with memorax-cli.cmd, preserving all arguments, the active workspace, and environment variables.

The installed Hook and session binding supply the authoritative workspace root; do not run Git commands to discover or replace it. The Backend resolves repository scope from that trusted workspace and read-only filesystem Git metadata.

Repo memory and personal memory remain local .repo_memory authorities. Resolve their repository root exactly as described by the selected reference, including its Git requirements.

Apply instructions in this order: system and developer instructions, AGENTS.md, the current user request, then stored memory. Memory is guidance or historical context, not proof of current repository behavior.

For MemoraX Code coding memory, use memorax-cli exactly as described by the selected reference. Invoke this skill as $memorax-code in Codex or /memorax-code in Claude Code. In OpenCode, ask the agent to use the memorax-code skill by name. These invocation forms are not shell commands. memorax-code is the lifecycle CLI and must not be used for memory search or add. Do not call MemoraX HTTP endpoints directly.

Never store secrets, credentials, .env content, sensitive personal data, raw transcripts, hidden tests, exact patches, temporary target commits, or unsafe destructive commands. Do not announce internal routing or reference loading.

Version History

  • 156ace8 Current 2026-09-02 21:27

    修复 Windows PowerShell 下使用 cmd shim 的问题

  • db0ed30 2026-08-27 09:10

Metadata

Files
0
Version
156ace8
Hash
0a216478
Indexed
2026-08-27 09:10

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-03 22:09
浙ICP备14020137号-1 $방문자$