1. Introduction
In this lab, you will learn how to create Agent Skills to provide LLMs with access to bespoke knowledge and workflows. You will create it as a local skill that can be accessed from Gemini CLI.
What you'll do
- Create your own Agent Skills for your favorite things.
- Use Gemini CLI to query your skill.
- Install official Agent Skills for Firebase and use them to build and deploy an app.
What you'll learn
- How to structure a skill.
- How to write a
SKILL.mdfile. - How to use local skills with Gemini CLI.
2. Project Setup
- If you don't already have a Google Account, you must create a Google Account.
- Use a personal account instead of a work or school account. Work and school accounts may have restrictions that prevent you from enabling the APIs needed for this lab.
- Sign-in to the Google Cloud Console.
- Enable billing in the Cloud Console.
- Completing this lab should cost less than $1 USD in Cloud resources.
- You can follow the steps at the end of this lab to delete resources to avoid further charges.
- New users are eligible for the $300 USD Free Trial.
- Create a new project or choose to reuse an existing project.
- If you see an error about project quota, reuse an existing project or delete an existing project to create a new project.
3. Open Cloud Shell Editor
- Click this link to navigate directly to Cloud Shell Editor
- If prompted to authorize at any point today, click Authorize to continue.

- If the terminal doesn't appear at the bottom of the screen, open it:
- Click View
- Click Terminal

- In the terminal, set your project with this command:
- Format:
gcloud config set project [PROJECT_ID] - Example:
gcloud config set project lab-project-id-example - If you can't remember your project id:
- You can list all your project ids with:
gcloud projects list | awk '/PROJECT_ID/{print $2}'

- You can list all your project ids with:
- Format:
- You should see this message:
If you see aUpdated property [core/project].
WARNINGand are askedDo you want to continue (Y/n)?, then you have likely entered the project ID incorrectly. Pressn, pressEnter, and try to run thegcloud config set projectcommand again.
4. Create your "favorite things" skill
Agent Skills are directories containing at minimum a SKILL.md file that provides instructions and knowledge to an AI agent. In this section, you will create a skill that teaches Gemini CLI about your favorite things.
- Create a directory to store your skill:
mkdir -p ~/.gemini/skills/my-favorite-things - Create and open a new
SKILL.mdfile for your skill: Thecloudshell edit ~/.gemini/skills/my-favorite-things/SKILL.mdcloudshell editcommand will open theSKILL.mdfile in the editor above the terminal. - Add the following content to the
SKILL.mdfile:--- name: my-favorite-things description: Information about my favorite things. Use this skill to answer questions about my favorite color, food, or programming language. --- My favorite color is blue. My favorite food is pizza. My favorite programming language is Python. If asked about one of my favorite things, please respond with the information provided above.
With only a SKILL.md file, you have created your first skill! It is time to use this skill in Gemini CLI.
5. Use your skill from Gemini CLI
Now that you've successfully created a skill, you can use it with Gemini CLI. Skills placed in ~/.gemini/skills are automatically discovered by Gemini CLI.
- Start the Gemini CLI in Cloud Shell
You may need to pressgeminiEnterto accept some default settings. - Have gemini list the skills available to it within its context
You should see/skillsmy-favorite-thingsin the list of available skills. - Ask gemini about your favorite color:
The Gemini CLI should use theWhat is my favorite color?my-favorite-thingsskill to answer your question. If prompted, allow Gemini CLI to use the skill.
The output should show that Gemini CLI used your skill and replied with "Blue.".
You have done it! You have successfully created a skill and tested it using Gemini CLI.
When you are ready to end your session, type /quit and then press Enter to exit Gemini CLI.
6. Install Agent Skills for Firebase
In addition to creating your own skills, you can install skills created by others. Agent Skills for Firebase (GitHub) are portable, self-contained modules of Firebase-specific knowledge, instructions, and workflows. They're designed to help AI assistants understand Firebase best practices and execute complex tasks with higher accuracy and lower token cost.
You can install all Agent Skills for Firebase with with the skills CLI in your terminal:
npx skills add firebase/agent-skills
This command will download and install skills including firebase-basics, firebase-auth-basics, firebase-firestore-basics, and firebase-app-hosting-basics, making them available for use in Gemini CLI alongside your my-favorite-things skill.
To learn more about Agent Skills for Firebase, see Available skills.
7. Explore the Agent Skills for Firebase
The Agent Skills for Firebase are now installed and ready to use in Gemini CLI. You can see them by running Gemini CLI and typing /skills firebase:
gemini
Then in Gemini CLI:
/skills firebase
You will see a list of installed Firebase skills, like firebase-basics, firebase-auth-basics, firebase-firestore-basics, and firebase-app-hosting-basics.
8. (Optional) Use Agent Skills for Firebase to create and deploy an application
Now use the installed Agent Skills for Firebase to create a "To Do" web application, with user authentication and a database, and deploy it to Firebase App Hosting.
- If you are still in Gemini CLI, type
/quitto exit. - Create a new directory for your project and navigate into it:
mkdir todo-app && cd todo-app - Log in to Firebase using your Google account. If you are in Cloud Shell or another environment without a browser, use the
--no-localhostflag. Follow the instructions to authorize Firebase CLI.firebase login --no-localhost - Start Gemini CLI:
gemini - Now, ask Gemini to generate the application code:
Gemini may ask to create files likeGenerate HTML, CSS, and Javascript for a single page application. It should use Google Sign-in with Firebase Authentication, and save tasks in Cloud Firestore for the signed-in user. A user should be able to add new tasks and see a list of their tasks.index.html,style.css, andscript.js. Allow it to do so. - Finally, deploy the application to Firebase App Hosting:
Follow any prompts to configure App Hosting and complete the deployment. Once deployed, you should receive a URL for your live application!/firebase-app-hosting-basics deploy my web app to Firebase App Hosting.
9. Conclusion
Congratulations! You have successfully created a skill and learned how to install additional skills for Gemini CLI.
(Optional) Clean up
If you would like to clean up, you can delete your Cloud project to avoid incurring additional charges.
If you would like, delete the project:
gcloud projects delete $GOOGLE_CLOUD_PROJECT
You may also want to delete unnecessary resources from your cloudshell disk. You can:
- Delete the skill directory:
rm -rf ~/.gemini/skills/my-favorite-things - Warning! This next action is can't be undone! If you would like to delete everything on your Cloud Shell to free up space, you can delete your whole home directory. Be careful that everything you want to keep is saved somewhere else.
sudo rm -rf $HOME