Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

optimize-agentic-mcpoptimize agentic MCP 搜索

Agent Skill

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

总安装

259

周安装

11

GitHub Stars

5

下载量

91
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/yigitkonur/skills-by-yigitkonur --skill optimize-agentic-mcp

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于关键词搜索、任务场景匹配和来源线索筛选等研究检索场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围、维护状态及是否触发联网或文件操作。
  • optimize-agentic-mcp 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

MCP Server Skill — Optimize Existing or Architect New

This skill is the entry point for any MCP-server work that is bigger than one line of code. It helps you either tune up a server that already exists or shape a brand-new one before a single file is scaffolded. Both paths share the same reference library — one folder of decision trees, one folder of pattern files — so you only learn the routing once.

Two things to remember before anything else:

  1. Do not apply patterns mechanically. Explore the repo (or the user's intent) first, present findings with options, let the user choose.
  2. You are not expected to do it all alone. If a question needs fresh research or a big chunk of file work, dispatch a subagent — see "Dispatching Subagents" below.

Two Modes — Pick One Before You Do Anything

Mode A — Optimize an existing MCP server

Pick Mode A when the user already has an MCP server (their repo, a fixture, a package) and wants it improved, audited, hardened, or reviewed. The rhythm is Explore → Diagnose → Present → Optimize, and it never skips straight to code.

  1. Explore the codebase. Before you ask a single question, read the repo. Look for an MCP entry point, tool registrations, schemas, error handling, and transport config. Useful starting searches: tree. -I node_modules --dirsfirst -L 3 rg -n -l "McpServer|FastMCP|server\\.tool|@tool|@mcp\\.tool|registerTool|Server\\(". -g '!node_modules' rg -n "server\\.tool|@tool|registerTool|def.*tool|tool\\(". -g '!node_modules' rg -n -l "z\\.|inputSchema|BaseModel|Field\\(|pydantic|jsonschema". -g '!node_modules' rg -n "stdio|streamable|sse|transport". -g '!node_modules' If tree is missing, fall back to find. -maxdepth 3 -type d. If rg is missing, fall back to grep -R. If the repo contains multiple MCP servers, stop and ask which one is in scope — never blend findings across servers. Read the files in this order: manifest (package.json, pyproject.toml), entry point, tool registration, schemas, transport/auth config. Prerequisite check. If nothing MCP-shaped exists after searching repo root and the usual server directories (src/, server/, servers/, app/, apps/, packages/, services/, mcp/), stop and report the missing prerequisite. Do not invent a server just to keep going. If the user actually wants a new server, switch to Mode B.
  2. Diagnose with targeted questions. Ask 2–3 questions that reference specific files and line numbers you found. Generic questions waste the user's time. Example: *"In packages/customer-mcp/tools/search.ts:42, search_users takes 14 parameters including filters.dateRange.start — are all 14 used, or are most optional?"* If the user is unavailable for follow-up, switch to draft mode: surface the full prioritized finding set with explicit assumptions, but do not apply anything.
  3. Present findings one at a time. Tie every finding to real code evidence, stated context, or a clearly labeled assumption. Thresholds in the reference docs (tool count, parameter count, latency) are diagnostic cues, not verdicts. Format: ### Finding [N]: [Title] Dimension: [category] Severity: Critical / High / Medium / Low File(s): path/to/file.ts:line Current state: [their actual code snippet] Issue: [why it's suboptimal — reference the pattern] Options: - A (recommended): [description + tradeoff] - B: [description + tradeoff] - C (minimal change): [description + tradeoff] Should I apply this? (yes / no / show me option X first) Work by severity. Wait for the user's decision before moving to the next finding.
  4. Apply only after explicit approval. Show the diff, explain the change, make the edit, and suggest a verification step — usually MCP Inspector or a test-by-mcpc-cli command against the modified tool.

Mode B — Architect a new MCP from scratch

Pick Mode B when the user says "I want to build an MCP server" and no server exists yet (or the repo has one but the user wants a fresh one alongside). Do not start writing code. Instead:

  1. Run the brainstorm interview. Open references/decision-trees/brainstorming-new-mcp.md and walk the user through its 12 questions: end-user task, local-vs-remote, auth, statefulness, target clients, expected tool count, destructive operations, distribution plan, advanced protocol needs (sampling, elicitation, roots), and a success metric. The file contains the full Q&A flow and a companion-skill picker.
  2. Produce an architecture sketch. The brainstorming file gives you a template — surface, transport, auth shape, storage, advanced features used, testing plan, chosen companion skill. Keep it short.
  3. Get approval before handoff. Present the sketch, ask the user to approve or adjust, then hand off to the right companion skill (see "Companion Skills" below).
  4. Smell-test with the design-phase tree. Cross-check the sketch against references/decision-trees/design-phase.md for cross-model schema portability and early architecture gotchas before handoff.

If the brainstorm exposes that MCP is the wrong primitive for the user's job (a CLI, a Claude skill, or a bash script would do), route to references/patterns/mcp-vs-cli.md and stop.

Dispatching Subagents

You are the orchestrator. Fire subagents when a task needs more capacity than a single turn, but give them self-contained briefs with outcome, constraints, and a binary DoD.

  • internet-researcher — any question about current spec (auth-identity.md references the 2025-11-25 profile), vendor pricing, platform quirks, or CVEs. Launch one per independent sub-question; run them in parallel when the questions don't depend on each other.
  • general-purpose (Opus 4+) — multi-file edits, scaffolding a new MCP server per the architecture sketch, or applying a batch of approved optimizations after the user signs off.
  • Plan — when a finding has 3+ competing architectural options (e.g. gateway vs split servers vs progressive discovery) and you want a structured tradeoff comparison before presenting.

Rules for the brief: observable end-state, hard constraints only, no step-by-step procedure. Grant ownership ("You own this — explore freely"). Keep DoD items binary and verifiable. Do not dispatch for work you can do in a single read-plus-edit round.

Companion Skills

These skills actually build or test the server. This skill decides *what* to build and *why*; they decide *how*. Install command format (from the repo's root CLAUDE.md):

npx -y skills add -y -g yigitkonur/skills-by-yigitkonur/skills/<skill-name>
SkillWhen to pickTradeoff
build-mcp-use-serverNew HTTP-first TypeScript server, modern DX, want the mcp-use wrapper to handle transport, CORS, OAuth, sessionsLocks you into mcp-use/server imports and conventions; less bare-metal control
build-mcp-server-sdk-v1Canonical path: @modelcontextprotocol/sdk v1.x, single package, Zod v3, widest client compatibility, stdio or HTTPManual transport/OAuth wiring; deprecated overloads still compile so easy to pick wrong API
build-mcp-server-sdk-v2Only for new greenfield projects willing to accept beta. v2 split packages (@modelcontextprotocol/server), Zod v4, ESM-only, Node 20+Community adoption still early (Q1 2026 release); server-side OAuth removed; no CJS
test-by-mcpc-cliAlways useful once a server is running. Live CLI-based testing over stdio or Streamable HTTP, scripts, grep, task verificationRequires mcpc 0.2.x locally

If the user's environment does not have the companion skill installed yet, tell them to run:

npx -y skills add -y -g yigitkonur/skills-by-yigitkonur/skills/<skill-name>

substituting the skill name from the table above.

Decision Tree — What Aspect Needs Attention?

Use this tree to jump into the right reference file. It covers both modes.

What aspect of the MCP server is in scope?
│
├── Brand new server, no code yet
│   └── references/decision-trees/brainstorming-new-mcp.md       (interview + framework picker)
│
├── Architecture decision — should this even be an MCP server?
│   └── references/patterns/mcp-vs-cli.md                        (MCP vs CLI / skills / bash)
│
├── Tool interface quality
│   ├── Tools feel like REST wrappers ───────── references/patterns/tool-design.md
│   ├── Model picks wrong tool ─────────────── references/patterns/tool-descriptions.md
│   └── Response doesn't guide next action ─── references/patterns/tool-responses.md
│
├── Input / output reliability
│   ├── Schema parse failures ──────────────── references/patterns/schema-design.md
│   ├── Errors don't help model recover ────── references/patterns/error-handling.md
│   ├── Choosing response format ───────────── references/decision-trees/response-format.md
│   └── Choosing error strategy ────────────── references/decision-trees/error-strategy.md
│
├── Security and identity
│   ├── Generic prompt-injection / sandbox ─── references/patterns/security.md
│   ├── Named attacks, CVEs, defense tooling ─ references/patterns/threat-catalog.md
│   ├── 2025-11-25 OAuth 2.1 / CIMD / OBO ──── references/patterns/auth-identity.md
│   └── Full security audit flow ───────────── references/decision-trees/security-posture.md
│
├── Context, tokens, and cost
│   ├── Context window exhaustion ──────────── references/patterns/context-engineering.md
│   ├── Provider prompt-caching + cost math ── references/patterns/caching-economics.md
│   ├── 20+ tools, eager registration ──────── references/decision-trees/tool-count.md
│   └── Progressive / dynamic tool loading ─── references/patterns/progressive-discovery.md
│
├── Protocol depth
│   ├── Sampling, elicitation, roots,
│   │   progress, cancellation, _meta ──────── references/patterns/advanced-protocol.md
│   ├── Resources + prompts usage ──────────── references/patterns/resources-and-prompts.md
│   └── Tool response authority / gates ────── references/patterns/prompt-gates.md
│
├── Client + model compatibility
│   ├── Per-client quirks & silent drops ───── references/patterns/client-compatibility.md
│   └── Per-model tool-use benchmarks ──────── references/patterns/model-behavior.md
│
├── Architecture & scaling
│   ├── Workflow / agent ordering ──────────── references/patterns/agentic-patterns.md
│   ├── Multi-server / gateway composition ─── references/patterns/composition.md
│   ├── Growth and load distribution ───────── references/decision-trees/scaling.md
│   └── Early design-time decisions ────────── references/decision-trees/design-phase.md
│
├── Operations, testing, deployment
│   ├── Transport choice + ops ─────────────── references/patterns/transport-and-ops.md
│   ├── Platform-specific hosting patterns ─── references/patterns/deployment-platforms.md
│   ├── Session / state lifecycle ──────────── references/patterns/session-and-state.md
│   ├── Test coverage and eval-driven dev ──── references/patterns/testing.md
│   └── Pre-deploy operational readiness ───── references/decision-trees/production-readiness.md
│
└── Distribution and trust
    ├── Vendor MCP servers to learn from ───── references/patterns/exemplar-servers.md
    └── Registries, gateways, trust signals ── references/patterns/registry-and-distribution.md

Quick Reference Card

Common entry points across both modes.

You want to...Start here
Architect a brand-new MCPreferences/decision-trees/brainstorming-new-mcp.md
Decide MCP vs CLI vs skillreferences/patterns/mcp-vs-cli.md
Evaluate tool interface qualityreferences/patterns/tool-design.mdreferences/patterns/tool-descriptions.md
Fix schema parse failuresreferences/patterns/schema-design.mdreferences/decision-trees/design-phase.md
Improve error recoveryreferences/decision-trees/error-strategy.mdreferences/patterns/error-handling.md
Harden security posturereferences/decision-trees/security-posture.mdreferences/patterns/security.md
Apply 2025-11-25 OAuth profilereferences/patterns/auth-identity.md
Look up a named MCP attack or CVEreferences/patterns/threat-catalog.md
Reduce context / token usagereferences/patterns/context-engineering.md
Cut per-turn cost with prompt cachingreferences/patterns/caching-economics.md
Manage 20+ toolsreferences/decision-trees/tool-count.mdreferences/patterns/progressive-discovery.md
Add sampling, elicitation, or rootsreferences/patterns/advanced-protocol.md
Pick deployment platformreferences/patterns/deployment-platforms.md
Design for a specific client's quirksreferences/patterns/client-compatibility.md
Pick a default target modelreferences/patterns/model-behavior.md
Compare against vendor MCPsreferences/patterns/exemplar-servers.md
Publish to the registryreferences/patterns/registry-and-distribution.md
Validate with live testsreferences/patterns/testing.md → companion skill test-by-mcpc-cli
Check production readinessreferences/decision-trees/production-readiness.mdreferences/patterns/transport-and-ops.md

Common Pitfalls

#PitfallFix
1Wrapping every REST endpoint as a toolDesign around user intent — references/patterns/tool-design.md
2Deeply nested JSON schemasFlatten to ≤1 level, ≤6 params — references/patterns/schema-design.md
3Returning raw API JSONCurate and summarize — references/patterns/tool-responses.md
4Throwing protocol errors for tool failuresUse isError in result content — references/patterns/error-handling.md
5No input validationValidate server-side — references/patterns/security.md
6Registering 30+ tools at onceProgressive discovery — references/patterns/progressive-discovery.md
7Vague tool descriptionsTreat descriptions as prompt engineering — references/patterns/tool-descriptions.md
8No tests before productionAdd tool + integration tests — references/patterns/testing.md
9Using SSE for new remote deploymentsStreamable HTTP only — references/patterns/transport-and-ops.md
10Ignoring session cleanupLifecycle management — references/patterns/session-and-state.md
11Invalidating prompt cache on every turnKeep the prefix byte-identical — references/patterns/caching-economics.md
12Assuming every client supports sampling/elicitationCapability-gate first, fall back in tool response — references/patterns/advanced-protocol.md
13Forwarding user tokens to upstream APIsOBO with audience check — references/patterns/auth-identity.md
14Publishing to v0 of the official registryv0 is unstable; check trust tier — references/patterns/registry-and-distribution.md
15Picking a platform before counting cold starts or session needsMatch shape to constraints — references/patterns/deployment-platforms.md

Reference Routing Table

Pattern files (references/patterns/)

FileRead when...
tool-design.mdEvaluating tool granularity, intent-based design, naming
tool-descriptions.mdDiagnosing tool selection, improving description quality
tool-responses.mdOptimizing return shape, picking output format, reducing tokens
schema-design.mdFixing parse failures, flattening schemas, trimming required params
error-handling.mdImproving recovery, retry loops, circuit breakers
security.mdGeneric defenses: injection vectors, sandboxing, auth basics
threat-catalog.mdNamed MCP attacks (TPA, line jumping, FSP, ATPA, shadowing), dated CVEs, defense tooling, audit checklist
auth-identity.md2025-11-25 OAuth 2.1 profile, RFC 9728 PRM, CIMD, OBO, step-up consent
context-engineering.mdToken-budget diagnosis, context window optimization, tiered verbosity
caching-economics.mdProvider-side prompt caching (Anthropic, OpenAI, Gemini, Vertex, Bedrock), write premiums, TTL, cost math
progressive-discovery.mdManaging 20+ tools, dynamic tool loading
agentic-patterns.mdAgent loops, multi-step workflows, ordering constraints
composition.mdMulti-server setups, gateway federation, meta-server patterns
prompt-gates.mdTool response authority, approval workflows, guardrails
resources-and-prompts.mdResource and prompt primitive usage, data-exposure strategy
session-and-state.mdSession lifecycle, state leaks, cleanup, application-level caching
testing.mdEval-driven development, regression testing, CI integration
transport-and-ops.mdTransport choice, deployment config, monitoring, connection management
deployment-platforms.mdCloudflare Workers, Vercel, Lambda, Cloud Run, ACA, Modal, Fly, Smithery specifics
mcp-vs-cli.mdDeciding whether MCP is the right primitive vs CLI, bash, skills, or hybrid
client-compatibility.mdPer-client truth table — silent drops, partial support, workarounds
model-behavior.mdPer-model tool-use benchmarks (BFCL, MCP-Atlas, MCPMark), idioms, pricing
advanced-protocol.mdSampling, elicitation, roots, completions, progress, cancellation, _meta
exemplar-servers.mdComparing design against 16 production vendors (GitHub, Linear, Stripe, Notion, Sentry, Figma, Atlassian Rovo, Cloudflare, PayPal, Shopify, Asana V2, Supabase, HubSpot, Vercel, Intercom, Zapier)
registry-and-distribution.mdOfficial Registry, Smithery, Docker MCP Catalog, gateways, trust signals, namespaces

Decision-tree files (references/decision-trees/)

FileRead when...
brainstorming-new-mcp.mdMode B — user wants to architect a new MCP; interview + companion-skill picker + sketch template
design-phase.mdEarly architecture decisions, cross-model schema portability
tool-count.mdHow many tools to expose; organizing a large surface
response-format.mdText vs structured content vs mixed
error-strategy.mdFail-fast vs retry vs fallback
security-posture.mdThreat model selection, full security audit flow
scaling.mdGrowth, multi-server setups, load distribution
production-readiness.mdPre-deploy checklist, operational readiness

Guardrails

Non-negotiables that apply to both modes.

  • Explore before asking. Run the searches, read the files, and only then ask questions that cite specific paths and lines.
  • Ask before optimizing. Never apply a pattern without presenting it as a finding with options and getting explicit approval.
  • One finding at a time in interactive mode. Work by severity. Wait for the user's decision before moving on.
  • Draft mode is for follow-up gaps only. Label every assumption; do not apply code changes in draft mode.
  • Show real code. Every finding quotes the user's actual code with file paths and line numbers. No hypothetical examples.
  • Scope one server at a time. Inventory multiple servers first; ask which is in scope unless the user asked for a repo-wide audit.
  • Thresholds are heuristics, not verdicts. Tool count, parameter count, latency, and token budgets are ground truth-able; don't weaponize them as rules.
  • Verify after applying. Every optimization gets a verification step — MCP Inspector, test-by-mcpc-cli command, or a targeted manual check.
  • Do not wrap REST endpoints one-to-one. Map tools to user intent.
  • Do not deeply nest schemas. Flatten past one level. LLMs reliably generate flat structures.
  • Do not return raw upstream JSON. Always curate, summarize, and format for LLM consumption.
  • Do not use protocol errors for business failures. Reserve protocol errors for transport and framework issues.
  • Do not eagerly register 20+ tools. Use progressive discovery.
  • Do not skip input validation. Never trust LLM-generated input.
  • Do not use SSE for new remote deployments. Streamable HTTP only.
  • Do not undervalue descriptions. They are the model's primary tool-selection signal — treat them as prompt engineering.
  • Do not return sensitive data in tool responses. Anything returned enters the LLM context.
  • Do not deploy without tests. At minimum: valid input, invalid input, upstream failure.
  • Do not forward user tokens to upstream APIs. Use OBO (on-behalf-of) with audience checks — see references/patterns/auth-identity.md.
  • Do not silently drop advanced-protocol features. Capability-gate sampling, elicitation, and roots; fall back gracefully — see references/patterns/advanced-protocol.md.
  • Do not publish to v0 of the official registry. Wait for a stable API revision — see references/patterns/registry-and-distribution.md.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.29%
按下载量换算33

Claude

29.34%
按下载量换算27

Cursor

18.15%
按下载量换算17

Gemini CLI

9.52%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills