인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
개발 및 엔지니어링 · SKILL.md

custom-skills

custom-skills

Guides PandasAI custom function skills, @pai.skill decorators, SkillType validation, global registry management, and skill-related troubleshooting.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: custom-skills description: "Guides PandasAI custom function skills, @pai.skill decorators, SkillType validation, global registry management, and skill-related troubleshooting." disable-model-invocation: true metadata: disco-role: operating license: NOASSERTION

Custom Skills

Use this sub-skill when a user wants PandasAI to make custom Python functions available to generated analysis code through @pai.skill() or the pandasai.ee.skills registry.

PandasAI custom skills are runtime functions for PandasAI-generated code. They are not DisCo Agent Skills and are not SKILL.md directories.

Fast route

  1. Define a normal Python function with type hints and a useful docstring.
  2. Decorate it with @pai.skill() or @pai.skill("custom_name").
  3. Configure the LLM and run PandasAI chat as usual.
  4. If testing registry behavior, clear SkillsManager between tests to avoid duplicate-name leakage.
  5. If the task is about using those functions during chat, route back to ../conversational-analysis/SKILL.md after registration is correct.
import pandasai as pai

@pai.skill()
def format_currency(amount: float) -> str:
    """Format a numeric amount as US dollars."""
    return f"${amount:,.2f}"

Read next

Boundaries

Enterprise note

PandasAI documentation marks custom skills as an Enterprise feature for production use. For local experimentation and tests, the decorator and registry exist in the package. For production deployments, warn the user to confirm their PandasAI license/plan.

Safe validation

python sub-skills/custom-skills/scripts/skill_registry_smoke.py

The helper registers a small skill, verifies duplicate-name protection, verifies no-docstring failure behavior, and prints JSON. It does not need a real LLM or provider key.

Common gotchas

  • A function must have a docstring unless SkillType(..., description=...) is used directly.
  • Duplicate skill names in the global registry raise ValueError.
  • Decorated functions are replaced by SkillType objects, but remain callable.
  • Registry state is global; clear it in tests before registering predictable names.
  • Lambdas need an explicit name and description when wrapped directly.
저장한 Skills