AGENT SKILL
document-databases
Document-oriented databases
使用场景文档处理
- License 许可
- MIT
- 最近更新
- 2026-03-01
- Stars
- ★ 3
- Forks
- 2
01 前言 Front Matter
- name
- document-databases
- license
- MIT
- metadata
- { "audience": "developers", "category": "databases" }
- description
- Document-oriented databases
- compatibility
- opencode
02 资源文件 5
- 参考文档automation_proposal.md423 B
- 其他codex_triage.toml456 B
- 参考文档mapping_note.md2.3 KB
- 参考文档README.md49 B
- 参考文档workflow_map.json4.8 KB
03 SKILL.md 正文
What I do
- Design document schemas
- Implement MongoDB-style operations
- Optimize document queries
When to use me
When working with document databases like MongoDB, CouchDB.
Document Operations
class DocumentStore:
"""Document database operations"""
def __init__(self, connection):
self.db = connection
def insert_document(self, collection: str, document: dict):
"""Insert a document"""
return self.db[collection].insert_one(document)
def find_documents(self, collection: str,
query: dict = None,
projection: dict = None):
"""Query documents"""
return self.db[collection].find(query or {}, projection)
def update_document(self, collection: str,
query: dict, update: dict):
"""Update documents"""
return self.db[collection].update_many(query, update)
def aggregate(self, collection: str, pipeline: list):
"""Run aggregation pipeline"""
return self.db[collection].aggregate(pipeline)
Aggregation Pipeline
class AggregationExamples:
"""Aggregation pipeline examples"""
@staticmethod
def match_group_project():
return [
{"$match": {"status": "active"}},
{"$group": {"_id": "$category",
"count": {"$sum": 1}}},
{"$project": {"category": "$_id", "count": 1,
"_id": 0}}
]
04 同仓库更多 Skills
xamarin
Xamarin cross-platform development
★ 3
wrangling
Data wrangling fundamentals
★ 3
windows
Windows operating system administration and scripting
★ 3
wide-column
Wide-column data model
★ 3
wide-column-stores
Wide-column database stores
★ 3
websockets
WebSocket implementation and best practices
★ 3