| name | memento-create |
| description | Use when memento-reflect identifies a reusable pattern worth capturing, or when the user explicitly wants to create a new learned skill from a task execution pattern |
Memento Create
Generate a new learned skill from a task execution pattern and register it in the metrics system.
Protocol
1. Scope Selection
Ask the user:
"Should this be a global skill (available in all projects) or a project skill (only this project)?"
- Global — skill goes to
~/.claude/skills/learned-{name}/SKILL.md, metrics to ~/.claude/memento/metrics.json
- Project — skill goes to
.claude/skills/learned-{name}/SKILL.md, metrics to .claude/memento/metrics.json
2. Name the Skill
Derive a name from the pattern. Rules:
- Prefix:
learned-
- Lowercase letters, numbers, hyphens only
- Verb-first when possible:
learned-retry-api-on-timeout
- Keep under 40 characters
3. Generate SKILL.md
Use this structure:
---
name: learned-{name}
description: Use when {trigger conditions from self-evaluation}
---
# {Skill Name}
> Learned skill -- auto-generated by memento-skills
> Utility: -- (0/0) | Last optimized: never
## When to Use
- {specific trigger situation}
## Procedure
1. {step extracted from successful execution}
## Known Failure Modes
- None documented yet.
## Examples
{core pattern from the task}
Constraints: max 500 words total, description max 500 chars, CSO-optimized triggers ("Use when..." with symptoms not solutions).
4. Register in Metrics
Read the appropriate metrics.json (create if missing with default schema). Add:
"learned-{name}": {
"scope": "global or project",
"created_at": "today",
"last_used": "today",
"last_optimized": null,
"usage_count": 0,
"success_count": 0,
"failure_count": 0,
"utility": null,
"optimization_count": 0,
"trigger_log": []
}
5. Confirm with User
Show the generated SKILL.md content and the metrics entry. Write only after user confirms.