knowsuchagency

Promptic β€” AI skill for Claude Code

AI community

90% of what you need for LLM app development.

How to install Promptic

This entry records only its repository, not the path inside it, so there is no exact command to give. Open knowsuchagency/promptic and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Promptic does

90% of what you need for LLM app development. Nothing you don't.

Alternatives in AI

  • Repomix β€” πŸ“¦ Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file 22.7k β˜…
  • Opencodex β€” Universal provider proxy for OpenAI Codex & Claude Code β€” use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k β˜…
  • Usage β€” macOS menu bar & Windows tray app pinning Claude Code, Codex & Antigravity quota, burn rate, and cost to your 301 β˜…

README

promptic

[![Python Versions](https://img.shields.io/pypi/pyversions/promptic)](https://pypi.org/project/promptic) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Tests](https://github.com/knowsuchagency/promptic/actions/workflows/tests.yml/badge.svg)](https://github.com/knowsuchagency/promptic/actions/workflows/tests.yml)

90% of what you need for LLM app development. Nothing you don't.

Promptic aims to be the "[requests](https://requests.readthedocs.io/en/latest/)" of LLM development -- the most productive and pythonic way to build LLM applications. It leverages [LiteLLM][litellm], so you're never locked in to an LLM provider and can switch to the latest and greatest with a single line of code. Promptic gets out of your way so you can focus entirely on building features.

"Perfection is attained, not when there is nothing more to add, but when there is nothing more to take away."

At a glance

  • 🎯 Type-safe structured outputs with Pydantic
  • πŸ€– Easy-to-build agents with function calling
  • πŸ”„ Streaming support for real-time responses
  • πŸ“š Automatic prompt caching for supported models
  • πŸ’Ύ Built-in conversation memory

Installation

pip install promptic

Usage

Basics

Functions decorated with `@llm` use its docstring as a prompt template. When the function is called, promptic combines the docstring with the function's arguments to generate the prompt and returns the LLM's response.

# examples/basic.py

from promptic import llm


@llm
def translate(text, language="Chinese"):
    """Translate '{text}' to {language}"""


print(translate("Hello world!"))
# 您ε₯½οΌŒδΈ–η•ŒοΌ

print(translate("Hello world!", language="Spanish"))
# Β‘Hola, mundo!


@llm(
    model="claude-3-haiku-20240307",
    system="You are a customer service analyst. Provide clear sentiment analysis with key points.",
)
def analyze_sentiment(text):
    """Analyze the sentiment of this customer feedba