/claude-toolkit:soc-analystfrom claude-toolkit
Stack-agnostic SOC analyst that triages alerts (P1-P4), investigates incidents, remediates vulnerabilities (SQLi, XSS, CSRF, etc.), hardens apps, and generates post-mortem reports. Auto-detects the project stack.
Ships in claude-toolkit. 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.
Read when SKILL.md points to them.
Stack-agnostic Security Operations Center analyst for web applications. Auto-detects the project stack, then triages, investigates, and actively fixes security vulnerabilities — not just reports them.
| Command | Phase | Description |
|---|---|---|
/soc triage | Triage | Scan codebase/logs, assess severity (P1-P4), categorize with MITRE ATT&CK |
/soc investigate | Investigation | Deep-dive a finding — trace attack path, correlate events, identify root cause |
/soc respond | Incident Response | Contain active incidents, eradicate threats, recover operations |
/soc remediate | Remediation | Fix vulnerabilities in code — patch files, show before/after diffs |
/soc harden | Hardening | Proactive security improvements with hardening scorecard |
/soc report | Reporting | Generate security audit reports, incident reports, post-mortems |
Activate this skill when the user:
Before running any command, detect the project stack. Check for these files in order:
| Indicator File(s) | Stack | Dependency Audit Command |
|---|---|---|
composer.json + artisan | Laravel/PHP | composer audit |
composer.json (no artisan) | PHP (Symfony, etc.) | composer audit |
package.json + next.config.* | Next.js | npm audit / yarn audit |
package.json + nuxt.config.* | Nuxt.js | npm audit / yarn audit |
package.json (Express/Fastify/Nest) | Node.js | npm audit / yarn audit / pnpm audit |
requirements.txt / pyproject.toml / Pipfile | Python | pip audit / safety check |
manage.py + settings.py | Django | pip audit |
Gemfile | Ruby/Rails | bundle audit check --update |
go.mod | Go | govulncheck ./... |
Cargo.toml | Rust | cargo audit |
pom.xml / build.gradle | Java/Spring | mvn dependency-check:check / gradle dependencyCheckAnalyze |
*.csproj / *.sln | .NET | dotnet list package --vulnerable |
Once detected, gather stack-specific context:
composer.json for versions and packages.env.example, config/session.php, config/cors.phpbootstrap/app.php or app/Http/Kernel.php middlewarepackage.json for dependencieshelmet, cors, express-rate-limit, csrf packages.env handling (dotenv, config module)requirements.txt / pyproject.toml for dependenciessettings.py (Django) or app config (Flask/FastAPI)SECURE_* settings (Django), talisman (Flask)Gemfile for dependenciesconfig/environments/production.rb security settingsrack-attack, devise, brakeman gemsconfig/initializers/ for security configs/soc triage — Security Alert TriageScan the codebase and categorize all security findings.
references/vulnerability-patterns.md:
references/mitre-attack-mapping.md## Security Triage Report
**Date:** [Date]
**Stack:** [Detected stack and version]
**Scope:** [What was scanned]
**Total Findings:** [N]
| # | Finding | Severity | OWASP Category | MITRE ATT&CK | File(s) | Action |
|---|---|---|---|---|---|---|
| 1 | SQL injection in user query | P1 | A03 Injection | T1190 | src/controllers/user.js:45 | Remediate |
| 2 | Missing CSRF protection | P2 | A01 Broken Access | T1185 | templates/payment.html:12 | Remediate |
/soc investigate, or fix them directly with /soc remediate?"/soc investigate — Deep InvestigationDeep-dive into a specific finding or suspicious indicator.
## Investigation Report
**Finding:** [Title]
**Stack:** [Detected stack]
**Severity:** [P1-P4]
**MITRE ATT&CK:** [Technique chain]
### Attack Path
1. Attacker sends [request] to [endpoint]
2. Input reaches [function] at [file:line] without [sanitization]
3. [Vulnerability] allows attacker to [action]
### Root Cause
[Explanation of why the vulnerability exists]
### Blast Radius
- [Data/systems at risk]
- [Privilege escalation paths]
### Related Findings
- [Other instances of the same pattern]
### Recommendation
[Specific fix with code reference]
/soc respond — Incident ResponseHandle active security incidents through containment, eradication, and recovery.
Apply containment actions appropriate to the detected stack:
| Scenario | Containment Action |
|---|---|
| Compromised endpoint | Disable the route, return 503, or add maintenance mode |
| Compromised credentials | Revoke all active sessions/tokens, invalidate API keys |
| Active exploitation | Block attacker IP via middleware, WAF, or firewall rule |
| Data exfiltration | Disable affected API endpoints, revoke access tokens |
| Web shell / backdoor | Remove the file, check for persistence mechanisms |
| Compromised admin account | Force password reset, revoke sessions, disable 2FA temporarily |
Stack-specific containment examples:
// Emergency: Disable a route
Route::any('/compromised-endpoint', fn () => abort(503, 'Under maintenance'));
// Revoke all sessions
DB::table('sessions')->truncate();
// Block IP via middleware
public function handle(Request $request, Closure $next): Response
{
$blockedIps = cache()->get('blocked_ips', []);
if (in_array($request->ip(), $blockedIps)) { abort(403); }
return $next($request);
}
// Emergency: Disable a route
app.all('/compromised-endpoint', (req, res) => res.status(503).send('Under maintenance'));
// Revoke all sessions (Redis store)
const redisClient = req.app.get('redisClient');
await redisClient.flushDb();
// Block IP via middleware
const blockedIps = new Set(await cache.get('blocked_ips') || []);
app.use((req, res, next) => {
if (blockedIps.has(req.ip)) return res.status(403).end();
next();
});
# Emergency: Disable a view
from django.http import HttpResponse
def compromised_view(request):
return HttpResponse('Under maintenance', status=503)
# Revoke all sessions
from django.contrib.sessions.models import Session
Session.objects.all().delete()
# Block IP via middleware
class BlockIPMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
blocked = cache.get('blocked_ips', [])
if request.META.get('REMOTE_ADDR') in blocked:
return HttpResponseForbidden()
return self.get_response(request)
/soc remediate workflow# Check for unauthorized file changes
git status
git diff
# Search for web shells / backdoors (adapt patterns to your stack)
grep -rl "eval\|base64_decode\|exec\|child_process\|subprocess" .
/soc remediate verification steps)/soc report/soc remediate — Fix Vulnerabilities in CodeThis is the core differentiator. The SOC analyst doesn't just report — it writes the fix.
references/vulnerability-patterns.mdreferences/remediation-playbooks.md for the detected stack| Vulnerability | Primary Fix | Additional Hardening |
|---|---|---|
| SQL Injection | Parameterized queries / ORM | Input validation layer |
| XSS | Output encoding / auto-escaping templates | CSP header |
| CSRF | CSRF tokens / SameSite cookies | Double-submit cookie pattern |
| Broken Auth | Rate limiting, session regeneration | Password policy, MFA |
| Broken Access Control | Authorization middleware/guards | Scoped queries, RBAC |
| Mass Assignment | Allowlist fields / DTOs | Validation layer |
| Insecure Deserialization | JSON over native serialization | Type-safe parsing |
| File Upload | MIME validation, safe filenames | Store outside webroot |
| Command Injection | Safe APIs (no shell), argument escaping | Allowlist validation |
| Path Traversal | Basename extraction, storage abstraction | Filename allowlist |
| Open Redirect | Relative path validation | Host allowlist |
| SSRF | Private IP blocking, scheme validation | Domain allowlist |
| Config Misconfig | Disable debug, secure env vars | Security headers |
| Data Exposure | Hidden fields, safe logging | Encryption at rest |
For each vulnerability found:
1. READ the vulnerable file
2. IDENTIFY the exact vulnerable code and its context
3. APPLY the stack-appropriate fix from remediation-playbooks.md
4. VERIFY the fix doesn't break functionality
5. WRITE a regression test using the project's test framework
6. EXPLAIN what was fixed and why
| Stack | Test Framework | Test Runner |
|---|---|---|
| Laravel/PHP | Pest / PHPUnit | php artisan test |
| Node.js | Jest / Vitest / Mocha | npm test |
| Python/Django | pytest / unittest | pytest / python manage.py test |
| Ruby/Rails | RSpec / Minitest | bundle exec rspec / rails test |
| Go | testing (stdlib) | go test ./... |
| Rust | built-in tests | cargo test |
| Java/Spring | JUnit / TestNG | mvn test / gradle test |
| .NET | xUnit / NUnit | dotnet test |
/soc harden — Proactive Security HardeningSystematically improve the application's security posture.
Detect stack and select the appropriate checklist sections from references/hardening-checklist.md
Run through all applicable categories:
For each category:
Run dependency audit using the detected stack's command:
# PHP
composer audit
# Node.js
npm audit # or yarn audit / pnpm audit
# Python
pip audit # or safety check
# Ruby
bundle audit check --update
# Go
govulncheck ./...
# Rust
cargo audit
# Java
mvn dependency-check:check
# .NET
dotnet list package --vulnerable
Output a hardening scorecard:
Apply security headers if not present — using the stack's idiomatic approach (middleware, config, etc.)
/soc report — Security ReportingGenerate structured security documents.
| Context | Report Type | Template |
|---|---|---|
After /soc triage or /soc harden | Security Audit Report | Template 1 |
| During/after incident response | Incident Report | Template 2 |
| After incident resolution | Post-Mortem | Template 3 |
| Single vulnerability deep-dive | Vulnerability Report | Template 4 |
Gather data from the current session:
Generate the report using templates from references/incident-report-templates.md
Output location: Write to security/ directory in the project root:
security/audit-report-YYYY-MM-DD.mdsecurity/incident-INC-YYYY-NNN.mdsecurity/post-mortem-YYYY-MM-DD.mdsecurity/vuln-VULN-YYYY-NNN.md/soc remediate command writes actual code fixes| Rationalization | Reality |
|---|---|
| "It's probably just a scanner" | Probably. Confirm it — the one time it is not, "probably" is in the post-mortem. |
| "One failed login isn't worth investigating" | One is not. The pattern is: same IP across many accounts, or many IPs against one account. Look at the shape, not the count. |
| "The WAF would have blocked it" | The WAF blocks what it recognises. Check whether the request reached the app and what it returned. |
| "No data was exfiltrated as far as I can see" | "As far as I can see" is the finding. State what your logs can and cannot prove. |
| "I'll clean up the compromised account and move on" | Without knowing entry, dwell time and lateral movement, you have removed a symptom and left the door open. |
| "Rotating credentials will disrupt users" | So does a second breach. Rotate, and communicate. |
| "The logs don't go back that far" | Then that is a finding in its own right — record it and extend retention before the next incident. |
| "It happened, we fixed it, no need to write it up" | The write-up is how the fix survives the next person. Undocumented incidents recur. |
../, union select, <script, ${jndi:, or long base64 blobs.env, .git/config, /admin, phpinfo, or backup file extensions| File | Read When |
|---|---|
references/vulnerability-patterns.md | Triaging or investigating — multi-stack detection catalog with code signatures, severity, and MITRE mapping |
references/remediation-playbooks.md | Remediating — stack-specific fix procedures with before/after code and test examples |
references/mitre-attack-mapping.md | Triaging or investigating — map findings to MITRE ATT&CK techniques for web applications |
references/hardening-checklist.md | Hardening — stack-adaptive security checklist across 10 categories |
references/incident-report-templates.md | Reporting — markdown templates for audit reports, incident reports, post-mortems, and vulnerability reports |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nasrulhazim/claude --plugin claude-toolkit43 skills in this plugin
/business-cardSVG business card designer that takes contact details and brand preferences, then produces 12 front design concepts with optional back designs, interactive HTML preview galleries, individual card showcases with front/back flip animation, and print-ready SVG exports with bleed area and crop marks. Supports horizontal and vertical orientations, six layout styles (minimal, corporate, creative, elegant, bold, tech), multiple color schemes, QR code placeholders, social media icons, and logo integration. Use this skill whenever the user asks to design a business card, create a name card, make visiting cards, or says "design business card", "buat kad bisnes", "create name card", "reka kad perniagaan", "design kad nama", "I need a business card for X".
/ci-cd-pipelineCI/CD pipeline builder for Laravel projects — extends Kickoff's existing GitHub Actions CI with continuous deployment pipelines (staging/production), Docker containerisation, secret management, and failure notifications. Generates Dockerfiles, docker-compose.yml, deployment configs for VPS via SSH, container registry push workflows, and leverages Kickoff's /bin scripts (deploy.sh, backup.sh, setup.sh) in automated workflows. Use this skill whenever the user asks to set up deployment pipelines, containerise a Laravel app, configure CD for staging or production, push Docker images to a registry, manage deployment secrets, add failure notifications to CI, or integrate /bin scripts with GitHub Actions. Triggers for requests like "set up CD pipeline", "deploy to staging automatically", "dockerise my Laravel app", "add Docker to my project", "push image to registry", "manage secrets in CI", "notify on failure", "extend CI with deployment", "setup deploy pipeline", "nak deploy guna GitHub Actions", "tambah Docker dalam project", "setup CD untuk staging", "nak auto deploy ke production", "dockerise Laravel app aku", "tambah notification kalau CI fail", "macam mana nak manage secrets dalam GitHub Actions", or "integrate bin scripts dengan CI". Assumes Laravel Kickoff as the baseline — GitHub Actions CI (Pint, PHPStan, Rector, Pest) and /bin scripts (deploy.sh, backup.sh) are already configured. This skill extends that baseline with CD, Docker, and deployment automation.
/code-qualityPHP and Laravel code quality toolchain — static analysis with Larastan/PHPStan, code style enforcement with Pint, automated refactoring with Rector, baseline management for legacy codebases, and CI pipeline integration via GitHub Actions. Use this skill whenever the user asks to check code quality, fix linting errors, run static analysis, modernise PHP code, set up CI quality gates, manage PHPStan baselines, configure Pint presets, or apply Rector rules. Triggers for requests like "run quality check", "fix my code style", "analyse with larastan", "update phpstan baseline", "modernise my PHP code", "set up CI for quality", "check code quality", "pint tak jalan", "nak fix phpstan error", "setup rector", "betulkan code style", "tambah quality gate dalam CI", or "baseline phpstan untuk legacy code". Assumes Laravel Kickoff as the baseline — PHPStan, Pint, Rector, and GitHub Actions CI are already configured. This skill extends and customises that baseline.
/courseware-builderInteractive HTML courseware builder — turns any technical topic, flow, or process into a CD-Courseware-style interactive slide deck with animated diagrams, step-by-step simulation, syntax-highlighted code examples, and key points panels. Use this skill whenever the user wants to create teaching materials, interactive slides, animated flow diagrams, or step-by-step technical walkthroughs — even if they say "buatkan slides untuk topik X", "jadikan courseware", "buat interactive tutorial", or "create a lesson on X". Also triggers for "convert my diagram to interactive slides" or "build a visual walkthrough for my training".
/debuggingSystematic debugging and error recovery for Laravel and PHP projects — a five-step triage that goes reproduce, localise, reduce, fix, guard. Covers reading a stack trace properly, bisecting with git, isolating a failure to the smallest reproducer, telling a symptom apart from a root cause, and closing every fix with a regression test. Includes Laravel-specific traps: N+1 masked as a timeout, queue jobs failing silently on the wrong connection, cache and config caches serving stale values, Livewire state desync, and eloquent/model events firing in unexpected order. Use this skill whenever the user reports something broken, failing, flaky, slow-then-erroring, or behaving differently in production than locally — including "this test is flaky", "why is this failing", "debug this error", "it works locally but not on staging", "find the root cause", "this exception makes no sense", "the queue job never runs", "bisect this regression", "kenapa error ni", "tolong debug", "test ni kejap pass kejap fail", "cari punca sebenar", "jalan kat local tapi tak jalan kat production", or "job queue tak jalan". Pairs with kickoff-pest-testing for the regression test and log-monitor for production-log-driven investigations.
/deploy-appDeploys a Kickoff-based Laravel application to its host by running `bin/deploy` over SSH, then verifies the release and knows what each way it can stop means. Use this skill whenever the user asks to deploy an app, push the latest code to production, check what commit production is running, bring a site back up after a failed deploy, or roll back — "deploy latest", "deploy the app", "tolong deploy", "deploy latest dulu", "push to production", "apa commit dekat production", "site down after deploy", "keluarkan maintenance mode", "rollback production", "kenapa 503". Covers the deploy command and its flags, the post-deploy verification checklist, the recovery path for each failure mode, and the production traps that have already cost time. Does NOT cover provisioning a new host from bare metal (`bin/provision-host`), CI/CD pipeline design (`ci-cd-pipeline`), or writing deploy operations.
Other plugins' skills for the same job