{"slug": "gemini-cli-skills-teaching-your-terminal-agent-how-to-think", "title": "Gemini CLI Skills: Teaching Your Terminal Agent How to Think 🧠", "summary": "Google has introduced Skills for Gemini CLI, a feature that packages specialized instructions and context into on-demand, discoverable capabilities to turn the generalist terminal agent into a specialist for specific workflows. Skills are stored as self-contained directories with a required `SKILL.md` file, and they use progressive disclosure to load only relevant knowledge, preventing context window saturation. The feature works identically in both Gemini CLI and its successor, Antigravity CLI, which launches on June 18th for free tier and Google One users.", "body_md": "Hey everyone 👋\n\nIf you've been using Gemini CLI for a while, you've probably noticed that the agent is great at general tasks but sometimes needs guidance for specific workflows. That's exactly what **Skills** are for.\n\nSkills are one of the most underrated features of Gemini CLI, and once you start using them, you'll wonder how you ever managed without. Today I'll walk you through what they are, how to create them, and a real-world example you can steal immediately.\n\nLet's start! 🤙\n\nGoogle has announced that Gemini CLI will transition to **Antigravity CLI** on June 18th for free tier and Google One users. The good news? Skills work the same way in both tools, so everything you learn here applies directly to Antigravity CLI. If you're already in the migration window, just replace \"Gemini CLI\" with \"Antigravity CLI\" in your head.\n\nThink about the difference between a generalist and a specialist. A generalist knows a bit of everything but lacks deep expertise in any one area. A specialist has deep knowledge in their domain and knows exactly how to approach problems in that field.\n\nBy default, Gemini CLI is a generalist. It knows a lot, but it doesn't know your specific project, your team's conventions, or the exact steps your deployment pipeline requires.\n\n**Skills turn the generalist into a specialist.**\n\nA Skill is a self-contained directory that packages specialized instructions and context into a discoverable capability. Unlike `GEMINI.md`\n\nfiles that are always loaded into context, Skills are loaded **on demand**, only when the agent determines they're relevant to your current task.\n\nThis distinction matters a lot. If you put everything into `GEMINI.md`\n\n, you quickly saturate the model's context window with information that's irrelevant to most tasks. Skills solve this with Progressive Disclosure, the agent sees a brief description of every skill, and only loads the full instructions when the skill is actually needed.\n\nThe result: the right knowledge, at the right time, without cluttering the context.\n\nA Skill is just a folder with a specific structure:\n\n```\n.gemini/skills/\n└── my-skill/\n    ├── SKILL.md          # The main definition file (required)\n    ├── examples/         # Reference implementations (optional)\n    ├── resources/        # Templates and assets (optional)\n    └── scripts/          # Helper scripts (optional)\n```\n\nThe only required file is `SKILL.md`\n\n. Everything else is supporting material that the agent can reference when the skill is activated.\n\nThis is the heart of every skill. It has two parts: a frontmatter header and a body with instructions.\n\n```\n---\nname: your-skill-name\ndescription: What this skill does. Use when you need to...\n---\n\n# Skill Title\n\nYour instructions here.\n```\n\nThe frontmatter is crucial. The `description`\n\nfield is what the agent reads at the start of every session to decide whether to load this skill. Write it clearly and specifically, a vague description will cause the skill to be activated at the wrong times (or never).\n\nGood description:\n\n\"Reviews code changes for security vulnerabilities, performance issues, and adherence to project conventions. Use when reviewing PRs or checking code before merging.\"\n\nBad description:\n\n\"Code review stuff.\"\n\nGemini CLI discovers skills from two locations, and which one you use depends on scope:\n\n**Project Skills** (`.gemini/skills/`\n\nin your repo):\n\nThese are tied to a specific project. Commit them to version control and your whole team gets the same specialized behavior. Perfect for project-specific workflows like deployment steps, framework conventions, or codebase-specific review guidelines.\n\n**Global Skills** (`~/.gemini/skills/`\n\nin your home directory):\n\nThese work across all your projects. Perfect for personal workflows, general coding standards, or tools you use everywhere.\n\nThe mental model: if a skill is useful for your team and the project, put it in the repo. If it's personal productivity, put it globally.\n\nLet's create a practical skill for code review. Here's the full process:\n\nFor a project skill:\n\n```\nmkdir -p .gemini/skills/code-review\n```\n\nFor a global skill:\n\n```\nmkdir -p ~/.gemini/skills/code-review\n```\n\nCreate `.gemini/skills/code-review/SKILL.md`\n\n:\n\n```\n---\nname: code-review\ndescription: Reviews code changes for bugs, security issues, performance problems, and style consistency. Use when reviewing PRs, checking diffs, or auditing code quality before merging.\n---\n\n# Code Review Skill\n\nYou are an expert code reviewer. When reviewing code, follow this checklist systematically.\n\n## Review Checklist\n\n### Correctness\n- Does the code do what it's supposed to do?\n- Are there logic errors or off-by-one mistakes?\n- Are all edge cases handled?\n\n### Security\n- Are inputs validated and sanitized?\n- Are there potential injection vulnerabilities?\n- Is sensitive data handled securely?\n\n### Performance\n- Are there unnecessary loops or redundant operations?\n- Are database queries optimized?\n- Are there memory leaks or heavy resource usage?\n\n### Style and Conventions\n- Does the code follow the project's naming conventions?\n- Is the code readable and well-structured?\n- Are functions small and single-responsibility?\n\n## How to Provide Feedback\n\nFor each issue found:\n1. Specify the exact location (file and line number)\n2. Explain what the problem is and why it matters\n3. Suggest a concrete fix with a code example when possible\n\nEnd the review with a summary: overall assessment (Approve / Request Changes / Needs Discussion) and a brief explanation.\n```\n\nStart Gemini CLI in your project directory and run:\n\n```\n/skills\n```\n\nYou should see your `code-review`\n\nskill listed. If it's not there, double-check the directory structure and file naming.\n\nJust work normally. When you ask for a code review:\n\n```\nReview the changes in auth.js before I merge this PR\n```\n\nGemini CLI sees the request, matches it against the skill description, loads the full `SKILL.md`\n\n, and follows your checklist systematically. You don't need to explicitly invoke the skill, it happens automatically.\n\nLet me share another skill I use constantly, one that enforces Conventional Commits format across all my projects.\n\nCreate `.gemini/skills/conventional-commits/SKILL.md`\n\n:\n\n```\n---\nname: conventional-commits\ndescription: Generates commit messages following the Conventional Commits specification. Use when creating, reviewing, or suggesting git commit messages.\n---\n\n# Conventional Commits Skill\n\nYou are an expert at writing clear, structured commit messages following the Conventional Commits 1.0.0 specification.\n\n## Format\n\n<type>(<scope>): <description>\n\n[optional body]\n\n[optional footer(s)] \n\n## Types\n\n- **feat**: A new feature\n- **fix**: A bug fix\n- **docs**: Documentation changes only\n- **style**: Formatting changes (no code logic change)\n- **refactor**: Code change that neither fixes a bug nor adds a feature\n- **perf**: Performance improvement\n- **test**: Adding or updating tests\n- **chore**: Build process or auxiliary tool changes\n\n## Rules\n\n1. Use the imperative mood in the description (\"add feature\" not \"added feature\")\n2. Lowercase the entire first line\n3. No period at the end of the description\n4. Keep the description under 72 characters\n5. The body explains \"what\" and \"why\", not \"how\"\n6. Reference issue numbers in the footer: `Closes #123`\n\n## Examples\n\n- feat(auth): add JWT token refresh logic\n- fix(api): handle null response from payment provider\n- docs: update README with pnpm installation steps\n- refactor(utils): extract string validation to dedicated module \n\nWhen suggesting a commit message, always explain your reasoning for the chosen type and scope.\n```\n\nNow whenever you ask Gemini CLI to help with a commit:\n\n```\nWrite a commit message for the changes I just made to the authentication module\n```\n\nThe agent loads the skill, understands the full convention, and generates a properly formatted message with the right type, scope, and description style.\n\nA common question: when should you put something in a Skill vs. in `GEMINI.md`\n\n?\n\n**Use GEMINI.md for:**\n\n**Use a Skill for:**\n\nThe rule of thumb: if you'd be annoyed by the agent using this knowledge on unrelated tasks, it's a skill. If you'd be annoyed if the agent ever lacked this knowledge, it belongs in `GEMINI.md`\n\n.\n\nAfter creating several skills, here's what actually works:\n\n**Write narrow descriptions.** The description is how the agent decides whether to activate the skill. Narrow is better than broad. \"Use when reviewing PRs or checking code quality\" is better than \"Use for coding tasks.\"\n\n**Add explicit \"do not use\" hints when needed.** If your skill might be over-activated, add clarity: \"Do not use for general coding questions or feature implementation.\"\n\n**Keep SKILL.md focused.** Put detailed examples and templates in the `examples/`\n\nor `resources/`\n\nsubdirectories. The core `SKILL.md`\n\nshould be scannable and concise.\n\n**One skill, one responsibility.** Don't create a \"general development\" mega-skill. Create separate skills for deployment, testing, code review, etc.\n\n**Test activation.** After creating a skill, try prompts that should and shouldn't activate it. If it activates when it shouldn't, tighten the description.\n\nSkills are a small investment with a big return. You spend 10-15 minutes writing a `SKILL.md`\n\nonce, and the agent follows your exact workflow consistently from that point on.\n\nThe bigger picture: Skills are how you transform Gemini CLI (or Antigravity CLI) from a generic AI assistant into a tool that understands your team, your conventions, and your processes. The more skills you build, the more the agent feels like a teammate rather than a tool.\n\nStart small, maybe with a code review skill or a commit message skill, and build from there. You'll quickly start noticing the moments where the agent \"just knows\" what you need, and that's when it clicks.\n\nHappy coding! ✨\n\nHi 👋🏻\n\nMy name is Domenico, software developer passionate of Open Source, I write article about it for share my knowledge and experience.\n\nDon't forget to visit my Linktree to discover my links and to check out Domenico Tenace Open Labs for my open-source projects! 🫰🏻\n\n🌲 Linktree: [https://linktr.ee/domenicotenace](https://linktr.ee/domenicotenace)\n\n🐙 Domenico Tenace Open Labs: [https://github.com/Domenico-Tenace-Open-Labs](https://github.com/Domenico-Tenace-Open-Labs)\n\nFollow me on dev.to for more articles 👇\n\nIf you like my content or want to support my work, you can support me with a small donation. I would be grateful 🥹", "url": "https://wpnews.pro/news/gemini-cli-skills-teaching-your-terminal-agent-how-to-think", "canonical_source": "https://dev.to/playfulprogramming/gemini-cli-skills-teaching-your-terminal-agent-how-to-think-2541", "published_at": "2026-05-26 06:00:00+00:00", "updated_at": "2026-05-26 06:03:48.007365+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "large-language-models", "generative-ai", "artificial-intelligence"], "entities": ["Gemini CLI", "Antigravity CLI", "Google"], "alternates": {"html": "https://wpnews.pro/news/gemini-cli-skills-teaching-your-terminal-agent-how-to-think", "markdown": "https://wpnews.pro/news/gemini-cli-skills-teaching-your-terminal-agent-how-to-think.md", "text": "https://wpnews.pro/news/gemini-cli-skills-teaching-your-terminal-agent-how-to-think.txt", "jsonld": "https://wpnews.pro/news/gemini-cli-skills-teaching-your-terminal-agent-how-to-think.jsonld"}}