Skip to content

Skill to convert extensions codebases into functions codebases#21

Open
inlined wants to merge 5 commits intomainfrom
inlined.ext-to-cf3
Open

Skill to convert extensions codebases into functions codebases#21
inlined wants to merge 5 commits intomainfrom
inlined.ext-to-cf3

Conversation

@inlined
Copy link
Copy Markdown
Member

@inlined inlined commented Mar 3, 2026

Will help people who want to migrate from extensions to functions to customize functionality.

This is just a first draft for your review. I'm tagging Jeff for skill design in general. Tagging Joe and Pavel for ideas on how well this covers the conversion requirements. I can add examples in the future too.

While executing it on Extensions I noticed some features that actually need to be implemented. New features to add to Functions before this skill is complete:

  1. An expr tag that can be used for string interpolation with functions so you can say things like "
 export const fn = functions.pubsub.schedule(expr`every ${frequency} days`)...
  1. A new requireAPI method that will tell the CLI to automatically enable APIs
  2. A new requireRole method that will tell teh CLI that this codebase's service account must be granted particular roles

@inlined inlined requested review from jhuleatt, joehan and pavelgj March 3, 2026 06:46
Copy link
Copy Markdown
Member

@joehan joehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the idea, this is a perfect use case for skills!

Right now, this seems aimed at just users who are finding an extension for the first time. Should we expand it to cover cases where I have an extension configured in my project (with a firebase.json entry, env files, etc), and want to convert it to a functions codebase so I can make changes?

deploy as their own functions. The only problem is that the extensions namespace
doesn't express any of the IaC expected in extensions. This fixes taht.

## Triggerrs
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this section - no need to put this in the skill body, because at this point the skill has already triggered.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was advice I've seen online. I think the point is that when indexing the skill it tells the agent when to use this like a tool call. If I'm right, this will help. If I'm wrong this will do no harm, so I'd like to keep it.

Copy link
Copy Markdown
Member Author

@inlined inlined left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publishing pushback and will have an agent apply the rest.

deploy as their own functions. The only problem is that the extensions namespace
doesn't express any of the IaC expected in extensions. This fixes taht.

## Triggerrs
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was advice I've seen online. I think the point is that when indexing the skill it tells the agent when to use this like a tool call. If I'm right, this will help. If I'm wrong this will do no harm, so I'd like to keep it.

@inlined
Copy link
Copy Markdown
Member Author

inlined commented Mar 5, 2026

/gemini review

to add the functions codebase to `firebase.json` for the user so that it will be included
in subsequent deploys. If the user agrees, add the functions codebase to `firebase.json`.

### Testing
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about telling the agents to set maxInstances: 1 (or at least <=10) until correct behavior can be confirmed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very nervous about this since I intend this to be something that promotes code review and then you run with it.

@inlined inlined requested review from joehan and removed request for pavelgj April 1, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants