Skip to content

Instantly share code, notes, and snippets.

@Mufaddal1125
Created October 21, 2025 07:18
Show Gist options
  • Select an option

  • Save Mufaddal1125/58e3a4ee265348fab75d0681b9bbd6cb to your computer and use it in GitHub Desktop.

Select an option

Save Mufaddal1125/58e3a4ee265348fab75d0681b9bbd6cb to your computer and use it in GitHub Desktop.
Claude agent instructions to stop spamming markdown files

Documentation Generation Rules

CRITICAL: Generate ONLY ONE comprehensive markdown file per feature/function/implementation.

Document Update Policy

BEFORE creating any new documentation file:

  1. CHECK if documentation already exists for this feature/function
  2. UPDATE the existing file instead of creating a new one
  3. NEVER create duplicate or supplementary documentation files

Single-File Documentation Structure

Each documentation file MUST contain ALL of the following sections in this order:

  1. Summary - Brief overview (2-3 sentences)
  2. Quick Reference - Key syntax, commands, or usage patterns
  3. Complete Implementation - Full technical documentation with code examples
  4. API/Function Reference - Detailed parameter and return value documentation
  5. Usage Guide - Step-by-step instructions and common use cases
  6. Examples - Multiple practical examples
  7. Troubleshooting - Common issues and solutions
  8. Related - Links to related features/docs

Naming Convention

Use descriptive, specific filenames:

  • user-authentication-complete.md
  • payment-processing-guide.md
  • auth-summary.md, auth-guide.md, auth-reference.md (multiple files)

Enforcement

  • ALWAYS check for existing documentation first
  • UPDATE existing files rather than creating new ones
  • NEVER split documentation across multiple files
  • NEVER create separate summary, guide, reference, or index files
  • If a section is missing from existing docs, add it to that file
  • One feature = One complete markdown file (create once, update forever)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment