├── .github ├── dependabot.yml └── workflows │ ├── ci.yml │ └── static.yml ├── .gitignore ├── .markdownlint.yaml ├── .nojekyll ├── .pre-commit-config.yaml ├── AGENTS.md ├── LICENSE ├── README.md ├── conftest.py ├── index.html ├── llm_prompt_library ├── __init__.py ├── build_index.py ├── financial_metacognition │ ├── __init__.py │ ├── config │ │ ├── bias_patterns.json │ │ ├── confidence_patterns.json │ │ ├── financial_concepts.json │ │ └── limitation_patterns.json │ ├── examples │ │ ├── financial_prompt.txt │ │ ├── financial_response.txt │ │ └── test_financial_metacognition.py │ └── financial_metacognition.py ├── prompt_analyzer.py ├── prompt_evolution.py ├── prompt_mixer.py ├── token_counter.py └── validate_prompts.py ├── prompts ├── INDEX.md ├── creative_writing │ ├── Dialogue_Generator.md │ └── Storyteller.md ├── finance │ ├── 10-KAnalyzer.md │ └── venturecapitalist.md ├── healthcare │ └── Symptom_Checker.md ├── legal │ ├── Case_Law_Finder.md │ └── Legal_Contract_Reviewer.md ├── marketing │ ├── Ad_Copy_Generator.md │ └── Social_Media_Post_Optimizer.md ├── medical │ ├── Clinical_Trial_Analyzer.md │ ├── Cognitive Bias Assessment Tool.md │ ├── Medical-Bot │ ├── Medical_QA.md │ └── psychologist ├── miscellaneous │ ├── ChatAGI.md │ ├── Code Anything Now.md │ ├── Custom Instructions.md │ ├── MultiverseGPT.md │ ├── antikythera.md │ ├── bitmap.md │ ├── graphing.md │ └── textadventure.md ├── programming │ ├── AWS Architect.md │ ├── Azure Architect.md │ ├── Code_Explainer.md │ ├── Copilot.md │ ├── Data_Conversion_Specialist.md │ ├── ExcelFormulas.md │ ├── HTML.md │ ├── Jinja2_Code_Optimizer.md │ ├── LaTeX_specialist.md │ ├── OnePageWebsite.md │ ├── Python.md │ ├── PythonBugFixer.md │ ├── Scientific Data Visualizer.md │ ├── UnstructuredText_to_JSON.md │ ├── Wolfram.md │ ├── commit messages.md │ ├── cursor_IDE_prompt.md │ └── priompt_style_cursor_IDE ├── prompt_generation │ ├── CoT_Probe_o3.md │ ├── DALL-E.md │ ├── Midjourney.md │ ├── Prompt Creator.md │ ├── PromptScript.md │ ├── PromptScriptEngineer.md │ └── ScriptingTemplate.md ├── sales │ └── Sales_Email_Drafter.md └── writing_editing │ ├── editing_revision │ ├── Preserve Technical Terminology.md │ ├── Proofread.md │ ├── Rewrite.md │ └── formatting.md │ ├── educational │ ├── Teach.md │ └── Thought Stream Transcription.md │ ├── extraction_summarization │ ├── Action Items.md │ ├── Book Summary.md │ ├── Comprehensive Analysis.md │ ├── Non-Fiction Analysis.md │ ├── NotesGPT.md │ ├── Poem Analysis.md │ └── Short Summary.md │ ├── style_emulation │ └── hemingway │ └── verification │ └── Accuracy Confirmation.md ├── pyproject.toml ├── scripts ├── README.md ├── __init__.py ├── build_index.py ├── financial_metacognition │ ├── __init__.py │ └── financial_metacognition.py ├── mixed_prompts │ └── Private_Equity_Document_Analyzer.md ├── prompt_analyzer.py ├── prompt_evolution.py ├── prompt_mixer.py ├── requirements.txt ├── token_counter.py └── validate_prompts.py └── tests ├── test_build_index.py ├── test_financial_metacognition.py ├── test_prompt_analyzer.py ├── test_prompt_evolution.py ├── test_prompt_mixer.py └── test_token_counter.py /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "pip" 4 | directory: "/scripts" 5 | schedule: 6 | interval: "weekly" 7 | commit-message: 8 | prefix: "chore" 9 | labels: 10 | - "dependencies" 11 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | validate-prompts: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: Set up Python 16 | uses: actions/setup-python@v4 17 | with: 18 | python-version: '3.10' 19 | 20 | - name: Validate prompt files 21 | run: python scripts/validate_prompts.py 22 | -------------------------------------------------------------------------------- /.github/workflows/static.yml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Deploy static content to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ["main"] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 20 | concurrency: 21 | group: "pages" 22 | cancel-in-progress: false 23 | 24 | jobs: 25 | # Single deploy job since we're just deploying 26 | deploy: 27 | environment: 28 | name: github-pages 29 | url: ${{ steps.deployment.outputs.page_url }} 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v4 34 | - name: Setup Pages 35 | uses: actions/configure-pages@v5 36 | - name: Upload artifact 37 | uses: actions/upload-pages-artifact@v3 38 | with: 39 | # Upload entire repository 40 | path: '.' 41 | - name: Deploy to GitHub Pages 42 | id: deployment 43 | uses: actions/deploy-pages@v4 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.pyc 4 | *.pyo 5 | *.pyd 6 | 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | build/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .nox/ 42 | .coverage 43 | .coverage.*_M 44 | .cache 45 | nosetests.xml 46 | coverage.xml 47 | *.cover 48 | .hypothesis/ 49 | .pytest_cache/ 50 | 51 | # Environments 52 | .env 53 | .venv 54 | env/ 55 | venv/ 56 | ENV/ 57 | env.bak/ 58 | venv.bak/ 59 | 60 | # Spyder project settings 61 | .spyderproject 62 | .spyproject 63 | 64 | # Rope project settings 65 | .ropeproject 66 | 67 | # mkdocs documentation 68 | /site 69 | 70 | # mypy 71 | .mypy_cache/ 72 | .dmypy.json 73 | dmypy.json 74 | 75 | # Jupyter Notebook 76 | .ipynb_checkpoints 77 | 78 | # pytype 79 | .pytype/ 80 | 81 | # Cython debug symbols 82 | cython_debug/ 83 | 84 | # VS Code 85 | .vscode/ 86 | 87 | # macOS / editor cruft 88 | .DS_Store 89 | .idea/ 90 | 91 | # Local artefacts 92 | venv/ 93 | __pycache__/ 94 | *.pyc 95 | .ruby-version 96 | 97 | # Bundler 98 | vendor/bundle/ 99 | 100 | # EventMachine 101 | vendor/bundle/bundler/gems/eventmachine-e7320417cf29 102 | 103 | # Jekyll 104 | _site 105 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | default: true 2 | MD013: false 3 | MD033: false 4 | MD041: false 5 | MD024: false 6 | MD040: false 7 | MD010: false 8 | MD045: false 9 | MD022: false 10 | MD031: false 11 | MD004: false 12 | MD012: false 13 | MD032: false 14 | MD047: false 15 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abilzerian/LLM-Prompt-Library/f8d72b110efbddfd2861d7f90f96f7447f8795d3/.nojekyll -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: local 3 | hooks: 4 | - id: build-index 5 | name: Build prompt index 6 | entry: python scripts/build_index.py 7 | language: system 8 | pass_filenames: false 9 | - repo: https://github.com/astral-sh/ruff-pre-commit 10 | rev: v0.11.12 11 | hooks: 12 | - id: ruff 13 | - repo: https://github.com/igorshubovych/markdownlint-cli 14 | rev: v0.45.0 15 | hooks: 16 | - id: markdownlint 17 | args: ["-c", ".markdownlint.yaml"] 18 | -------------------------------------------------------------------------------- /AGENTS.md: -------------------------------------------------------------------------------- 1 | # Agents Guide for LLM-Prompt-Library 2 | 3 | > This internal handbook is written for **autonomous AI agents** that contribute to the repository. Follow it exactly: the human will review every commit, and CI will reject non-conforming changes. 4 | 5 | --- 6 | 7 | ## 1 Mission & Scope 8 | 9 | * Maintain a **high-quality, reusable prompt catalogue** and the Python tooling that supports it. 10 | * Keep the project easy to audit. Every line of generated code or prose **must be explainable and traceable**. 11 | * Prefer minimal, readable solutions over clever but opaque ones. 12 | 13 | --- 14 | 15 | ## 2 Repository Map 16 | 17 | | Path | Purpose | 18 | | ---- | ------- | 19 | | `prompts/` | Markdown prompt templates, organised by category sub-folders. | 20 | | `scripts/` | CLI utilities (validation, index builder, mixer, evolution, etc.). | 21 | | `scripts/financial_metacognition/` | Finance-specific analysis helpers. | 22 | | `docs/` | Additional long-form documentation. | 23 | | `tests/` | Unit tests for Python helpers. | 24 | 25 | --- 26 | 27 | ## 3 Environment Setup 28 | 29 | 1. **Clone** & **install deps** (Python 3.9+): 30 | ```bash 31 | git clone https://github.com/abilzerian/LLM-Prompt-Library.git 32 | cd LLM-Prompt-Library 33 | python -m venv .venv && source .venv/bin/activate 34 | pip install -r scripts/requirements.txt 35 | ``` 36 | 2. **Optional dev tools**: 37 | ```bash 38 | # linting & pre-commit hooks 39 | pip install ruff pre-commit && pre-commit install 40 | ``` 41 | 3. **API keys** – set as env vars when required: 42 | * `OPENAI_API_KEY` for prompt-evolution or analyser scripts. 43 | * Other vendors as new features demand. 44 | 45 | > **Tip:** In Codespaces/Gitpod simply run `./scripts/dev_bootstrap.sh` when it exists. 46 | 47 | --- 48 | 49 | ## 4 Daily Workflow (Agents) 50 | 51 | 1. **Create a feature branch**: `feat/`. 52 | 2. **Plan**: summarise intent in the commit description *before* generating code. 53 | 3. **Generate / edit files**: 54 | * Use small, iterative `edit_file` calls. 55 | * **Never** overwrite unchanged lines—use the `{{ ... }}` placeholder. 56 | 4. **Validate**: 57 | ```bash 58 | python scripts/validate_prompts.py # structural checks 59 | python scripts/token_counter.py prompts/ # cost awareness 60 | ``` 61 | 5. **Rebuild indices**: 62 | ```bash 63 | python scripts/build_index.py # updates README & prompts/INDEX.md counts 64 | ``` 65 | 6. **Run unit tests** *(when present)*: `pytest -q`. 66 | - For documentation-only updates (e.g. `README.md` or this guide), tests may be skipped but still run `pre-commit` for formatting. 67 | 7. **Commit** using conventional messages (e.g. `feat: add Stock Analyst prompt`). 68 | 8. **Open a Pull Request**; the CI pipeline enforces style + index freshness. 69 | 70 | --- 71 | 72 | ## 5 Prompt Authoring Rules 73 | 74 | 1. **File location**: `prompts//.md` (spaces allowed, keep Title Case). 75 | 2. **Front matter** *(optional)*: YAML header for meta-data (`tags`, `model`, etc.). 76 | 3. **Content sections** (recommended order): 77 | 1. `## Purpose` 78 | 2. `## Instructions` 79 | 3. Examples / few-shots (`### Example 1`, `### Example 2`, …) 80 | 4. **Token budget**: aim < 700 tokens raw. Use the token counter. 81 | 5. **Style**: 82 | * Use **second-person** when addressing the model ("You are …"). 83 | * Keep sentences short & imperative. 84 | * Preserve any existing DSL (`#BEGIN` / `#END`, bullets, tables). 85 | 6. **Cross-links**: reference related prompts with relative links. 86 | 7. **Validation**: file **must** pass `scripts/validate_prompts.py` before commit. 87 | 88 | --- 89 | 90 | ## 6 Python Scripts Cheat-Sheet 91 | 92 | | Script | What it does | 93 | | ------ | ------------ | 94 | | `build_index.py` | Regenerates the prompt catalogue & README counts. | 95 | | `validate_prompts.py` | Structural + lint checks on every prompt file. | 96 | | `token_counter.py` | Prints token/char counts per prompt. | 97 | | `prompt_mixer.py` | Combines multiple prompts into variants. | 98 | | `prompt_analyzer.py` | LLM-powered quality report + suggestions. | 99 | | `prompt_evolution.py` | Self-improvement loop for prompts. | 100 | | `mixed_prompts/` | Output folder for mixer/evolution runs. | 101 | 102 | > **Run `python