agentleFS
rafagomesrafagomes/ai-workflow/skills/security/SKILL.md

security

Skill9 starsChanged 8 months agoMITView on GitHub

Create or update docs/THREAT_MODEL.md — STRIDE-style threat model, trust boundaries, attack surface, mitigations. Use when the user asks for a threat model, security review, attack-surface analysis, STRIDE pass, or says 'what could go wrong security-wise', 'identify the threats', 'lock this down before launch', 'review the security posture'.

78 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cost-reducer, trigger-dev and 10 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.
  • daianepepes-labSkill

    cost-reducer

    Analyze and reduce costs across cloud infrastructure, code, and services. Use when asked to cut costs, optimize spending, reduce bills, or improve cost efficiency.

    Also in 5 projects that use this

  • xfstudioSkill

    trigger-dev

    Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.

    Also in 4 projects that use this

  • ffsshhttiikkSkill

    scalability

    Core foundational concepts and principles for Scalability

    Also in 4 projects that use this

  • daianepepes-labSkill

    self-healing

    Detect, diagnose, and automatically fix recurring errors, memory issues, and system degradation. Use when a system has recurring failures, memory leaks, performance degradation, or needs automatic recovery mechanisms.

    Also in 5 projects that use this

  • xfstudioSkill

    customer-support

    Elite AI-powered customer support specialist mastering

    Also in 4 projects that use this

  • ffsshhttiikkSkill

    cicd

    Continuous integration and delivery pipelines

    Also in 4 projects that use this

  • +1 more from daianepepes-lab

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create the threat model. Argument: $ARGUMENTS

    line 5
  2. Distinctive:

    Before interviewing, understand the system's security surface:

    line 9
  3. Very specific:

    Read docs/THREAT_MODEL.md — if revising, don't start from scratch

    line 12
  4. Very specific:

    Read docs/ARCHITECTURE.md for system structure and trust boundaries

    line 13
  5. Distinctive:

    Look for auth middleware, JWT handling, session management

    line 17
  6. Distinctive:

    Check for input validation patterns (or lack thereof)

    line 18
  7. Distinctive:

    Look for database queries (raw SQL vs ORM/parameterized)

    line 19
  8. Distinctive:

    Check for secrets management (env vars, config files, hardcoded values)

    line 20
  9. Distinctive:

    Check for exposed endpoints (route definitions, API handlers)

    line 21
  10. Very specific:

    Read docker-compose.yml or deployment config for service exposure

    line 22
  11. Distinctive:

    Use AskUserQuestion to understand the security landscape.

    line 27
  12. Very specific:

    No architecture doc? → "Define system structure with /architecture"

    line 101
  13. Very specific:

    No TDD? → "Define testing and dev workflow with /tdd"

    line 102

“Common” is measured: kept by at least 6 in 10 of the 56 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

Create the threat model. Argument: $ARGUMENTS

Context Gathering

Before interviewing, understand the system's security surface:

  1. Check for existing docs:
    • Read docs/THREAT_MODEL.md — if revising, don't start from scratch
    • Read docs/ARCHITECTURE.md for system structure and trust boundaries
    • Read CLAUDE.md, README.md
  2. Explore the codebase for security-relevant patterns:
    • Look for auth middleware, JWT handling, session management
    • Check for input validation patterns (or lack thereof)
    • Look for database queries (raw SQL vs ORM/parameterized)
    • Check for secrets management (env vars, config files, hardcoded values)
    • Check for exposed endpoints (route definitions, API handlers)
    • Read docker-compose.yml or deployment config for service exposure
    • Summarize what you found to the user — "Here's what I see from a security perspective: ..."

Interview

Use AskUserQuestion to understand the security landscape. Adapt based on what the codebase reveals.

  1. Trust boundaries — What is trusted? What is untrusted? Where are the boundaries?
  2. Authentication — How do users/agents/services prove identity? What mechanisms exist today?
  3. Authorization — Who can do what? How are permissions modeled?
  4. Sensitive data — What data is sensitive? Credentials, PII, financial? Where does it live? How is it protected at rest and in transit?
  5. Attack surface — What is exposed to the internet? To local users? To other services? What inputs does the system accept?
  6. Threat actors — Who would attack this? Script kiddies, insiders, nation states? What are their capabilities?
  7. Compliance — Any regulatory requirements? SOC2, GDPR, HIPAA, PCI?
  8. Existing security measures — What's already in place? What's missing?

For inherited projects: "I see you're using X for auth — is that intentional or legacy? I notice Y has no input validation — is that a known gap?"

Write

Write to docs/THREAT_MODEL.md:

# Threat Model

**Version:** [version]
**Date:** [date]

## Trust Assumptions

[What is the trust model? What is trusted, what is untrusted? Include a Mermaid diagram of the trust hierarchy.]

## Security Properties

[Non-negotiable security invariants. Things that must always hold.]

- [Property 1]
- [Property 2]

## Attack Surface

| Surface | Exposure | Controls |
|---------|----------|----------|
| [surface] | [who can reach it] | [what protects it] |

## Threats

### [Threat Category 1: e.g., Agent Impersonation]

| # | Attack | Impact | Likelihood | Defense |
|---|--------|--------|------------|---------|
| 1 | [attack description] | [what happens] | [Low/Med/High] | [how it's prevented] |

### [Threat Category 2]
...

## Sensitive Data Inventory

| Data | Classification | At Rest | In Transit | Access Control |
|------|---------------|---------|------------|----------------|
| [data type] | [level] | [protection] | [protection] | [who can access] |

## Security Controls

### Implemented
- [Control 1 — what it protects against]

### Required (not yet implemented)
- [Control 1 — what it would protect against, priority]

## Compliance Requirements

[If applicable. Regulatory frameworks, what they require, current status.]

After Writing

  1. Present the document to the user for review. Iterate until they're satisfied.
  2. Suggest next steps based on what exists:
    • No architecture doc? → "Define system structure with /architecture"
    • No TDD? → "Define testing and dev workflow with /tdd"
    • Ready to build? → "Create feature specs with /spec <name>, then /roadmap"

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.