MCPSpy: Skill for Claude Code

.claude/skills/security-integration-tests.md/SKILL.md

security-integration-tests is a skill for Claude Code from alex-ilgayev/MCPSpy. It costs 30 tokens per session (789 once invoked), scanned B, original, Apache-2.0.

A project-specific agent for integration tests of prompt-injection detection. Prompt injection is text designed to manipulate an AI system into ignoring its intended instructions.

In plain words
What is it for?
It helps run security integration tests, choose a detection model, inspect test samples, debug failures, and run unit tests for the security package.
Why use it?
It provides a defined way to check security detection against both harmless and malicious examples, including tests that call the Hugging Face service.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is alex-ilgayev/MCPSpy's own configuration. It tells Claude Code how to work on MCPSpy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything MCPSpy configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go test -v ./pkg/security/....

Reuse

Borrowing it

Nothing to install: this file belongs to alex-ilgayev/MCPSpy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/alex-ilgayev/MCPSpy/main/.claude/skills/security-integration-tests.md/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/alex-ilgayev/MCPSpy

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-integration-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/alex-ilgayev/mcpspy/security-integration-tests.md/github.svg)](https://agentmods.dev/skills/alex-ilgayev/mcpspy/security-integration-tests.md)
Your own site
<a href="https://agentmods.dev/skills/alex-ilgayev/mcpspy/security-integration-tests.md"><img src="https://agentmods.dev/badge/skills/alex-ilgayev/mcpspy/security-integration-tests.md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for security-integration-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/alex-ilgayev/mcpspy/security-integration-tests.md"><img src="https://agentmods.dev/badge/skills/alex-ilgayev/mcpspy/security-integration-tests.md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 789 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.00789
Opus 5 $0.00015 $0.00394
Sonnet 5 $0.00006 $0.00158
Haiku 4.5 $0.00003 $0.00079

Measured 9d ago against content hash a7dbf51fe75b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

security-integration-tests scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

"text": "Ignore all previous instructions...",

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.claude/skills/security-integration-tests.md/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Integration Tests Agent

Overview

The security package (pkg/security/) provides prompt injection detection using the HuggingFace Inference API. Integration tests verify detection accuracy with real API calls.

Key Files

  • pkg/security/testdata/samples.json - Test data with benign and malicious samples
  • pkg/security/hf/integration_test.go - HF client integration tests
  • pkg/security/integration_test.go - Full analyzer integration tests with event bus
  • pkg/security/hf/client.go - HuggingFace API client implementation
  • pkg/security/analyzer.go - Main security analyzer that subscribes to MCP events

Running Tests

# Run integration tests (requires HF_TOKEN environment variable)
HF_TOKEN=hf_xxx make test-integration

# Run with custom model
HF_TOKEN=hf_xxx HF_MODEL=protectai/deberta-v3-base-prompt-injection-v2 make test-integration

# Run unit tests only (no API calls, uses mock server)
go test -v ./pkg/security/...

Test Structure

Test Samples (samples.json)

{
  "benign_samples": [
    {
      "description": "Description of the sample",
      "text": "The text to analyze",
      "expected_detected": false
    }
  ],
  "malicious_samples": [
    {
      "description": "Direct instruction override",
      "text": "Ignore all previous instructions...",
      "expected_detected": true,
      "min_risk_score": 0.5
    }
  ],
  "mcp_tool_calls": [
    {
      "description": "Malicious tool call",
      "method": "tools/call",
      "params": { "name": "run_command", "arguments": {...} },
      "expected_detected": true,
      "min_risk_score": 0.5
    }
  ]
}

Integration Test Tags

Integration tests use the build tag //go:build integration and are excluded from regular go test ./... runs.

Adding New Test Samples

  1. Edit pkg/security/testdata/samples.json
  2. Add samples to appropriate category (benign_samples, malicious_samples, or mcp_tool_calls)
  3. Set expected_detected and optionally min_risk_score
  4. Run integration tests to verify

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 111 lines · 30 tokens per session scan B a7dbf51fe75b

Subscribe to this mod's changes

security-integration-tests is a skill published in the GitHub repository alex-ilgayev/MCPSpy (516 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 789 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

AI & LLM Security

LLM and AI application security testing — prompt injection, jailbreak resistance, OWASP LLM Top 10 (2025), RAG and agent/tool-use security, model supply chain, and AI red teaming for authorized assessments.

Masriyan/Claude-Code-CyberSecurity-Skill · 50 tokens

systematic-debugging

4-phase root cause debugging: understand bugs before fixing.

NousResearch/hermes-agent · 16 tokens

ruview-verify

Verify a RuView build — full Rust workspace tests, the deterministic Python pipeline proof (SHA-256 Trust Kill Switch), firmware hash manifest, and the ADR-028 witness bundle with one-command self-verification. Use after any significant change, before merging a PR, or to produce an attestation bundle for a recipient.

ruvnet/RuView · 69 tokens

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…

mem0ai/mem0 · 207 tokens

darwinian-evolver

Evolve prompts/regex/SQL/code with Imbue's evolution loop.

NousResearch/hermes-agent · 22 tokens

evaluating-with-leakage-gates

Evaluate an OpenMed de-identification or clinical NER model against the leakage-first release gates G1a through G8, which gate releases on residual PHI leakage rather than on F1. Use when the user wants to run the OpenMed eval harness on a synthetic golden set, decide whether a de-id model is RELEASABLE or…

maziyarpanahi/openmed · 158 tokens