🎯

firebase-functions

🎯Skill

from bumgeunsong/daily-writing-friends

VibeIndex|
What it does

Streamlines Firebase Cloud Functions development with structured TypeScript patterns, error handling, and organized function implementations.

πŸ“¦

Part of

bumgeunsong/daily-writing-friends(12 items)

firebase-functions

Installation

git cloneClone repository
git clone https://github.com/BumgeunSong/daily-writing-friends.git
npm runRun npm script
npm run dev
πŸ“– Extracted from docs: bumgeunsong/daily-writing-friends
1Installs
6
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Use when creating or modifying Firebase Cloud Functions in /functions directory. Enforces function structure and error handling patterns.

Overview

# Firebase Functions Patterns

Directory Structure

```

functions/

β”œβ”€β”€ src/

β”‚ β”œβ”€β”€ index.ts # Function exports

β”‚ β”œβ”€β”€ admin.ts # Firebase Admin SDK init

β”‚ β”œβ”€β”€ backfill/ # Data migration scripts

β”‚ β”œβ”€β”€ commentSuggestion/ # AI comment features

β”‚ β”œβ”€β”€ commentings/ # Comment activity tracking

β”‚ β”œβ”€β”€ notifications/ # Push notification functions

β”‚ β”œβ”€β”€ postings/ # Post activity tracking

β”‚ β”œβ”€β”€ replyings/ # Reply activity tracking

β”‚ └── shared/ # Shared utilities

```

Function Structure

```typescript

import { onDocumentCreated } from 'firebase-functions/v2/firestore';

import admin from '../admin';

import { Post } from '../types/Post';

export const createPosting = onDocumentCreated(

'boards/{boardId}/posts/{postId}',

async (event) => {

const postData = event.data?.data() as Post;

const { boardId, postId } = event.params;

if (!postData) {

console.error('No post data found.');

return null;

}

try {

await admin.firestore()

.collection('users')

.doc(postData.authorId)

.collection('postings')

.add(postingData);

console.log(Created posting for user ${postData.authorId});

} catch (error) {

console.error('Error writing posting:', error);

}

return null;

}

);

```

Error Handling

Don't throw - let function complete gracefully:

```typescript

try {

await admin.firestore().collection('...').add(data);

console.log(Successfully created ${resourceType});

} catch (error) {

console.error(Error creating ${resourceType}:, error);

// Don't throw - function should complete

}

return null;

```

Build & Test

```bash

cd functions && npm install # Install deps

cd functions && npm run build # Compile TypeScript

cd functions && npm test # Run Jest tests

```

More from this repository10

🎯
refactoring🎯Skill

Refactors code by extracting pure functions from side-effect-laden logic, enabling easier testing and maintainability.

🎯
code-style🎯Skill

Enforces clean, readable code by providing guidelines for function design, naming conventions, and code clarity principles.

🎯
testing🎯Skill

Enforces output-based testing of pure functions, guiding developers to write testable code by focusing on functional core transformations.

🎯
react-hook🎯Skill

I apologize, but I cannot generate a description without seeing the specific details about the "react-hook" skill from the repository. Could you provide more context or details about what this part...

🎯
pr-stacking🎯Skill

Enables developers to break large features into smaller, dependent PRs for incremental development and easier code reviews.

🎯
daily-writing-friends-design🎯Skill

Provides a comprehensive design system for Daily Writing Friends, ensuring consistent UI components, styling, and accessibility across the application.

🎯
api-layer🎯Skill

Manages API interactions and request handling for the Daily Writing Friends application, facilitating communication between frontend and backend services.

🎯
skill-creator🎯Skill

Guides developers in designing Claude Skills using progressive disclosure, optimizing skill architecture and content creation.

🎯
fetching-pr-comments🎯Skill

Retrieves and parses GitHub PR review comments for the current branch using GitHub CLI, enabling quick review of code-level feedback.

🎯
commit🎯Skill

Stages and commits git changes following specific Korean commit message guidelines for clean, meaningful version control.