google-gemini / google-gemini/gemini-cli

[Bug] Skills discovery fails when 'description' in SKILL.md frontmatter is a single line

Open
#25,693 24 comments 1 reaction 1 assignee Claimed by @saiteja00743 View on GitHub
area/extensions effort/small good first issue help wanted kind/bug priority/p2 status/bot-triaged type/bug
Dominant language
TypeScript
Stars
107k
Forks
14.6k
Avg merge
2d 3h
Merged PRs (30d)
45

Description

---
title: "[Bug] Skills discovery fails when `description` in `SKILL.md` frontmatter is a single line"
labels: ["area/extensions", "status/need-triage"]
---

### Description
The Gemini CLI skill discovery mechanism fails to recognize local skills in `.agents/skills/` or `.gemini/skills/` if the `description` field in the `SKILL.md` YAML frontmatter is written as a single line.

Changing the description to a multi-line block (using the YAML `>` operator) immediately resolves the issue and allows the skill to be discovered by `/skills list`.

### Steps to Reproduce
1. Create a folder `.agents/skills/test-skill/`.
2. Create a `SKILL.md` with the following content:
```markdown
---
name: test-skill
description: A single line description that is relatively long and contains some punctuation.
---
# Test Skill
Content here.
```
3. Run `gemini chat` and type `/skills list`.
4. **Actual Result**: `test-skill` is missing from the list.
5. Modify `SKILL.md` to use multi-line YAML scalar:
```markdown
---
name: test-skill
description: >
A multi-line description that is relatively long
and contains some punctuation.
---
# Test Skill
Content here.
```
6. Run `/skills list` again.
7. **Expected Result**: `test-skill` should be visible in both cases. Currently, it only works with the multi-line format.

### Environment
- OS: Windows 11 (PowerShell 7)
- Gemini CLI Version: 0.38.2
- Runtime: Node.js / Bun

### Additional Context
This bug significantly impacts the developer experience as many users intuitively write short, single-line descriptions. The workaround (using `>`) suggests a specific issue in how the CLI parses YAML frontmatter in `SKILL.md` files during the initial scanning phase.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.