Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 241 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
# CLAUDE.md - AI Assistant Guide

This document provides guidance for AI assistants working with the System-Prompt-Generation-Configurations repository.

## Repository Overview

This is a **meta-prompt engineering library** containing specialized system prompts designed to create, edit, improve, and manage other AI assistant configurations. It serves as a toolkit for prompt engineers and AI developers.

**Primary Purpose**: Provide reusable system prompts that help generate, refine, and maintain other system prompts.

## Directory Structure

```
/
├── generators/ # Create new system prompts
│ ├── batch-generator.md # Generate multiple related assistants
│ ├── conversational-generators.md # Interactive prompt generation with parameters
│ ├── generator-short-version.md # Quick prompt creation
│ ├── prompt-only-generator.md # Generate from minimal input
│ └── structured-generator.md # JSON-formatted output
├── editors/ # Modify existing prompts
│ ├── doctor.md # Diagnose and enhance prompts
│ ├── feature-editor.md # Apply targeted edits
│ └── direct-fixes.md # Automatic enhancement
├── alt-workflows/ # Alternative development approaches
│ ├── qa-workflow.md # Q&A-based development
│ └── review-and-edit.md # Comprehensive review/optimization
├── team-development/ # Multi-assistant coordination
│ ├── prompt-forker.md # Create prompt variants
│ └── pair-suggester.md # Suggest complementary assistants
├── redaction/ # Privacy and sharing
│ ├── depersonaliser.md # Remove personal elements
│ └── share-processor.md # Prepare for open-source sharing
├── security/ # Security analysis
│ └── prompt-security-auditor.md # Audit for vulnerabilities
├── style/ # Stylistic transformations
│ └── system-prompt-stylistic-editor.md
├── localization/ # Cultural/linguistic adaptation
│ └── prompt-localizer.md
├── multimodal/ # Multi-modal capabilities
│ └── multimodal-prompt-adapter.md
├── from-title/ # Generate from minimal input
│ └── system-prompt-from-title.md
├── from-to/ # Format transformations
│ └── prompt-to-image.md # Generate avatar prompts
├── dual-prompt-creation/ # Dual output generation
│ └── dual-prompt-generator.md # Personal + open-source versions
├── analysis/ # Prompt analysis tools
│ └── prompt-parameter-calculator.md
├── updaters/ # Modernization tools
│ ├── modernizer.md # Update for newer AI capabilities
│ └── remixer.md # Creative transformations
├── json/ # Auto-generated JSON versions
│ └── [mirrors markdown structure]
├── generate_index.py # Updates README table
├── generate_json.py # Converts MD to JSON
└── README.md # Main documentation with prompt index
```

## File Format Conventions

### Markdown Prompts (Primary Format)

All system prompts follow this structure:

```markdown
# [Prompt Title]

## Purpose
[Clear description of the assistant's role and objective]

## Workflow
### 1. [Phase Name]
[Step-by-step process]

### 2. [Phase Name]
[Additional steps...]

## Input Format (optional)
[Expected user input format]

## Output Format
[How the assistant should format responses]

## Example Interaction (optional)
[Usage examples]
```

### JSON Format (Auto-generated)

JSON files are generated automatically from markdown and stored in `/json/`:

```json
{
"name": "Prompt Title",
"system_prompt": "[full markdown content]"
}
```

## Naming Conventions

| Element | Convention | Example |
|---------|------------|---------|
| Files | kebab-case.md | `batch-generator.md` |
| Directories | lowercase with hyphens | `team-development/` |
| Prompt Titles | Title Case (H1 heading) | `# Batch System Prompt Generator` |
| JSON names | Title Case (auto-converted) | `"name": "Batch Generator"` |

## Development Workflows

### Adding a New System Prompt

1. Create a new `.md` file in the appropriate category directory
2. Follow the standard markdown structure (Purpose, Workflow, Output Format)
3. Run `python generate_json.py` to create the JSON version
4. Run `python generate_index.py` to update the README table
5. Commit changes

### Modifying Existing Prompts

1. Edit the `.md` file directly
2. Regenerate JSON: `python generate_json.py`
3. Regenerate index: `python generate_index.py`
4. Commit changes

### Creating a New Category

1. Create a new directory with kebab-case naming
2. Add `.md` files following the standard structure
3. Run both generation scripts
4. The category will auto-appear in README (derived from directory name)

## Automation Scripts

### generate_index.py

- Scans all `.md` files (excluding README.md)
- Extracts metadata: title, description, category, date
- Updates README.md between `<!-- START_PROMPT_TABLE -->` and `<!-- END_PROMPT_TABLE -->` markers
- Sorts prompts alphabetically by name
- Run from repository root: `python generate_index.py`

### generate_json.py

- Converts all `.md` files to JSON format
- Maintains directory structure in `/json/`
- Skips README.md
- Run from repository root: `python generate_json.py`

## Common Tasks

### Find prompts by category
```bash
ls generators/ # List all generator prompts
ls editors/ # List all editor prompts
```

### Search for specific functionality
```bash
grep -r "security" --include="*.md"
grep -r "JSON" --include="*.md"
```

### Validate JSON output
```bash
python -m json.tool json/generators/batch-generator.json
```

## Key Concepts

### Prompt Categories

| Category | Purpose |
|----------|---------|
| **Generators** | Create new system prompts from scratch |
| **Editors** | Modify and improve existing prompts |
| **Team Development** | Tools for assistant networks/swarms |
| **Redaction** | Privacy and sharing preparation |
| **Security** | Vulnerability analysis and hardening |
| **Localization** | Cultural/linguistic adaptation |
| **Multimodal** | Add vision/audio capabilities |
| **Updaters** | Modernize and remix prompts |
| **Analysis** | Metrics and parameter calculation |

### Design Principles

1. **Meta-assistance**: Prompts are designed to help create/improve other prompts
2. **Modularity**: Each prompt focuses on a single purpose
3. **Dual output**: Support for both personalized and open-source versions
4. **Security-first**: Dedicated security auditing capabilities
5. **Format flexibility**: Markdown for humans, JSON for programmatic use

## Code Style Guidelines

When writing or modifying system prompts:

1. Use clear, imperative language ("You are...", "Your task is...")
2. Structure with markdown headers (##, ###)
3. Include explicit workflow phases
4. Specify expected input and output formats
5. Use bullet points for lists of capabilities or requirements
6. Keep descriptions concise but comprehensive
7. Include example interactions when the workflow is complex

## Git Workflow

- Main development happens on feature branches
- Commits should describe what prompts were added/modified
- Run generation scripts before committing to keep JSON and README in sync
- Keep commit messages descriptive: "Add security auditor prompt" not "updated"

## Testing Prompts

To test a system prompt:

1. Copy the markdown content (everything after the H1 title, or the full content)
2. Paste into an AI assistant's system prompt field
3. Verify the assistant behaves as documented
4. Check edge cases and workflow phases

## Integration Notes

- Prompts are platform-agnostic (work with ChatGPT, Claude, Llama, etc.)
- JSON format is useful for programmatic loading
- The `/json/` directory mirrors the markdown structure exactly
- All content is in English; use the localizer prompt for translations