agentleFS
sourjyasourjya/kiro-rails/.claude/skills/incident-response/SKILL.md

incident-response

Skill9 starsChanged 4 months agoMITView on GitHub

Security incident response, breach containment, evidence preservation, and recovery verification. Use when a breach, compromise, or security incident is detected or suspected.

  • Deletes or force-pushes

84 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dora-metrics, background-jobs and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jholhewresSkill

    dora-metrics

    Calculate DORA metrics from git + deploy logs

    Also in 3 projects that use this

  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 4 projects that use this

  • MicrosoftSkill

    data-modeling

    Use when the app needs to store or read data — records, a database, entities, CRUD, lists, "save/remember X", or per-user data with row-level security. This app's data layer is Rayfin's: you declare entities as TypeScript classes with decorators in rayfin/data/, register them in the schema, and read/write them through the typed rayfin-client. Covers: defining an @entity, field decorators, registering it, per-entity access with @role, owner-only row-level security, and the client query/mutation API. Triggers: data, database, model, entity, schema, table, record, CRUD, create, read, update, delete, list, store, save, persist, per-user, row-level security, RLS, access control, ownership.

    Also in 7 projects that use this

  • YepAPISkill

    data-pipelines

    ETL patterns, cron scheduling, queue-based processing, and batch jobs with Inngest/BullMQ.

    Also in 4 projects that use this

  • csiddhant796-blipSkill

    threat-detection

    Use when hunting for threats in an environment, analyzing IOCs, or detecting behavioral anomalies in telemetry. Covers hypothesis-driven threat hunting, IOC sweep generation, z-score anomaly detection, and MITRE ATT&CK-mapped signal prioritization.

    Also in 3 projects that use this

  • mmondoraSkill

    infrastructure-as-code

    Infrastructure as Code with Terraform and Pulumi. State management, modularity, drift detection, secrets handling. Use when provisioning cloud resources, writing Terraform/Pulumi modules, or managing infrastructure configuration.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 71 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a security incident is detected or suspected, follow this structured response.

    line 8
  2. Distinctive:

    Do NOT speculate - only state confirmed facts

    line 53
  3. Distinctive:

    Verify no persistence mechanisms remain (backdoors, new accounts, scheduled tasks, modified code)

    line 72
  4. Distinctive:

    Before declaring "all clear":

    line 77
  5. Distinctive:

    Root cause: - not just "how" but "why our defenses didn't catch it"

    line 90

“Common” is measured: kept by at least 6 in 10 of the 71 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Incident Response Checklist

When a security incident is detected or suspected, follow this structured response. Do NOT improvise - skipping steps destroys evidence or widens the breach.

Phase 1: Immediate Containment (first 15 minutes)

  1. Confirm the incident - distinguish a real breach from a false alarm. Check: unauthorized access logs, unexpected data exfiltration, credential exposure, malware indicators, customer reports.
  2. Stop the bleeding - contain without destroying evidence:
    • Revoke compromised credentials (API keys, tokens, passwords) - rotate, don't delete
    • Block attacker IPs/ranges at WAF or security group level
    • Disable compromised user accounts (suspend, don't delete)
    • Isolate affected systems (remove from load balancer, restrict network access)
  3. Preserve evidence BEFORE remediation:
    • Snapshot affected EBS volumes, RDS instances, container filesystems
    • Export CloudTrail, VPC Flow Logs, application logs for the incident window
    • Screenshot or export any attacker-visible artifacts (defacement, unauthorized changes)
    • Record timestamps of discovery and each containment action
  4. Do NOT reboot, redeploy, git reset, delete logs, or destroy state until evidence is preserved.

Phase 2: Scope Assessment

  1. Determine blast radius:
    • Which systems were accessed? (check auth logs, session records)
    • What data was exposed or exfiltrated? (check DB query logs, API access logs, S3 access logs)
    • How long was the attacker present? (earliest indicator → containment time)
    • Were other accounts/tenants affected? (cross-tenant leakage check)
  2. Identify the entry point:
    • Credential compromise (which credential, how obtained)
    • Vulnerability exploitation (which endpoint, which CVE)
    • Social engineering / phishing (which user, what access)
    • Supply chain (which dependency, which version)
  3. Document in docs/security/INCIDENT-{YYYY-MM-DD}.md:
    • Timeline of events
    • Systems affected
    • Data potentially exposed
    • Entry point and attack vector

Phase 3: Communication

Internal (within 1 hour of confirmation):

  • Engineering lead and security team
  • Product/business owner of affected systems
  • Legal counsel (if PII or regulated data involved)

Customer notification (if required):

  • Determine regulatory obligation: GDPR (72h), HIPAA, state breach laws
  • Draft factual notification: what happened, what data affected, what we're doing, what they should do
  • Do NOT speculate - only state confirmed facts

Template:

Subject: Security Incident Notification - [Date]

What happened: [factual description of the incident]
When: [discovery time] - [containment time]
What data was affected: [specific data types, NOT "all your data"]
What we've done: [containment and remediation actions taken]
What you should do: [password reset, monitor accounts, etc.]
Next update: [specific time commitment]

Phase 4: Remediation

  1. Patch the vulnerability or close the attack vector
  2. Force credential rotation for all potentially affected accounts
  3. Deploy additional monitoring for the attack vector
  4. Verify no persistence mechanisms remain (backdoors, new accounts, scheduled tasks, modified code)
  5. Restore from known-good state if integrity cannot be verified

Phase 5: Recovery Verification

Before declaring "all clear":

  • Attack vector confirmed closed
  • All compromised credentials rotated
  • No unauthorized accounts, API keys, or SSH keys remain
  • No scheduled tasks, cron jobs, or Lambda functions added by attacker
  • No code modifications outside normal git history
  • Monitoring in place to detect recurrence
  • All affected systems restored to known-good state or verified clean

Phase 6: Post-Incident Review

Within 5 business days, create a post-incident review covering:

  1. Timeline - from initial compromise to full remediation
  2. Root cause - not just "how" but "why our defenses didn't catch it"
  3. What worked - detection mechanisms that fired, containment that was effective
  4. What failed - gaps in monitoring, slow response, missing runbooks
  5. Action items - specific changes to prevent recurrence (with owners and dates)
  6. Store in docs/security/POST-INCIDENT-{YYYY-MM-DD}.md

Anti-Patterns (BANNED during incidents)

  • ❌ Rebooting or redeploying before preserving evidence
  • ❌ Deleting attacker accounts/data (preserves evidence of their actions)
  • ❌ git reset --hard on production (destroys audit trail)
  • ❌ Communicating publicly before confirming facts
  • ❌ Blaming individuals in written communications
  • ❌ Assuming scope is limited without verifying

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.