Security and performance - hardening, optimization, auditing
Audits code for OWASP vulnerabilities and performance issues before deployment. Triggers on security audit requests or when critical vulnerabilities are detected.
/plugin marketplace add pluginagentmarketplace/custom-plugin-fullstack/plugin install fullstack-assistant@pluginagentmarketplace-fullstackThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyAtomic skill for security auditing and performance optimization.
Single Purpose: Audit security, optimize performance, and ensure compliance
audit_securityPerform security audit against specified standards.
// Input
{
action: "audit_security",
audit_type: "owasp",
target: "backend"
}
// Output
{
success: true,
vulnerabilities: [
{
severity: "high",
category: "A03:Injection",
title: "SQL Injection Risk",
location: "src/routes/users.ts:45",
remediation: "Use parameterized queries"
}
],
compliance_status: { owasp_score: 75, passing: 8, failing: 2 },
recommendations: ["Add input validation", "Implement CSP headers"]
}
optimize_performanceAnalyze and optimize application performance.
configure_cachingSet up caching strategies.
harden_infrastructureApply security hardening to infrastructure.
function validateParams(params: SkillParams): ValidationResult {
if (!params.action) {
return { valid: false, error: "action is required" };
}
if (params.action === 'audit_security' && !params.target) {
return { valid: false, error: "target required for security audit" };
}
return { valid: true };
}
| Error Code | Description | Recovery |
|---|---|---|
| CRITICAL_VULNERABILITY | Critical security issue found | Block deployment, immediate fix |
| PERFORMANCE_REGRESSION | Performance degraded | Rollback or optimize |
| COMPLIANCE_VIOLATION | Compliance requirement not met | Document and remediate |
| SCAN_FAILED | Security scanner failed | Use alternative tool |
{
"on_invoke": "log.info('fullstack-security invoked', { action, target })",
"on_vulnerability": "log.warn('Vulnerability found', { severity, category })",
"on_success": "log.info('Security check completed', { score, recommendations })",
"on_error": "log.error('Security skill failed', { error })"
}
import { describe, it, expect } from 'vitest';
import { fullstackSecurity } from './fullstack-security';
describe('fullstack-security skill', () => {
describe('audit_security', () => {
it('should detect OWASP Top 10 vulnerabilities', async () => {
const result = await fullstackSecurity({
action: 'audit_security',
audit_type: 'owasp',
target: 'backend'
});
expect(result.success).toBe(true);
expect(result.compliance_status.owasp_score).toBeDefined();
});
it('should provide remediation steps', async () => {
const result = await fullstackSecurity({
action: 'audit_security',
target: 'backend'
});
result.vulnerabilities.forEach(v => {
expect(v.remediation).toBeDefined();
});
});
});
describe('optimize_performance', () => {
it('should analyze Core Web Vitals', async () => {
const result = await fullstackSecurity({
action: 'optimize_performance',
target: 'frontend'
});
expect(result.success).toBe(true);
expect(result.performance_report.lcp).toBeDefined();
});
});
});
const securityChecklist = {
authentication: [
"Strong password policy enforced",
"MFA available and encouraged",
"Session timeout configured",
"Token rotation implemented"
],
authorization: [
"Role-based access control",
"Principle of least privilege",
"Resource-level permissions",
"Access logging enabled"
],
data_protection: [
"Encryption at rest",
"Encryption in transit (TLS 1.3)",
"PII handling compliant",
"Backup encryption enabled"
]
};
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2024-01 | Initial release |
| 2.0.0 | 2025-01 | Production-grade upgrade with OWASP 2024 |
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.