/prodsec-skills:sampling-controlsfrom prodsec-skills
Guides MCP server developers in controlling and restricting sampling requests to client LLMs, covering security risks, constraints, and implementation checklists.
Ships in prodsec-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
MCP servers SHOULD avoid using sampling. Sampling is the mechanism where the server asks the client's LLM to perform a task. This creates a bidirectional trust relationship that introduces security risks.
If the MCP server must use sampling (asking the client's LLM to perform a task), apply these constraints:
| Constraint | Details |
|---|---|
| Use sparingly | Only use sampling when absolutely necessary; prefer direct computation |
| Be predictable | Sampling requests should be deterministic and expected by the user |
| Expect rejection | Be prepared for the user to reject the sampling request; return a clear error or fall back to a non-sampling code path |
| Limit scope | Keep sampling requests narrow and specific |
| No sensitive data | Never include sensitive data in sampling requests sent to the client's LLM |
| Risk | Description |
|---|---|
| Prompt injection amplification | Sampling can be exploited to inject prompts into the client's LLM |
| Data leakage | Sampling requests may inadvertently expose server-side data to the client's LLM |
| Trust boundary violation | The server is effectively executing code (LLM reasoning) on the client side |
| Unpredictable behavior | LLM responses to sampling requests are non-deterministic |
| User confusion | Users may not understand why the server is making LLM requests |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub redhatproductsecurity/prodsec-skills --plugin prodsec-skills130 skills in this plugin
/address-sanitizerAddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.
/admin-interface-securitySecure the administrative interface of model registries. Use when building, deploying, or reviewing model registry access controls and admin interfaces./aflppAFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C/C++ projects.
Other plugins' skills for the same job