Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

firestore-operations-manager

БесплатноЗапускает вложенные скриптыНе проверен

Manages Firebase/Firestore operations including CRUD, queries, batch processing, A2A agent communication, MCP server integration, and Cloud Run service…

BbgnsurfTechот BbgnsurfTech★ 30 звёзд на GitHub

Об этом скилле

Firestore Operations Manager

Overview

This skill manages Firebase/Firestore operations for both regular web/mobile applications and AI agent-to-agent (A2A) frameworks. It handles:

  • Basic Operations: CRUD, queries, batch processing for standard applications
  • A2A Framework: Agent-to-agent communication patterns using Firestore as state store
  • MCP Integration: Model Context Protocol server communication via Firestore
  • Cloud Run Services: Integration patterns for Cloud Run services accessing Firestore
  • Security: Proper authentication, validation, and security rules for both humans and agents

Core Capabilities

For Everyone (Basic Firestore)

  • Create, read, update, delete documents
  • Complex queries with filters and ordering
  • Batch operations for efficiency
  • Collection management and organization
  • Security rules generation and validation
  • Data migrations and transformations

For AI Power Users (A2A/MCP)

  • Agent session management with Firestore state
  • Agent-to-agent messaging and task coordination
  • MCP server communication patterns
  • Agent memory and context storage
  • Cloud Run service integration
  • Multi-agent workflow orchestration

When to Use This Skill

This skill activates when users mention:

  • Basic operations: "create a firestore document", "query users collection", "batch update documents"
  • A2A patterns: "setup agent communication", "A2A task queue", "agent-to-agent messaging"
  • MCP integration: "MCP server firestore", "agent memory storage", "session management"
  • Cloud Run: "Cloud Run firestore integration", "service account access"
  • Security: "firestore security rules", "agent authentication", "service account permissions"

Workflow

Phase 1: Setup and Initialization

For basic users:

  1. Check if Firebase Admin SDK is installed
  2. Guide through credential setup (service account JSON)
  3. Initialize Firestore connection
  4. Run connection test
  5. Create basic usage examples

For A2A/MCP users:

  1. Perform basic setup (above)
  2. Install additional dependencies (@google-cloud/firestore)
  3. Create A2A collection structure (sessions, memory, tasks, messages, logs)
  4. Configure service account whitelisting
  5. Setup security rules for agent access
  6. Create MCP service wrapper classes

Example setup:

# Basic setup
npm install firebase-admin

# A2A/MCP setup
npm install firebase-admin @google-cloud/firestore dotenv

# Set credentials
export GOOGLE_APPLICATION_CREDENTIALS="./serviceAccountKey.json"

# Run setup command
/firestore-setup

Phase 2: Basic CRUD Operations

For standard database operations:

Create documents:

const { db, admin } = require('./src/firebase');

// Single document
await db.collection('users').add({
  name: 'John Doe',
  email: '[email protected]',
  createdAt: admin.firestore.FieldValue.serverTimestamp()
});

// With custom ID
await db.collection('users').doc('user123').set({
  name: 'Jane Doe',
  email: '[email protected]'
});

Read documents:

// Single document
const doc = await db.collection('users').doc('user123').get();
const userData = doc.data();

// Query
const snapshot = await db.collection('users')
  .where('status', '==', 'active')
  .orderBy('createdAt', 'desc')
  .limit(10)
  .get();

snapshot.forEach(doc => console.log(doc.data()));

Update documents:

// Partial update
await db.collection('users').doc('user123').update({
  status: 'active',
  updatedAt: admin.firestore.FieldValue.serverTimestamp()
});

// Increment counter
await db.collection('stats').doc('views').update({
  count: admin.firestore.FieldValue.increment(1)
});

Delete documents:

// Single delete
await db.collection('users').doc('user123').delete();

// Batch delete
const batch = db.batch();
const docs = await db.collection('temp').limit(500).get();
docs.forEach(doc => batch.delete(doc.ref));
await batch.commit();

Phase 3: A2A Framework Operations

For agent-to-agent communication patterns:

1. Create Agent Session:

const { MCPService } = require('./src/mcp-service');
const mcp = new MCPService('[email protected]');

// Create session for agent workflow
const sessionId = await mcp.createSession({
  task: 'process_user_data',
  priority: 'high',
  metadata: { userId: 'user123' }
});

console.log(`Session created: ${sessionId}`);

2. Store Agent Context:

// Store agent memory/context in Firestore
await mcp.storeContext(sessionId, {
  conversation: [...messages],
  userPreferences: { theme: 'dark' },
  currentStep: 'data_validation'
});

// Retrieve context later
const context = await db
  .collection('agent_memory')
  .doc('[email protected]')
  .collection('contexts')
  .doc(sessionId)
  .get();

3. Agent-to-Agent Messaging:

// Send message from one agent to another
await mcp.sendMessage(
  'agent-engine@
Полный SKILL.md на GitHub

Установить firestore-operations-manager в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/setup-firestore.sh

FAQ

Что делает скилл firestore-operations-manager?

Manages Firebase/Firestore operations including CRUD, queries, batch processing, A2A agent communication, MCP server integration, and Cloud Run service coordination. Activates when you request "firestore operations", "create firestore document", "...

Как установить скилл firestore-operations-manager?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл firestore-operations-manager запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить firestore-operations-manager с