napkin  by blader

AI agent continual learning via persistent memory

Created 2 months ago
475 stars

Top 64.1% on SourcePulse

GitHubView on GitHub
Project Summary

A Claude Code skill, Napkin, provides agents with persistent memory of their mistakes by maintaining a per-repository markdown scratchpad (.claude/napkin.md). This enables agents to learn from past errors and corrections, leading to significantly improved performance and proactive issue resolution over multiple sessions, benefiting users who want more reliable and adaptive AI assistance.

How It Works

Napkin operates by reading a .claude/napkin.md file at the start of each session, creating it if it doesn't exist. During the session, it continuously logs the agent's mistakes, user corrections, unexpected tool/environment behaviors, and successful approaches. This accumulated knowledge compounds over sessions, allowing the agent to avoid repeating errors and anticipate problems, effectively implementing a form of "baby continual learning."

Quick Start & Requirements

  • Install:
    • For Claude Code: git clone https://github.com/blader/napkin.git ~/.claude/skills/napkin
    • For Codex: git clone https://github.com/blader/napkin.git ~/.codex/skills/napkin
  • Prerequisites: Claude Code or Codex environment.
  • Setup Time: Minimal, involving a single git clone command.
  • Links: README provides installation instructions.

Highlighted Details

  • Persistent memory of mistakes via a per-repo markdown scratchpad (.claude/napkin.md).
  • "Baby continual learning" effect, with noticeable behavior shifts by sessions 3-5.
  • Logs agent mistakes, user corrections, tool/environment surprises, and successful approaches.
  • The napkin file can be committed to a repository for shared learning or gitignored for personal use.

Maintenance & Community

No specific details on contributors, sponsorships, or community channels beyond the GitHub repository were provided in the README.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The MIT license generally permits commercial use and integration with closed-source projects without significant restrictions.

Limitations & Caveats

The skill activates "unconditionally," offering no immediate mechanism for selective disabling. The primary benefit is realized over multiple sessions, implying initial sessions may not demonstrate significant improvements. The README does not elaborate on the agent's specific methods for designing the initial file structure or adapting it to diverse project domains.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
106 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.