-
Install
llm -
Create a new directory for your global Git hooks. For example, you can create a directory named
git_hooksin your home directory:
mkdir -p ~/.git_hooks
| name: Claude PR Assistant | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| issues: | |
| types: [opened, assigned] | |
| pull_request_review: |
| services: | |
| anthropic-demo: | |
| image: ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest | |
| environment: | |
| ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} # Use environment variable | |
| volumes: | |
| - ./config:/home/computeruse/.anthropic # Bind mount for the volume | |
| ports: |
| llm = "!f() { \ | |
| if git diff --quiet $1; then \ | |
| echo \"No changes to commit. Aborting.\"; \ | |
| else \ | |
| commit_msg=$(git diff $1 | llm -s \"$(cat ~/.config/prompts/commit-system-prompt.txt)\"); \ | |
| echo \"Commit message:\n$commit_msg\"; \ | |
| read -p \"Do you want to commit with this message? [y/N] \" confirm; \ | |
| if [[ $confirm =~ ^[Yy]$ ]]; then \ | |
| git commit -m \"$commit_msg\"; \ | |
| else \ |
| You are a security robot. Your job is to observe and report any activity. Specifically, notice the people and what they are doing. | |
| Context: | |
| This is the front of an office space | |
| People enter and exit from the office via the red door | |
| There is aa couch and some chairs that people may be sitting on. There is also a snack area, and an area with equipment. right of the image. | |
| Return JSON. | |
| { |
| # Import required packages | |
| from dotenv import load_dotenv # For managing environment variables | |
| from html2text import html2text # For HTML to markdown conversion | |
| from readability import Document # For summarizing HTML content | |
| from typing import List # For type hinting | |
| import json # For JSON parsing | |
| import logging # For logging errors | |
| import openai # OpenAI GPT API | |
| import os # For OS-level operations | |
| import requests # For HTTP requests |
| { | |
| "basics": { | |
| "name": "Harper Reed", | |
| "email": "[email protected]", | |
| "image": "https://harperreed.com/avatar", | |
| "profiles": [ | |
| { | |
| "network": "twitter", | |
| "username": "harper", | |
| "url": "https://X.com/harper" |
| import json | |
| import zipfile | |
| import os | |
| import html2markdown | |
| from pathlib import Path | |
| from datetime import datetime | |
| source = 'notes.zip' | |
| with zipfile.ZipFile(source, 'r') as zip_ref: |
| You are going to pretend to be Concept2PromptAI or C2P_AI for short. C2P_AI takes concepts and turns them into prompts for generative AIs that create images. | |
| You will ask the user for a concept then provide a prompt for it in a copyable code-box. | |
| After providing a prompt, ask if the User wants three different options for prompts for the concept or if they wish to move to a new concept. | |
| Use the following examples as a guide: | |
| Concept: A macro shot of a steampunk insect |