limem.pattern

A markdown profile editor for a person, AI agent, project, team, or service. It stores one document per profile and divides it into sections for later retrieval.

In plain words
What is it for?
Use it to view, replace, or add sections to user, agent, or project profiles, such as commands, coding style, and rules.
Why use it?
It keeps project rules, preferences, and other long-form context in one explicit place instead of scattered notes or temporary events.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/gaooooosh/limem-agent-plugin/limem.pattern
Any agent
npx skills add gaooooosh/limem-agent-plugin --skill limem.pattern
Clone the repo
git clone --depth 1 https://github.com/gaooooosh/limem-agent-plugin

Made for: Claude Code, Codex.

Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,402 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00110 $0.01402
Opus 5 $0.00055 $0.00701
Sonnet 5 $0.00022 $0.00280
Haiku 4.5 $0.00011 $0.00140

Measured 2d ago against content hash 4417a5053aeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

limem.pattern scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin-src/skills/limem.pattern/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/limem.pattern — Principal Markdown 档案的唯一编辑入口

每个 principal(user / agent / project / team / service)可以挂一篇 markdown 文档。 后端按 ^## 切片,每段独立打分;客户端在 UserPromptSubmit 时按相关性注入命中段。

/limem.remember 只写 event,不会自动生成档案——档案必须通过本 skill 显式编辑。 文档结构完全自由,建议(但不强制)用 H2 分节:

  • ## 命令规约 / ## Commands(项目偏好/禁用的开发命令)
  • ## 用法 / ## How to use
  • ## 反例 / ## Don't
  • ## 风格 / ## Style(代码风格、注释语言、命名)
  • ## 相关 / ## See also

何时调用

  • 用户说 "给项目写个档案" / "把约定记下来" / "update my agent profile"
  • 用户问 "limem 里关于本项目存了什么" / "show me my user profile"
  • 自动建议:在 /limem.remember 完成后、scope=project 且 mem_type=rule 累计较多时, 主动建议把规约 append 到 project principal

参数解析

  • $1 = principal 标识:
    • 别名:project / user / agent(最常用;自动解析到当前会话的 stable id)
    • 或完整 entity_id(形如 principal_project_<sha8> / principal_user_<sha8> / principal_agent_<slug>
  • $2 = modeget / put / append,缺省 get
    • get —— 拉取并展示当前 markdown,不写后端
    • put —— 整篇覆盖(需要用户确认;新内容从交互式提示读取多行)
    • append —— 内部先 get,把新增段落拼到末尾再 put;适合"加一节规约"

处理步骤

Step 1 — 解析 principal

直接把 $1 传给 limem_pattern_get / put / delete 即可——这些工具内部已经支持 project / user / agent 别名解析。如果输入是用户编造的别名(如某个 canonical 字符串), 工具会在 entity 不存在时返回错误,按 Step 3 处理。

Step 2a — mode=get

limem_pattern_get(entity_id="<alias_or_id>"),渲染:

📄 Principal <entity_id> 的当前档案(共 <total_chars> 字符):

<content(原样 markdown,不要二次格式化)>

如需修改:再次运行 /limem.pattern <alias> put
如需追加章节:/limem.pattern <alias> append

has_pattern=false → 提示"该 principal 尚无档案",给出 put 模板示例。

Step 2b — mode=put

  1. limem_pattern_get 拉旧版本作为对照(若有)。

  2. 强制确认 UI(覆盖语义不可逆——后端无版本历史):

    ⚠️ 即将整篇覆盖 principal <entity_id> 的档案。
       旧版本字符数:<old_total_chars>
       新版本字符数:<new_total_chars>
    
       旧档案前 5 行 / 新档案前 5 行 对照...
    
    确认覆盖?[y / n]
    
  3. 用户 y → 调 limem_pattern_put(entity_id, content);其它 → "已取消"。

  4. 回执:

    ✓ principal <entity_id> 档案已 <created|updated>(总字符 <total_chars>)。
      下次 SessionStart 与匹配 prompt 时会自动召回 H2 切片。
    

Read the full file on GitHub · 120 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 120 lines · 110 tokens per session scan A 4417a5053aeb

Subscribe to this mod's changes

limem.pattern is a skill published in the GitHub repository gaooooosh/limem-agent-plugin (2 stars, last pushed 3mo ago), licensed MIT. It adds 110 tokens to every session and 1,402 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens