Skip to content

Portkey-AI/skills

Repository files navigation

Portkey Agent Skills

License

Give your AI coding assistant the knowledge to work with the Portkey SDK by installing our official skills. This enables AI agents to understand Portkey's APIs, patterns, and best practices when helping you write code.

Quick Start

Install Portkey skills in your project:

npx add-skill portkey-ai/skills

Or install a specific skill:

# Python SDK skill
npx add-skill portkey-ai/skills --skill portkey-python-sdk

# TypeScript SDK skill
npx add-skill portkey-ai/skills --skill portkey-typescript-sdk

Supported AI Coding Assistants

The skills work with any AI coding assistant that supports the Agent Skills format:

Assistant Status
Claude Code ✅ Supported
Cursor ✅ Supported
OpenCode ✅ Supported
GitHub Copilot ✅ Supported
Codex ✅ Supported
Amp ✅ Supported
Roo Code ✅ Supported

Available Skills

portkey-python-sdk

Teaches your AI assistant how to use the Portkey Python SDK, including:

  • SDK installation and configuration
  • Chat completions and streaming
  • Observability and tracing
  • Caching, fallbacks, and load balancing
  • Multi-provider routing
  • Error handling patterns

portkey-typescript-sdk

Teaches your AI assistant how to use the Portkey TypeScript SDK, including:

  • SDK installation and configuration
  • Chat completions and streaming
  • Observability and tracing
  • Caching, fallbacks, and load balancing
  • Multi-provider routing
  • Error handling patterns

Installation Options

List available skills

npx add-skill portkey-ai/skills --list

Project-level installation (default)

Installs skills to your current project directory:

npx add-skill portkey-ai/skills

Global installation

Installs skills globally so they're available across all your projects:

npx add-skill portkey-ai/skills --global

Target specific agent

Install for a specific AI coding assistant only:

npx add-skill portkey-ai/skills --agent cursor
npx add-skill portkey-ai/skills --agent claude

Manual Installation

If you prefer to install manually, copy the skill files to your project's skills directory:

For Claude Code

mkdir -p .claude/skills/portkey-python-sdk
curl -o .claude/skills/portkey-python-sdk/SKILL.md \
  https://raw.githubusercontent.com/portkey-ai/skills/main/skills/portkey-python-sdk/SKILL.md

For Cursor

mkdir -p .cursor/skills/portkey-python-sdk
curl -o .cursor/skills/portkey-python-sdk/SKILL.md \
  https://raw.githubusercontent.com/portkey-ai/skills/main/skills/portkey-python-sdk/SKILL.md

What is Portkey?

Portkey is an AI Gateway that provides:

  • Unified API: Single API to access 200+ LLM providers
  • Observability: Complete visibility into LLM requests, costs, and performance
  • Reliability: Automatic fallbacks, retries, and load balancing
  • Caching: Reduce costs with semantic and simple caching
  • Guardrails: Input/output validation and content moderation

Example Usage

After installing the skill, your AI assistant can help you with tasks like:

"Help me set up Portkey with OpenAI fallback to Anthropic"

from portkey_ai import Portkey

client = Portkey(
    api_key="YOUR_PORTKEY_API_KEY",
    config={
        "strategy": {"mode": "fallback"},
        "targets": [
            {"virtual_key": "openai-key"},
            {"virtual_key": "anthropic-key"}
        ]
    }
)

response = client.chat.completions.create(
    messages=[{"role": "user", "content": "Hello!"}]
)

"Add request tracing to my Portkey calls"

response = client.chat.completions.create(
    messages=[{"role": "user", "content": "Hello!"}],
    metadata={
        "trace_id": "my-trace-123",
        "user_id": "user-456"
    }
)

Updating

To get the latest SDK documentation, re-run the install command:

npx add-skill portkey-ai/skills

Contributing

Contributions are welcome! Please see our contributing guidelines.

Resources

License

Apache 2.0 - See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published