From design-workflow
Document a recurring pattern or mistake to avoid in future interactions
How this skill is triggered — by the user, by Claude, or both
Slash command
/design-workflow:lessonThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Document the correction the user just gave as a reusable lesson in `.aidocs/lessons/`: **$ARGUMENTS**
Document the correction the user just gave as a reusable lesson in .aidocs/lessons/: $ARGUMENTS
Read language configuration from .aidocs/config.yaml (or .aidocs/config.yml):
! cat .aidocs/config.yaml 2>/dev/null || cat .aidocs/config.yml 2>/dev/null || echo "language: en"
Extract the language field (default: en if neither file exists or the field is absent). All content written to .aidocs/ must be in this language.
Review existing lessons to avoid duplicates and check for related lessons to update instead:
! ls .aidocs/lessons/ 2>/dev/null || echo "No lessons yet"
Identify the pattern: extract the general, reusable principle from the specific correction. Focus on why the mistake happened and what rule prevents it — not the specific instance.
Determine the filename: use today's date and a kebab-case slug that describes the pattern.
YYYYMMDD-<pattern-slug>.md20260403-no-unit-tests-per-class.mdWrite the lesson in .aidocs/lessons/ using the template below. Every section is mandatory — do not skip any.
Present the lesson to the user for review before finishing.
# <Title: the pattern or rule, stated as a positive principle>
- **Date**: YYYY-MM-DD
- **Status**: Active | Superseded by [Lesson YYYYMMDD](./YYYYMMDD-slug.md)
## Rule
State the rule clearly and concisely in one or two sentences. Use imperative voice: "Do not...", "Always...", "Prefer...".
## Context
Describe in which situations this rule applies. What kind of task, file type, architecture layer, or workflow triggers this pattern? Be specific enough to be actionable but general enough to cover future cases.
## Why
Explain the reasoning behind the rule. What goes wrong when it is violated? What value does following it preserve (consistency, architecture, readability, testability, etc.)?
## Examples
### Wrong
// Concrete, minimal example showing the mistake
### Right
// Concrete, minimal example showing the correct approach
## Related Lessons
- List links to related lessons if any, or write "None".
Superseded by [Lesson YYYYMMDD](./YYYYMMDD-slug.md).npx claudepluginhub cjuega/ai-plugins --plugin design-workflowRecords reusable lessons from resolved bug fixes, architectural changes, interface updates, or recurring pitfalls into project memory docs, anchored to git commits.
Captures corrections and lessons as persistent learning rules with category, mistake, and correction. Activates after mistakes or when user says 'remember this', 'don't forget', or 'learn from this'.
Captures lessons from bug fixes and corrections in Phoenix/Elixir projects — Ecto, LiveView, Oban, iron law mistakes. Documents rules in CLAUDE.md or MEMORY.md to prevent repeats.