agentleFS
GDvegaGDvega/super-android-kotlin-firebase-skill/skills/firebase-cloud-functions/SKILL.md

firebase-cloud-functions

Skill2 starsChanged 5 months agoMITView on GitHub

Use for Firebase Cloud Functions callable functions, HTTP functions, triggers, server-side validation, security, deployment and local testing.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use case and trust boundary.

    line 19
  2. Distinctive:

    Test locally with Emulator Suite.

    line 29
  3. Distinctive:

    Document deploy command and rollback risk.

    line 30
  4. Distinctive:

    Do not use functions as an insecure bypass.

    line 34
  5. Distinctive:

    Do not log secrets or sensitive payloads.

    line 36
  6. Distinctive:

    Do not assume these companion skills are installed.

    line 52
  7. Distinctive:

    Use $super-android-kotlin-firebase to create a callable invite validation function.

    line 90
  8. Distinctive:

    Use $super-android-kotlin-firebase to review this Firestore trigger.

    line 91

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Move privileged or trusted logic server-side while keeping Android clients simple.

When to use

  • Adding callable or HTTP functions.
  • Adding Firestore/Auth triggers.
  • Validating operations that rules cannot express.
  • Testing functions locally.

Inputs to inspect

  • Use case and trust boundary.
  • Input schema and auth/role requirements.
  • Runtime, region and emulator setup.
  • Android caller contract.

Required workflow

  1. Choose callable, HTTP or trigger based on caller and event source.
  2. Define input/output and error contract.
  3. Validate auth, roles and data server-side.
  4. Test locally with Emulator Suite.
  5. Document deploy command and rollback risk.

Rules

  • Do not use functions as an insecure bypass.
  • Validate every input.
  • Do not log secrets or sensitive payloads.
  • Make idempotency explicit for triggers.
  • Control region and cost implications.

Related existing skills

Local skills to invoke

  • firebase-core
  • firestore
  • security-privacy
  • firebase-emulator-ci
  • testing

External companion skills to use when installed

Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.

  • firebase/agent-skills — use for deeper Firebase product, Firestore, Security Rules or emulator workflow guidance when installed.

Files commonly touched

  • functions/src/*
  • firebase.json
  • firestore.rules
  • Android repository/service caller
  • function tests

Commands to validate

npm test
firebase emulators:start --only functions,firestore
firebase emulators:exec "npm test"
firebase deploy --only functions:<name>

Common mistakes to avoid

  • No auth checks.
  • Returning inconsistent error shapes.
  • Deploying without emulator test.
  • Creating duplicate writes from non-idempotent triggers.

Checklist

  • Auth checked.
  • Input validated.
  • Errors typed.
  • Emulator tested.
  • Deploy command documented.

Example prompts

  • Use $super-android-kotlin-firebase to create a callable invite validation function.
  • Use $super-android-kotlin-firebase to review this Firestore trigger.

Expected response style

Respond with: brief diagnosis, change plan, affected files, code or diff summary, validation commands, tests added or recommended, risks, and next step. For review tasks, lead with findings ordered by severity.

References

  • ../../docs/audits/FUENTES_LOCALES.md
  • references/functions-validation-and-emulator.md
  • templates/cloud-functions-template.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.