Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计异常

agent-mongo蒙戈特工

Agent Skill

agent-mongo 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

727

周安装

30

GitHub Stars

4

下载量

238
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-mongo(蒙戈特工)
来源仓库:https://github.com/shhac/agent-mongo
仓库路径:skills/agent-mongo
安装命令:
npx skills add https://github.com/shhac/agent-mongo --skill agent-mongo
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/shhac/agent-mongo --skill agent-mongo

简介

agent-mongo 是一个只读 CLI 工具,用于 MongoDB 数据库的探索和查询操作。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中需要连接、测试和查询 MongoDB 实例的场景。
  • 通过 GitHub 安装,支持连接管理和凭据安全存储,输出为 JSON 格式。
  • 安装前需确认权限范围、维护状态,以及是否会触发网络请求或数据库读取操作。
  • 建议在使用时核对连接字符串和凭据安全性,避免敏感信息泄露或未授权访问。

SKILL.md

MongoDB exploration with agent-mongo

agent-mongo is a read-only CLI binary on $PATH. All output is JSON to stdout. Errors go to stderr as {"error": "..."} with non-zero exit.

Quick start (connections)

Set up a connection:

agent-mongo connection add local "mongodb://localhost:27017/myapp" --default
agent-mongo connection test

For authenticated connections, store credentials separately:

agent-mongo credential add acme --username deploy --password secret
agent-mongo connection add prod "mongodb+srv://cluster.example.net/myapp" --credential acme --default

Exploring a database

agent-mongo database list                                # all databases with sizes
agent-mongo collection list myapp                        # all collections in myapp
agent-mongo collection schema myapp users                # infer schema from samples
agent-mongo collection schema myapp users --depth 2      # limit nesting depth
agent-mongo collection schema myapp events --limit 50    # paginate large schemas
agent-mongo collection schema myapp events --limit 50 --skip 50  # next page
agent-mongo collection indexes myapp users               # index key patterns
agent-mongo collection stats myapp orders                # document count, sizes
agent-mongo database stats myapp                         # database-level statistics

Querying documents

agent-mongo query find myapp users --filter '{"age":{"$gte":21}}' --limit 10
agent-mongo query find myapp orders --sort '{"createdAt":-1}' --projection '{"status":1,"total":1}'
agent-mongo query get myapp users 665a1b2c3d4e5f6a7b8c9d0e      # by _id (auto-detects ObjectId)
agent-mongo query get myapp users 665a1b2c3d4e5f6a7b8c9d0e --projection '{"name":1,"email":1}'
agent-mongo query count myapp orders --filter '{"status":"pending"}'
agent-mongo query sample myapp users --size 10                    # random documents
agent-mongo query sample myapp users --size 10 --filter '{"status":"active"}'  # filtered sample
agent-mongo query distinct myapp orders status                    # unique values

All JSON arguments (--filter, --sort, --projection, --pipeline) accept MongoDB Extended JSON for BSON types:

agent-mongo query find myapp events --filter '{"createdAt":{"$gt":{"$date":"2026-01-01T00:00:00Z"}}}'
agent-mongo query find myapp users --filter '{"_id":{"$oid":"665a1b2c3d4e5f6a7b8c9d0e"}}'

For large result sets, use --stream for NDJSON output (one JSON object per line), which bypasses query.maxDocuments:

agent-mongo query find myapp events --filter '{"type":"click"}' --stream
agent-mongo query aggregate myapp orders '[{"$group":{"_id":"$status","count":{"$sum":1}}}]' --stream

Aggregation

agent-mongo query aggregate myapp orders '[{"$group":{"_id":"$status","count":{"$sum":1}}}]'
agent-mongo query aggregate myapp orders --pipeline '[{"$group":{"_id":"$status","count":{"$sum":1}}}]'
agent-mongo query aggregate myapp events '[{"$match":{"type":"purchase"}},{"$group":{"_id":"$userId","total":{"$sum":"$amount"}}}]'

Pipeline can be passed as a positional argument, via --pipeline flag, or piped via stdin.

Write stages ($out, $merge) are rejected — the CLI is strictly read-only.

Connection management

agent-mongo connection list                              # saved connections + defaults
agent-mongo connection add staging "mongodb://..." --credential acme
agent-mongo connection update prod --credential new-cred
agent-mongo connection set-default staging
agent-mongo connection remove old-conn
agent-mongo connection test prod                         # verify connectivity (positional alias)
agent-mongo connection test -c prod                      # also works with -c flag

Connection resolution: -c flag > AGENT_MONGO_CONNECTION env > config default > error listing available connections.

Credential management

agent-mongo credential add acme --username deploy --password secret
agent-mongo credential list                              # passwords always redacted
agent-mongo credential remove acme --force               # even if connections reference it

Credentials are stored separately from connections. When you rotate a password, just re-add the credential — all connections referencing it pick up the new auth automatically.

Truncation

Any string field exceeding truncation.maxLength (default 200) gets truncated with and a companion {field}Length key showing original length.

agent-mongo --full query find myapp posts                # expand all fields
agent-mongo --expand description query find myapp posts  # expand specific field

These are global flags — place them before or after the command.

Timeout

Default timeout is 30s (configurable via query.timeout). Applies to both connection and query phases. Override per-command:

agent-mongo --timeout 60000 query find myapp large_collection --filter '{"status":"active"}'
agent-mongo --timeout 120000 collection schema myapp events

Configuration

agent-mongo config list-keys                             # all keys with defaults/ranges
agent-mongo config set defaults.limit 50
agent-mongo config get query.timeout
agent-mongo config reset                                 # restore defaults

Key settings: defaults.limit (20), defaults.sampleSize (5), defaults.schemaSampleSize (100), query.timeout (30000ms), query.maxDocuments (100), truncation.maxLength (200).

Safety

  • Read-only: No write operations exist
  • Aggregation: $out and $merge stages rejected
  • Result cap: query.maxDocuments (default 100) — use --stream to bypass
  • Timeout: applies to both connections and queries (default 30s), override per-command with --timeout <ms>

Per-command usage docs

Every command group has a usage subcommand with detailed, LLM-optimized docs:

agent-mongo usage                  # top-level overview
agent-mongo connection usage       # connection + credential commands
agent-mongo credential usage       # credential management
agent-mongo database usage          # database commands
agent-mongo collection usage       # collection commands
agent-mongo query usage            # all query commands
agent-mongo config usage           # settings keys, defaults, validation

Use agent-mongo <command> usage when you need deep detail on a specific domain before acting.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.4%
按下载量换算82

Claude

32.87%
按下载量换算78

Cursor

17.35%
按下载量换算41

Gemini CLI

8.63%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills