self-commenting

Insert grep-searchable AICODE-NOTE, AICODE-TODO, and AICODE-FIX markers into code.

13|2|Updated Aug 9, 2025
One-click install
npx skills add https://github.com/petbrains/mvp-builder --skill self-commenting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: self-commenting
Source: https://github.com/petbrains/mvp-builder/tree/main/.claude/skills/self-commenting
Command: npx skills add https://github.com/petbrains/mvp-builder --skill self-commenting

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the "context loss" problem between AI coding sessions by providing a grep-searchable annotation system that lets you leave notes, todos, and bug fixes directly in code for future reference.

Core Features & Use Cases

  • Cross-Session Memory: Leave AICODE-NOTE, AICODE-TODO, and AICODE-FIX markers that persist across conversations.
  • Structured Workflow: Scan existing markers before editing, work normally, then annotate key decisions for future sessions.
  • Use Case: Imagine fixing a complex race condition in authentication code. You add an AICODE-FIX marker explaining the problem → cause → fix. Next session, when a similar bug appears, you can grep for similar fixes and immediately understand the solution pattern.

Quick Start

Use the self-commenting skill to scan the current codebase for any existing AICODE markers before starting work on the authentication module.

Frequently Asked Questions about self-commenting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preserve context between AI coding sessions?

Embed grep-searchable AICODE markers (AICODE-NOTE, AICODE-TODO, AICODE-FIX) directly in your code to create persistent cross-session memory. These annotations let you leave explanations of decisions, bugs, and fixes that survive beyond a single conversation, so future sessions can grep and retrieve the context immediately.

What's the best way to document bug fixes for future reference?

Use AICODE-FIX markers to embed structured explanations of the problem, its cause, and the solution directly in the code where the fix occurs. This transforms isolated bug fixes into searchable patterns that future sessions can discover and reuse without losing the original reasoning.

Can I use grep to find my code annotations across a project?

Yes. AICODE markers are designed to be grep-searchable, so you can scan your entire codebase for AICODE-NOTE, AICODE-TODO, or AICODE-FIX entries at any time. This enables fast retrieval of annotations without storing them separately from the code.

How do I scan existing annotations before starting work?

Run a grep query across your codebase to find all existing AICODE markers before editing. This workflow step ensures you see prior decisions, known issues, and fixes related to the code you're about to modify, restoring lost context from previous sessions.

What happens to AICODE markers when code is refactored?

AICODE markers stay in place within the code files, so they persist through refactoring as long as the annotated lines remain. If code is removed, markers go with it; moving or copying code preserves markers in their new location, maintaining continuity of documented decisions.

Do I need special tools to use AICODE annotations?

No. AICODE markers are plain-text comments, so they work with any editor, version control system, or CI tool. You only need grep or a text search to retrieve them, making adoption zero-friction in existing workflows.