소스 정보
- 저장소
- Dev-Toolbelt/dev-team-agents
- 최근 소스 활동
- 2026년 5월 11일 16:18
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill mongodb명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | mongodb |
| description | MongoDB — schema design, indexes, aggregation, sharding, Atlas. |
Load when the project uses MongoDB (signal: mongoose, mongodb, mongo: in docker-compose, MONGODB_URI).
mongosh "$MONGO_URI"
# or with individual vars:
mongosh "mongodb://$DB_USER:$DB_PASSWORD@$DB_HOST:${DB_PORT:-27017}/$DB_NAME"
# Atlas:
mongosh "mongodb+srv://$DB_USER:$DB_PASSWORD@$ATLAS_CLUSTER/$DB_NAME"
Key inspection commands:
db.stats() // database size and counts
db.collection.stats() // collection storage details
db.collection.explain("executionStats").find({...}) // query plan
db.currentOp({ active: true }) // running operations
db.collection.getIndexes() // list all indexes
| Decision | Embed | Reference |
|---|---|---|
| Data is always accessed together | yes | — |
| Data grows unboundedly (comments on a post) | — | yes |
| Data is shared across many documents | — | yes |
| Max document size | — | 16 MB limit; embed only bounded sub-arrays |
Rule of thumb: embed for one-to-few; reference for one-to-many or many-to-many.
| Type | Use when |
|---|---|
| Single-field | Filter or sort on one field |
| Compound | Multi-field queries; field order matches query selectivity |
| Multikey | Index array values; MongoDB creates one entry per array element |
| Text | Full-text search ($text); use Atlas Search for production |
| 2dsphere | Geospatial queries ($near, $geoWithin) |
| Partial | partialFilterExpression to index a subset of documents |
| Sparse | Skip documents where the field is absent |
| TTL | Auto-delete documents after a duration: expireAfterSeconds |
Always run explain("executionStats") to verify IXSCAN (not COLLSCAN).
Prefer aggregation over MapReduce (deprecated in 5.0+):
$match → $group → $sort → $limit (always filter early, sort late)$lookup for joins (use only for occasional aggregations; not for hot paths)$unwind before $group when working with arraysallowDiskUse: true for large aggregations that exceed 100 MB memory limit| Concern | Guarantee |
|---|---|
w: 1 (default) | Acknowledged by primary |
w: "majority" | Acknowledged by majority of replica set members |
j: true | Written to journal before acknowledgement |
For financial or critical data: use w: "majority", j: true.
Read preferences: primary (default, strong consistency), primaryPreferred, secondary (eventual consistency, lower load on primary).
Available since MongoDB 4.0 (replica sets) and 4.2 (sharded clusters):
| Feature | Use when |
|---|---|
| Atlas Search | Full-text, fuzzy, autocomplete (Lucene-backed) |
| Atlas Triggers | React to DB events without polling |
| Atlas Data API | HTTP access without MongoDB driver |
| Online Archive | Auto-tier cold data to S3 |
| Gotcha | Fix |
|---|---|
findOne returns null not an exception | Always check for null before accessing fields |
_id is an ObjectId, not a string | Serialize with .toString(); never compare == to a string |
| Unbounded array growth | Use $push with $slice or move to a separate collection |
| Schema-less does not mean schema-free | Use Mongoose validators or JSON Schema validation |
Large $in arrays cause slow index scans | Cap $in lists; consider $lookup + $match |
SOC 직업 분류 기준