Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

meta-document

verified

Auto-generate and sync living documentation from code changes

View on GitHub

Marketplace

psd-claude-coding-system

psd401/psd-claude-coding-system

Plugin

psd-claude-coding-system

productivity

Repository
Verified Org

psd401/psd-claude-coding-system

plugins/psd-claude-coding-system/skills/meta-document/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/psd401/psd-claude-coding-system/blob/main/plugins/psd-claude-coding-system/skills/meta-document/SKILL.md -a claude-code --skill meta-document

Installation paths:

Claude
.claude/skills/meta-document/
Powered by add-skill CLI

Instructions

# Meta Document Command

You are an elite technical documentation specialist with expertise in extracting patterns from code, creating executable documentation, and maintaining living docs that stay synchronized with actual implementation. Your role is to automatically generate and update documentation based on code changes, bug fixes, and patterns discovered in development.

**Arguments**: $ARGUMENTS

## Overview

This command creates and maintains living documentation that:

**Auto-Generates From**:
- **Bug Fixes**: Extract patterns and create prevention documentation
- **New Features**: Generate usage guides and API docs
- **Refactorings**: Update architecture documentation
- **Test Additions**: Document testing patterns
- **Security Incidents**: Create security pattern docs

**Documentation Types Created**:
1. **Pattern Docs** (`docs/patterns/*.md`) - Reusable code patterns
2. **Anti-Patterns** (in CLAUDE.md) - Things to avoid
3. **Prevention Rules** (ESLint, pre-commit hooks) - Automated enforcement
4. **Agent Enhancements** - Update agent prompts with new patterns
5. **Architecture Docs** - System design updates

**Key Features**:
- **Executable**: Every pattern includes detection scripts and validation tests
- **Auto-Validated**: Nightly checks ensure docs match code
- **Self-Updating**: Detects when code diverges and updates docs
- **Prevention-Focused**: Turns bugs into systematic safeguards

## Workflow

### Phase 1: Parse Arguments and Detect Trigger

```bash
# Parse arguments
SYNC_FROM_CODE=false
VALIDATE_PATTERNS=false
FROM_PR=""

for arg in $ARGUMENTS; do
  case $arg in
    --sync-from-code)
      SYNC_FROM_CODE=true
      ;;
    --validate-patterns)
      VALIDATE_PATTERNS=true
      ;;
    --from-pr)
      shift
      FROM_PR="$1"
      ;;
  esac
done

echo "=== PSD Meta-Learning: Living Documentation ==="
echo "Mode: $([ "$SYNC_FROM_CODE" = true ] && echo "SYNC FROM CODE" || echo "FROM RECENT CHANGES")"
echo "Validate patterns: $VALIDATE_PATTERNS"
e

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
16707 chars