Multi-agent and MCP pipeline security with 5-layer defense architecture. Use when building MCP servers, multi-agent systems, or any pipeline that handles user input to prevent prompt injection and ensure proper authorization.
Enforces 5-layer security for MCP servers and multi-agent pipelines. Triggers when building systems that handle user input, providing validation, injection prevention, and authorization patterns to secure prompts, queries, and data access.
/plugin marketplace add jpoutrin/product-forge/plugin install security-compliance@product-forge-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill enforces security best practices for MCP servers and multi-agent pipelines.
# Always validate and sanitize inputs
def sanitize_input(user_input: str) -> str:
# Remove potential injection patterns
# Escape special characters
# Limit length
pass
# Never directly concatenate user input into prompts
# ❌ Bad
prompt = f"Process this: {user_input}"
# ✅ Good
prompt = sanitize_input(user_input)
validated_prompt = validate_against_schema(prompt)
@dataclass
class UserContext:
user_id: str
roles: list[str]
permissions: list[str]
tenant_id: str
# Pass context through all pipeline stages
async def process_request(context: UserContext, request: Request):
# Validate permissions at each step
if not has_permission(context, "read:data"):
raise AuthorizationError()
ROLE_PERMISSIONS = {
"admin": ["read", "write", "delete", "admin"],
"editor": ["read", "write"],
"viewer": ["read"],
}
def can_access(user: User, resource: Resource) -> bool:
return (
user.department == resource.department
and user.clearance >= resource.sensitivity
)
Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.