{"record":{"id":"bd76d0851422bd03","repo":"langchain-ai/deepagents","slug":"error-skill-skill-name-not-found","errorCode":null,"errorMessage":"Error: Skill '{skill_name}' not found.","messagePattern":"Error: Skill '(.+?)' not found\\.","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/skills/commands.py","lineNumber":591,"sourceCode":"        )\n    else:\n        skills = list_skills(\n            built_in_skills_dir=get_built_in_skills_dir(),\n            user_skills_dir=user_skills_dir,\n            project_skills_dir=project_skills_dir,\n            user_agent_skills_dir=user_agent_skills_dir,\n            project_agent_skills_dir=project_agent_skills_dir,\n        )\n\n    # Find the skill\n    skill = next((s for s in skills if s[\"name\"] == skill_name), None)\n\n    if not skill:\n        console.print(f\"[bold red]Error:[/bold red] Skill '{skill_name}' not found.\")\n        console.print(\"\\n[dim]Available skills:[/dim]\", style=theme.MUTED)\n        for s in skills:\n            console.print(f\"  - {s['name']}\", style=theme.MUTED)\n        raise SystemExit(1)\n\n    if output_format == \"json\":\n        from deepagents_code.output import write_json\n\n        write_json(\"skills info\", dict(skill))\n        return\n\n    # Read the full SKILL.md file\n    skill_path = Path(skill[\"path\"])\n    skill_content = skill_path.read_text(encoding=\"utf-8\")\n\n    # Determine source label\n    source_labels = {\n        \"project\": (\"Project Skill\", \"green\"),\n        \"user\": (\"User Skill\", \"cyan\"),\n        \"built-in\": (\"Built-in Skill\", \"magenta\"),\n    }\n    source_label, source_color = source_labels.get(skill[\"source\"], (\"Skill\", \"dim\"))","sourceCodeStart":573,"sourceCodeEnd":609,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/skills/commands.py#L573-L609","documentation":"`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.","triggerScenarios":"`_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.","commonSituations":"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.","solutions":["Use a skill name exactly as listed in the printed 'Available skills' output","Re-run without `--project` (or with it) to check the other scope","Confirm the skill folder contains a valid SKILL.md so `list_skills` picks it up","Run `dcode skills list` to see all discoverable skills"],"exampleFix":"// before\ndcode skills info MySkill --project   # wrong case / wrong scope\n// after\ndcode skills list && dcode skills info my-skill","handlingStrategy":"validation","validationCode":"import subprocess, sys\n\ndef skill_exists(name: str) -> bool:\n    out = subprocess.run([\"dcode\", \"skills\", \"list\", \"--json\"], capture_output=True, text=True)\n    import json\n    skills = json.loads(out.stdout).get(\"skills\", []) if out.returncode == 0 else []\n    return any(s[\"name\"] == name for s in skills)\n\nif not skill_exists(\"my-skill\"):\n    sys.exit(f\"skill 'my-skill' not available\")","typeGuard":null,"tryCatchPattern":"import subprocess\nproc = subprocess.run([\"dcode\", \"skills\", \"info\", name], capture_output=True, text=True)\nif proc.returncode != 0 and \"not found\" in proc.stderr:\n    print(f\"skip: {name} not installed\")","preventionTips":["Copy skill names from `dcode skills list`, never type from memory","Check both user and project scopes for the skill","Treat missing SKILL.md folders as invisible to the CLI"],"tags":["cli","not-found","skills"],"backgroundTag":"skill-not-found","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}