スキル一覧に戻る
rakibdev

mongodb

by rakibdev

System Backup & Personal Notes.

1🍴 0📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: mongodb description: Use for managing MongoDB.

Usage

bun {dir}/scripts/query.ts "<query>"

Examples

# Simple read
bun {dir}/scripts/query.ts "db.collection('users').findOne()"

# Query with ObjectId
bun {dir}/scripts/query.ts "db.collection('users').findOne({ _id: new ObjectId('...') })"

# Multi-step update (Batching)
bun {dir}/scripts/query.ts "Promise.all([
  db.collection('rewards').deleteMany({ userId: new ObjectId('...') }),
  db.collection('users').updateOne({ _id: new ObjectId('...') }, { \$set: { 'dailyXp.count': 0 } })
])"

Tips

  • Use query.ts over writing one-off scripts. Use Promise.all for parallel operations or an IIFE (async () => { ... })() for complex multi-step logic.
  • ObjectId is globally available in the query context.
  • Use limit(1) or findOne() to understand schema without wasting tokens.
  • Use countDocuments() instead of fetching docs for existence checks.

スコア

総合スコア

45/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新

+5
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です