crewai - 💡(How to fix) Fix [BUG] skills problem [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#5469Fetched 2026-04-16 06:44:41
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

hi my friend , why activate all skills data in dir, i think first step is to find only METADATA . AND I see all skills INSTRUCTIONS in llm prompt , is this a problem? def set_skills

        for item in items:
            if isinstance(item, Path):
                discovered = discover_skills(item, source=self)
                for skill in discovered:
                    if skill.name not in seen:
                        seen.add(skill.name)
                        resolved.append(activate_skill(skill, source=self))

Root Cause

hi my friend , why activate all skills data in dir, i think first step is to find only METADATA . AND I see all skills INSTRUCTIONS in llm prompt , is this a problem? def set_skills

        for item in items:
            if isinstance(item, Path):
                discovered = discover_skills(item, source=self)
                for skill in discovered:
                    if skill.name not in seen:
                        seen.add(skill.name)
                        resolved.append(activate_skill(skill, source=self))

Code Example

for item in items:
            if isinstance(item, Path):
                discovered = discover_skills(item, source=self)
                for skill in discovered:
                    if skill.name not in seen:
                        seen.add(skill.name)
                        resolved.append(activate_skill(skill, source=self))
RAW_BUFFERClick to expand / collapse

Description

hi my friend , why activate all skills data in dir, i think first step is to find only METADATA . AND I see all skills INSTRUCTIONS in llm prompt , is this a problem? def set_skills

        for item in items:
            if isinstance(item, Path):
                discovered = discover_skills(item, source=self)
                for skill in discovered:
                    if skill.name not in seen:
                        seen.add(skill.name)
                        resolved.append(activate_skill(skill, source=self))

Steps to Reproduce

discovered_skills = discover_skills(SKILLS_ROOT) agent = Agent( role="旅行顾问", goal="根据用户需求提供专业的旅行建议", backstory=( "你是一位经验丰富的旅行顾问,熟悉全球各地的景点、文化与注意事项。" "你善于倾听用户需求,并给出个性化的旅行方案。" ), skills=discovered_skills, verbose=True, ) messages = [ {"role": "user", "content": "我想去日本旅游,大概有 10 天时间,应该去哪些城市?} ] result = agent.kickoff(messages)

Expected behavior

first step is to find only METADATA

Screenshots/Code snippets

discovered_skills = discover_skills(SKILLS_ROOT) agent = Agent( role="旅行顾问", goal="根据用户需求提供专业的旅行建议", backstory=( "你是一位经验丰富的旅行顾问,熟悉全球各地的景点、文化与注意事项。" "你善于倾听用户需求,并给出个性化的旅行方案。" ), skills=discovered_skills, verbose=True, ) messages = [ {"role": "user", "content": "我想去日本旅游,大概有 10 天时间,应该去哪些城市?} ] result = agent.kickoff(messages)

Operating System

Ubuntu 20.04

Python Version

3.10

crewAI Version

1.14.1

crewAI Tools Version

1.14.1

Virtual Environment

Venv

Evidence

skills problem

Possible Solution

skills problem

Additional context

skills problem

extent analysis

TL;DR

Modify the set_skills function to only activate skills with specific metadata.

Guidance

  • Review the discover_skills function to ensure it correctly identifies skill metadata.
  • Modify the set_skills function to filter skills based on their metadata before activation.
  • Verify that the seen set is properly updated to avoid duplicate skill activations.
  • Check the activate_skill function to ensure it correctly handles skill metadata.

Example

def set_skills
    for item in items:
        if isinstance(item, Path):
            discovered = discover_skills(item, source=self)
            for skill in discovered:
                if skill.name not in seen and skill.metadata == 'METADATA':  # Filter skills by metadata
                    seen.add(skill.name)
                    resolved.append(activate_skill(skill, source=self))

Notes

The provided code snippet and issue description lack specific details about the discover_skills and activate_skill functions, making it challenging to provide a comprehensive solution.

Recommendation

Apply workaround: Modify the set_skills function to filter skills based on their metadata to prevent unnecessary activations.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

first step is to find only METADATA

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING