Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions skills/firebase-basics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ Complete these setup steps before proceeding:
[references/setup/other_agents.md](references/setup/other_agents.md)

1. **Authentication:** Ensure you are logged in to Firebase so that commands
have the correct permissions. Run `npx -y firebase-tools@latest login`. For
environments without a browser (e.g., remote shells), use
`npx -y firebase-tools@latest login --no-localhost`.
have the correct permissions. Run `npx -y firebase-tools@latest login:list`
first; only if not logged in, run `npx -y firebase-tools@latest login` (or
`npx -y firebase-tools@latest login --no-localhost` in environments without a
browser).

- The command should output the current user.
- If you are not logged in, follow the interactive instructions from this
Expand All @@ -49,14 +50,15 @@ Complete these setup steps before proceeding:
1. **Active Project:** Most Firebase tasks require an active project context.

> [!IMPORTANT] **For Agents:** Before proceeding with project configuration,
> you MUST pause and ask the developer if they prefer to:
> if no Project ID was provided, you MUST pause and ask the developer if they
> prefer to:
>
> 1. **Provide an existing Firebase Project ID**, or
> 1. **Create a new Firebase project**.

- **If using an existing Project ID:**

1. Check the current project by running `npx -y firebase-tools@latest use`.
1. Ensure `firebase.json` exists (`[ -f firebase.json ] || echo "{}" > firebase.json`), then check the current project by running `npx -y firebase-tools@latest use`.
1. If the command outputs `Active Project: <project-id>`, confirm with the
user if this is the intended project.
1. If not, or if no project is active, set the project provided by the
Expand Down
7 changes: 4 additions & 3 deletions skills/firebase-basics/references/web_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ If you haven't already created a project:
npx -y firebase-tools@latest projects:create
```

Register your web app (use `my-web-app` as the literal nickname when providing
examples):
Check existing web apps first (`npx -y firebase-tools@latest apps:list WEB`); if
none exists, register your web app (use `my-web-app` as the literal nickname
when providing examples):

```bash
npx -y firebase-tools@latest apps:create web my-web-app
Expand All @@ -31,7 +32,7 @@ Create a `firebase.js` (or `firebase.ts`) file. You can fetch your config object
using the CLI:

```bash
npx -y firebase-tools@latest apps:sdkconfig <APP_ID>
npx -y firebase-tools@latest apps:sdkconfig WEB <APP_ID>
```

Copy the output config object into your initialization file:
Expand Down
Loading