用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Morrison-Lab/ai-config --skill record-learnings命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | record-learnings |
| description | Persist insights to memory. |
| user-invocable | true |
| allowed-tools | ["Bash","Read","Edit","Write"] |
As you work, actively record what you learn so it's available in future sessions — both to you and to other AI agents sharing the same config.
/memories/)For facts that apply across all projects:
When you add a new file under /memories/ (not just a bullet to an existing
one), register it in memories/MEMORY.md as an index entry.
For facts specific to ONE repo (build quirks, project conventions, CI
behavior), if it's a repo we own: commit them to that repo's own
agent docs via a PR (CLAUDE.md, .github/copilot-instructions.md, or
whatever agent-doc infrastructure it already has), so the whole team and
every @claude session there can see them. If that repo has no agent-doc
infrastructure yet, write to its local Claude project memory directory
instead — ~/.claude/projects/<project-path>/memory/ — as short-lived
staging only, not a durable destination, and flag that a PR adding
agent-doc infrastructure to that repo (plus migrating the staged memory
there) is still needed. The project path is the repo's directory path
with / replaced by - — e.g. /Users/you/Documents/GitHub/rme →
~/.claude/projects/-Users-you-Documents-GitHub-rme/memory/. Update
MEMORY.md in that directory as an index when you used this local-staging
fallback — not when the fact was committed directly to the owned repo's
own agent docs, which needs no local copy.
For an external repo we don't own, never open a direct PR
autonomously — follow upstream-issues:
check its contribution policy first, then draft and get explicit user
approval before posting anything. Stage the fact in local Claude project
memory (short-lived, not durable) until approved, and update that
directory's MEMORY.md as an index entry, same as the owned-repo staging
fallback above.
~/.claude/skills/)For reusable workflows that other agents should also follow:
For standing instructions that should always be in context:
| Category | Example | Where |
|---|---|---|
| Bug diagnosis | "bash EOF error = CRLF line endings" | /memories/debugging.md |
| Tool quirk | "glab reads GITLAB_TOKEN, and it takes precedence over the stored config" | The matching topical file -- /memories/gitlab.md here; see memories/MEMORY.md |
| Codebase fact | "CI only runs on branch pushes, not PR events" | That repo's own agent docs (or staging) |
| Workflow | "Always run r-pkg-spellcheck before push" | Skill file |
| Preference | "Always request the repository owner as reviewer" | /memories/preferences.md |
| Failed approach | "Don't use merge_request_event with $CI_OPEN_MERGE_REQUESTS" | That repo's own agent docs (or staging) |
Measured YYYY-MM against version X / snapshot reference)
and state that third-party behavior evolves across releases.
If you created a new file under /memories/, also add a row for it to
memories/MEMORY.md (the index)CLAUDE.md, .github/copilot-instructions.md,
or whatever it already has). If that repo has no agent-doc
infrastructure yet, write to its local Claude project memory instead as
short-lived staging only (update that directory's MEMORY.md as an
index entry), and hand off that a PR adding agent-doc infrastructure
(plus migrating the staged memory there) is still needed.upstream-issues (policy check,
draft, explicit user approval), staging in local project memory
(update MEMORY.md there too) until
approved.Morrison-Lab/ai-config
(branch + PR if none is open yet).spot-skill-opportunities to judge whether the pattern is genuinely
recurring (not a one-off), then to skill-builder to scaffold a new
user-invocable workflow in ~/.claude/skills/ (symlink to the cloned repo;
discover the repo path with
git -C ~/.claude/skills/record-learnings rev-parse --show-toplevel), or to
agent-builder to scaffold a persistent read-only subagent in
.claude/agents/ when the pattern is really a worker persona a heavy
skill's fan-out step needs.The ~/.claude/skills/ directory is a symlink to wherever you cloned
ai-config (discover the path with
git -C ~/.claude/skills/record-learnings rev-parse --show-toplevel).
Any skill written there is:
When creating a new skill that other agents should use:
~/.claude/skills/<name>/SKILL.mdWhen the user provides general guidance or a new preference (not just a one-off instruction), always update both:
/memories/preferences.md — so it persists and is visible across all contextsSkills without a matching preference risk being forgotten when the skill isn't invoked. Preferences without matching skill updates risk being ignored during skill-driven workflows.
After adding or updating any skill file, always commit and push to origin:
spot-skill-opportunities — the dedicated recognition step for the
"is this a skill?" case in step 6 above; hand off to it rather than judging
recurrence inline here.skill-builder — scaffolds the SKILL.md once spot-skill-opportunities
(or this skill directly) decides a new one is warranted.agent-builder — the same construction step for a dedicated read-only
fan-out worker (.claude/agents/<name>.md) rather than a user-invocable
skill.ums — the reflective, full-context-sweep counterpart to this skill's
in-place, fact-at-a-time recording. Both fire proactively, as the learning
or fact arises; ums additionally runs as a backstop before /clear.learn — the lower-friction sibling for a candidate you're not yet
confident enough to commit directly: stage it there instead, and let
promote-memory review it later. Use this skill (or memorize) when
you're already confident the fact belongs in committed memory; use learn
for the genuinely uncertain middle ground.