agentsclimarketplace

Cai capture lesson

Skill workingdanny911/dannys-claude/plugins/cai/skills/cai-capture-lesson

Use when capturing knowledge from current session. Triggers: 'cai-capture-lesson', 'lesson 기록', '교훈 캡처', '배운 것 기록', 'capture lesson', '세션 회고', '레슨 캡처'From its SKILL.md

Install
npx -y skills add workingdanny911/dannys-claude --skill cai-capture-lesson

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.0 KB, as published. Nobody here has run it

CAI Capture Lesson

Overview

Performs a session retrospective: reviews the current session's work, classifies learnings, and routes each item to the appropriate CAI document via the relevant cai-add-* skill.

When to Use

  • End of a productive session where debugging, design decisions, or new patterns occurred
  • Action routing: "failure mode/패턴 발견" triggers this skill
  • User explicitly requests a session retrospective
  • AI suggests knowledge capture after resolving a non-trivial issue

CRITICAL: This skill requires active session context to function. It reviews what happened in the current conversation. Do NOT invoke in a fresh session with no prior work.

Workflow

1. Session Review

Review the current session's work to identify knowledge worth capturing:

  • What problems were encountered? (bugs, errors, unexpected behaviors)
  • What solutions were found? (root causes, fixes, workarounds)
  • What patterns were established? (new conventions, architectural patterns)
  • What decisions were made? (technology choices, design trade-offs)
  • What was surprising or non-obvious? (gotchas, counterintuitive behaviors)

2. Classify Learnings

Categorize each identified item:

ClassificationTarget DocumentRouting Skill
Failure mode (bug root cause found)Issue doc OR agent spec's Failure Modes table (Symptom-Cause-Fix)Direct write or cai-add-spec
New pattern (reusable approach discovered)Convention or speccai-add-spec
Architecture decision (alternatives compared, one chosen)ADRcai-add-decision
Future improvement ideaRoadmap itemcai-add-roadmap

Failure Mode format (for agent spec tables):

SymptomCauseFix
{Observable behavior}{Root cause}{Resolution steps}

3. Present to User

For each classified item, present a one-line summary and proposed action:

Session Retrospective:

1. [Failure Mode] Redis connection timeout under load
   → Add to context/issues/redis-connection-timeout.md
   [approve / reject / edit]

2. [Pattern] Retry with exponential backoff for external API calls
   → Add to context/conventions/external-api-retry.md
   [approve / reject / edit]

3. [Decision] Chose message queue over direct HTTP for service communication
   → Create context/decisions/003-message-queue-over-http.md
   [approve / reject / edit]

4. Route Approved Items

For each item the user approves:

ClassificationAction
Failure mode → new issueCreate context/issues/{slug}.md with severity, description, and fix
Failure mode → existing agent specAppend to the Failure Modes table in the relevant agent or spec
New pattern → new conventionCreate context/conventions/{topic}.md
New pattern → existing specUpdate the relevant spec via cai-add-spec
Architecture decisionInvoke cai-add-decision skill
Future improvementInvoke cai-add-roadmap skill

5. Summary

After all approved items are processed, display a summary:

Captured 3 items:
  ✓ context/issues/redis-connection-timeout.md (created)
  ✓ context/conventions/external-api-retry.md (created)
  ✓ context/decisions/003-message-queue-over-http.md (created)

Agent Invocations

This skill primarily routes to other skills rather than directly invoking agents. However, for failure mode items that need to be added to agent spec tables:

  • Direct file editing is used (no agent invocation needed for simple table appends)

For items routed to other skills:

  • cai-add-decision is invoked for architecture decisions
  • cai-add-spec is invoked for pattern documentation in specs
  • cai-add-roadmap is invoked for future improvement ideas

Output

ArtifactPathFormat
Issue documentscontext/issues/{slug}.mdMarkdown with YAML frontmatter (issue type)
Convention documentscontext/conventions/{topic}.mdMarkdown with YAML frontmatter (convention type)
Decision documentscontext/decisions/{NNN}-{slug}.mdVia cai-add-decision
Roadmap documentscontext/roadmap/{status}/{slug}.mdVia cai-add-roadmap
Updated spec/agent filesVariousAppended Failure Modes rows or pattern sections

Error Handling

ErrorAction
No session context available (fresh session)Inform user this skill requires an active session with prior work. Suggest reviewing git log instead.
User rejects all proposed itemsAcknowledge and end gracefully. No documents created.
Routing to cai-add-decision failsFall back to direct ADR creation using the decision format
Target document for failure mode append does not existCreate a new issue document instead

Keep looking

Skills are one crate of 609,856. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.