Datasets:
name: user-md
description: >-
Keep your AI's understanding of you in a Markdown file you own - a
five-section USER.md with a hand-written lane and an append-only agent-curated
lane (dated, sourced, confidence-tagged), machine-local facts split into a
gitignored USER.local.md. No silent rewrites; moves when your folder moves.
Use when setting up a USER.md or user profile for an agent, recording user
preferences or working style, deciding which file a fact about the user
belongs in, curating agent-observed habits with confidence tags, onboarding a
new agent to an existing user, or carrying personalization across machines and
harnesses. 中文触发:用户画像、用户偏好沉淀、记住我的习惯、USER.md 建档养护。
English | 简体中文
user-md: user-profile file discipline
Your AI's understanding of you should live in a file you own — not locked inside some vendor's cloud account. This document is the profile file's discipline (it teaches an agent how to build, maintain, and use this file), not a memory system (it bundles no runtime and no automatic pipeline). Read the details in
references/on demand — those two files are written in Chinese, and this English SKILL is self-contained without them: curation details incuration.md, layering criteria and host integration inlayering.md. The size and frequency thresholds for the whole file family are defined exactly once, in the threshold table inreferences/curation.md— this document and every other file only ever reference it, never re-state the numbers.
Core stance (four sentences)
- You own the file: plain Markdown, readable/editable/deletable by any editor, moves when your folder moves.
- Two lanes, clearly separated: the hand-written lane belongs to the user — the agent may only suggest, never rewrite it; the curated lane belongs to the agent — append-only, every entry leaves a trace.
- No silent rewrites: any rewrite leaves a trace (one line in the change log); every piece of content stays visible, editable, and deletable by the user.
- No fabricated facts: the curated lane only records genuine observations; a single observation must carry an unverified tag; anything not actually observed doesn't get written.
1. Build: the file family and the five sections
The three-file family
| File | What it holds | Traits |
|---|---|---|
USER.md |
The user profile that still holds across machines and projects | Portable; injected in full every session, must stay small (threshold in references/curation.md) |
USER.local.md |
Content that stops being true on a different machine: environment / paths / toolchain / credential pointers | Machine-local; must be gitignored |
user/*.md overflow helper files |
Details moved out once the curated lane crosses its sink-down line | Main file keeps a one-line index, loaded on demand |
USER.md's five sections (settled structure — template in templates/USER.md)
## Who I am— identity facts: role / background / how to address them. Keep facts and preferences stored separately (splitting these two kinds of information is a common practice across several product-grade memory systems).## How I work— preferences and style: communication style / deliverable standards / acceptance habits / default authorization boundary.## Our relationship— relationship and collaboration: what to ask about, what to just do, how feedback should be given.## What I'm up to— the dynamic-cognition layer: current goals and what's in progress — explicitly revisable assumptions, updated as evidence comes in, cleared once stale.## Learned by your agent— the agent-curated lane (rules in the two-lane section below).
Naming discipline: section names follow the facts/preferences lineage; the word "persona" is banned throughout — in a UX context it means a fictional archetype user, in an agent context it means the agent's own personality; the double meaning is guaranteed to cause ambiguity if used.
Getting started: copy the two templates from templates/ into your workspace root, add USER.local.md to .gitignore, and spend five minutes filling in the first four sections. It still runs even left empty — but the agent starts every session with zero knowledge of you.
2. Maintain: the two-lane system and curation discipline
The two-lane system
The hand-written lane (the first four sections): written by the user themselves. When the agent notices content that's stale or contradictory, it may only suggest (giving suggested text plus a reason) — the user makes the change themselves, or it's applied only after explicit consent, and one line goes into the change log at the end of the file once it's done.
The curated lane (the fifth section): appended by the agent. Each entry's format:
- [YYYY-MM-DD · source event] the rule text itself. [single observation, unverified]Date + source is every entry's birth certificate; a single observation must carry the unverified tag. Once the same type of observation recurs enough to cross the promotion threshold (in
references/curation.md), a promotion proposal may be raised — it only moves into the hand-written lane after the user confirms. Full format and process inreferences/curation.md.
Signals and false positives
- Three categories of signal worth curating: correction (the user corrected your approach or understanding), repeated preference (the same kind of request recurs across different occasions), explicit statement (the user directly says "remember this" / "always do X from now on").
- Hard rule: append on the spot: once a signal hits one of the three categories and clears the false-positive filter → append it to the curated lane on the spot — don't batch it up, and don't leave it to be reconstructed from memory at the end of the session. Recognizing it and not writing it down is the same as not having this discipline at all.
- False-positive filtering: don't curate one-off context (a requirement specific to this task ≠ a standing preference); ignore extremely short messages by default (filter threshold in
references/curation.md); down-weight confidence for anything said in an emotional moment; instructions tightly bound to a specific task belong to the task, not the profile.
Consolidation and size
- Consolidate and de-duplicate on a regular cadence (period in
references/curation.md's threshold table): merge synonymous entries, clear out stale ones; consolidation and promotion-driven removal are the only two legitimate scenarios for rewriting the curated lane, and both must leave a trace in the change log. - Once the main file crosses its size target, or the curated lane crosses its sink-down line (thresholds both in
references/curation.md) → sink the details intouser/*.mdhelper files, leaving an index line in the main file.
3. Use: injection and routing
Injected every session
The main file is kept small so the host can load what a task needs; whether it's loaded across projects, vendors, or models must be authorized by the user, following minimum necessary disclosure. Pick one wiring per host (details for each host are in the Compatibility section of the README):
- A reference line in the instructions file: e.g. Claude Code adds one line,
@USER.md, to CLAUDE.md; - A host with no reference mechanism: add a line to the system prompt or rules file, like "read USER.md before starting work each session";
- An optional session-start hook (optional wiring — this skill bundles no runtime of its own, and the discipline holds without one). Example Claude Code config:
{
"hooks": {
"SessionStart": [
{ "hooks": [ { "type": "command", "command": "cat USER.md" } ] }
]
}
}
(A POSIX example; swap in the equivalent command for Windows or another host. Whether to wire it, and how, is entirely up to the user.)
Three-line routing test (a weak-model fallback — full detail in references/layering.md)
- Stops being true on a different machine →
USER.local.md; - Stops holding on a different project/role → that project's own local file;
- Everything else →
USER.md.
Pointer discipline: don't re-copy a fact that already has an authoritative source elsewhere — leave only a pointer line ("see such-and-such file for detail") to prevent the two sources from drifting apart. Worked examples in references/layering.md.
4. Two-tier layout for multi-agent teams (one user × several role agents)
A single USER.md is enough for one agent; when the same user runs several role agents (one each for orchestration / engineering / testing / design, each with its own working directory), the profile splits into two tiers — never one full profile copy per agent home:
- Shared tier (one file, team-shared location): preferences / red lines / decision standards that hold across roles — "lead with the conclusion", "human confirmation before publishing" — stored once, read by every agent.
- Role tier (0..n files, each agent's own directory): only entries that stop being true when the role changes — "use strict mode when reviewing code" belongs to the engineering agent's role tier; the design agent never needs it.
The single routing test: would this stop being true in another role? Only then does it stay in the role tier; everything else goes to the shared tier. This is routing line 2 of the three-line test, made concrete for the multi-agent case.
Three companion rules:
- No file at birth: a newly onboarded agent gets no pre-created role-tier file (an empty shell carries no information); create it when the first role-specific preference appears (YAGNI).
- Same entry format: both tiers use the curated-lane format (date + source + unverified tag); promotion and consolidation rules are unchanged.
- Lift on consolidation: during periodic consolidation, check each role tier — entries that actually hold across roles get lifted to the shared tier and deleted from the role tier, preventing the same preference from drifting across N copies (with N copies, one is always stale, and the agent reading the stale one works from an outdated preference).
Field provenance: converged from a 16-agent production team (sanitized) — initially every agent home grew its own profile, the same preference was copied in several places and versions drifted apart; converging to two tiers with "stops being true when the role changes" as the sole test ended the drift. Single-user single-agent readers can skip this section.
Privacy red lines
- This file family is inherently full of PII — treat it as sensitively as the most sensitive thing you handle.
- "Moves with your folder" is user portability, not automatic authorization for cross-project, cross-vendor, or cross-model sharing; confirm scope before loading, and inject only the part the current task actually needs.
USER.local.mdmust be gitignored, and must never be committed.USER.mdmust be manually reviewed before pushing to any public repository: check real names, contact details, employer specifics, and credential pointers item by item.- Plaintext passwords / API keys / tokens must never be written into this file family — only a pointer to where the credential lives and how to call it.
- Templates must never ship pre-filled with real content — every template this skill ships is placeholders plus fictional examples.
Quick examples
- The user says, once again, "give me the conclusion first in replies," and the same-type unverified entry in the curated lane has crossed the promotion threshold (see
references/curation.md) → draft a promotion proposal (fold it into one sentence, intended for How I work), and move it only once the user confirms. - The user says "use pnpm on this machine, not npm" → stops being true on a different machine → record it in
USER.local.md. - The user says, inside a particular repo, "commit messages for this project are in Spanish" → doesn't hold outside this project → record it in that project's local file, don't write it into
USER.md. - The user vents late at night, "I'm so done, don't show me any more long replies" → an emotional moment → curate it as a single observation with confidence down-weighted, don't touch the hand-written lane directly, and certainly don't treat it as a hard rule.
- The user's hand-written lane says "I'm working on project X" but it hasn't come up in three months → the agent suggests updating the What I'm up to section, with a reason attached; not a single word changes before the user nods.
Version & update self-check
- Current version: 1.1.0 (matches the root
plugin.json, which is this release's package manifest). - Repository:
https://github.com/LucioLiu/user-md - Self-check: for plugin installs, the host's update mechanism follows the version number; for manual clone / template-copy installs, diff this file against the repo's main branch to see if you're behind. Your own
USER.mdfile family is unaffected by a skill update — that's your data, not part of the skill.
Both language editions are maintained in sync. If they ever diverge, the Chinese edition is authoritative — please open an issue if you spot one.