langchain-ai/deepagents · error · SystemExit

Error: Skill '{skill_name}' not found.

Error message

Error: Skill '{skill_name}' not found.

What it means

`dcode skills info <name>` could not find a skill with the given name among the loaded user/project/agent/built-in skills. The command prints the available skill names as a hint and exits 1.

Source

Thrown at libs/code/deepagents_code/skills/commands.py:591

        )
    else:
        skills = list_skills(
            built_in_skills_dir=get_built_in_skills_dir(),
            user_skills_dir=user_skills_dir,
            project_skills_dir=project_skills_dir,
            user_agent_skills_dir=user_agent_skills_dir,
            project_agent_skills_dir=project_agent_skills_dir,
        )

    # Find the skill
    skill = next((s for s in skills if s["name"] == skill_name), None)

    if not skill:
        console.print(f"[bold red]Error:[/bold red] Skill '{skill_name}' not found.")
        console.print("\n[dim]Available skills:[/dim]", style=theme.MUTED)
        for s in skills:
            console.print(f"  - {s['name']}", style=theme.MUTED)
        raise SystemExit(1)

    if output_format == "json":
        from deepagents_code.output import write_json

        write_json("skills info", dict(skill))
        return

    # Read the full SKILL.md file
    skill_path = Path(skill["path"])
    skill_content = skill_path.read_text(encoding="utf-8")

    # Determine source label
    source_labels = {
        "project": ("Project Skill", "green"),
        "user": ("User Skill", "cyan"),
        "built-in": ("Built-in Skill", "magenta"),
    }
    source_label, source_color = source_labels.get(skill["source"], ("Skill", "dim"))

View on GitHub (pinned to a1af029e6e)

Solutions

  1. Use a skill name exactly as listed in the printed 'Available skills' output
  2. Re-run without `--project` (or with it) to check the other scope
  3. Confirm the skill folder contains a valid SKILL.md so `list_skills` picks it up
  4. Run `dcode skills list` to see all discoverable skills

Example fix

// before
dcode skills info MySkill --project   # wrong case / wrong scope
// after
dcode skills list && dcode skills info my-skill
Defensive patterns

Strategy: validation

Validate before calling

import subprocess, sys

def skill_exists(name: str) -> bool:
    out = subprocess.run(["dcode", "skills", "list", "--json"], capture_output=True, text=True)
    import json
    skills = json.loads(out.stdout).get("skills", []) if out.returncode == 0 else []
    return any(s["name"] == name for s in skills)

if not skill_exists("my-skill"):
    sys.exit(f"skill 'my-skill' not available")

Try / catch

import subprocess
proc = subprocess.run(["dcode", "skills", "info", name], capture_output=True, text=True)
if proc.returncode != 0 and "not found" in proc.stderr:
    print(f"skip: {name} not installed")

Prevention

When it happens

Trigger: `_info` with a `skill_name` that does not match any skill returned by `list_skills(...)` — misspelled name, skill exists only in the other scope (user vs project) than requested, or the skill directory lacks a valid SKILL.md.

Common situations: Typos or case mismatches in the skill name, a recently deleted/renamed skill, running with `--project` when the skill lives at user scope, or an invalid skill folder that `list_skills` silently skips.

Related errors


AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29). Data as JSON: /api/errors/bd76d0851422bd03. Report an issue: GitHub.