Project learnings

From sequenzia/agent-alchemy · View interactive version

Project learnings is an AI agent skill from the GitHub repository sequenzia/agent-alchemy. Captures project-specific patterns and anti-patterns into the project's CLAUDE.md. Loaded by other skills (bug-killer, feature-dev, etc.) when they discover project-specific knowledge worth encoding for future sessions.

How to use this skill

Skill file

Project Learnings

Capture project-specific patterns and anti-patterns into the project's agent configuration file. This creates a self-improving feedback loop where discoveries from debugging, development, and review make future sessions smarter.

Important: Only project-specific knowledge qualifies. Generic programming advice does not belong in the project configuration.


Step 1: Evaluate Discovery

Determine if the finding qualifies as project-specific. The finding must pass at least ONE of these criteria:

| Criteria | Example That Qualifies | Example That Doesn't |

|----------|------------------------|----------------------|

| Would a developer unfamiliar with this project likely hit this issue? | "The processOrder() function expects amounts in cents, not dollars" | "Always validate function inputs" |

| Is this pattern specific to this codebase's architecture, APIs, or conventions? | "The UserProfile type has an optional metadata field that is always present at runtime" | "Use TypeScript strict mode" |

| Is it something training data wouldn't cover? | "Never call db.query() without the timeout option — the default is infinite" | "Use async/await instead of callbacks" |

If NO to all criteria -> STOP. Do not add generic programming knowledge to the project configuration. Return to the calling skill and report that no project-specific learning was found.

If YES to any -> proceed to Step 2.


Step 2: Read Existing Configuration

  1. Find the project's agent configuration file:
  1. Parse existing content:
  1. If a similar entry already exists -> STOP. Report to the calling skill that this knowledge is already captured. Do not create duplicates.
  1. Identify placement:

Step 3: Format the Learning

Write a concise, actionable instruction following these rules:

Format:

Templates:

For bug patterns:

- **[Area/Component]**: [What to do/avoid] — [why, with specific details]

For API gotchas:

- `functionName()` in `path/to/file`: [What's surprising about it] — [consequence if ignored]

For architectural constraints:

- [Constraint description] — [why it exists and what breaks if violated]

Examples of well-formatted learnings:


Step 4: Confirm with User

Present the proposed addition to the user:

Show:

  1. The exact text to be added
  2. Where it will be placed in the configuration (section name, after which line/entry)
  3. Why this qualifies as project-specific

Options:


Step 5: Write Update

If the user confirmed (or provided edited text):

  1. Add the entry to the configuration file at the identified location
  2. If a new section was needed, create the section heading first
  3. Verify the edit was applied correctly by reading the modified area
  4. Report success to the calling skill with a summary of what was added

If the user chose "Skip":


Integration Notes

What this component does: Captures project-specific patterns, gotchas, and anti-patterns discovered during debugging or development into the project's agent configuration file, creating a self-improving knowledge base.

Capabilities needed: File reading (to check existing configuration), file editing (to add entries), user interaction (to confirm additions).

Adaptation guidance: This skill writes to a project-level configuration file (the equivalent of CLAUDE.md or a similar project instructions file). Adapt the file path detection in Step 2 to match your platform's convention for storing project-level agent instructions. The core logic of evaluating, formatting, and confirming learnings is platform-agnostic.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.