Configuring discovery and precedence with SkillsConfig

Discover project and team skills automatically with dirs=

Instead of listing 10 individual skill paths by hand, pass SkillsConfig(dirs=['./skills'], auto_discover=True) so PraisonAI discovers every subfolder containing SKILL.md.

Example

import tempfile
from pathlib import Path
from praisonai import Agent, SkillsConfig

with tempfile.TemporaryDirectory() as tmp:
    for name, desc in [
        ('sql-tuning', 'Optimize slow PostgreSQL queries and indexes.'),
        ('release-notes', 'Draft concise changelog entries from commits.'),
    ]:
        d = Path(tmp) / name
        d.mkdir()
        (d / 'SKILL.md').write_text(f'---\nname: {name}\ndescription: {desc}\n---\n# {name}\nBe concise.\n')
    agent = Agent(
        name='MultiSkillAgent',
        instructions='Use discovered skills concisely in one sentence.',
        skills=SkillsConfig(dirs=[tmp], auto_discover=True),
        output='silent',
    )
    print('Skill loaded:', agent.skill_manager.get_skill('sql-tuning').properties.name)
    print(agent.start('How can I speed up a Postgres query filtering by tenant_id and created_at?'))

Try it Yourself

Example explained

  • SkillsConfig(dirs=[tmp], auto_discover=True) — Scans a whole team skills directory automatically.

Project skills override global skills cleanly

Keep organization-wide skills in a shared directory and repo-specific overrides in ./.praisonai/skills/ so teams share defaults without fighting over customizations.

Common pitfall: putting 40 overlapping skills in one folder

Too many overlapping descriptions confuse trigger selection. Keep each skill focused on one clear workflow with non-overlapping keywords.

Reference: documentation