# Ami Extract Learnings

> Analyzes recent code changes to extract architectural decisions, lessons, patterns, and surprises, documenting them for future reference.

- Skill: `anacatavc/ami-extract-learnings` (Agent Skill)
- Install (CLI): `npx skillmds@latest add anacatavc/ami-extract-learnings`
- Raw SKILL.md: https://api.skillmd.com/api/skills/anacatavc/ami-extract-learnings/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: AnaCataVC (https://skillmd.com/u/anacatavc)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/anacatavc/ami-extract-learnings

---


# Skill: Push Learnings Extractor

When invoked, act as a Knowledge Manager to ensure valuable insights from the current development session are preserved.

## Workflow

1. **Understand Context And Analyze Changes:**
   - **Determine Scope:** If the user has not specified a context (e.g., a specific commit, PR, or session), default to analyzing all unpushed changes or the most recent commit, and inform the user.
   - **Review Changes:** Extract and analyze the diffs within the determined scope.
   - **Identify Key Elements:** Actively search for complex logic, new design patterns, bug workarounds, and significant architectural decisions.

2. **Extract Learnings & Apply Longevity Gating:**
   - Synthesize the "why" behind the changes.
   - **Quality & Enduring Value Gate:** Filter out transient trial-and-error logs, routine syntax adjustments, or low-signal one-liners. Only preserve learnings that provide enduring future value to developers or AI assistants.
   - Identify:
     - **Decisions:** Why a specific library or pattern was chosen.
     - **Lessons/Gotchas:** Non-trivial bugs, subtle platform edge cases, or tricky configurations that took time to resolve.
     - **Patterns:** New reusable architectural patterns introduced in the code.
   - If you are not sure about why something was implemented a specific way, ask the user to clarify before documenting it.

3. **Document & Deduplicate:**
   - Check existing repository memory (`docs/learning/`, `docs/external-references/`, `docs/ADR/`) to ensure the learning does not duplicate or conflict with existing documented conventions.
   - **CRITICAL:** Before creating any files, you MUST present the extracted learnings and decisions to the user in the chat and ask for explicit permission to document them.
   - Once approved, if the learning involves a significant architectural decision and `docs/ADR/` exists, create a new ADR (Architecture Decision Record) file inside `docs/ADR/` following their established format.
   - For all other approved high-signal learnings, store them as individual markdown files in `docs/learning/` using a descriptive title (e.g., `docs/learning/caching-strategy-redis.md`). Create the folder if it does not exist.

4. **Reporting:**
   - If learnings were extracted and documented, output the location of the updated file.
   - If the changes were trivial (e.g., typos, simple refactors) or did not meet the enduring value threshold, inform the user that no persistent documentation was needed.


---
**Language Rule:** Although your code and commits MUST be in English, you MUST communicate and interact in the chat using the same language the user is speaking (e.g., Spanish, French, etc.).

