nw-security-by-design

nw-security-by-design is a skill for Claude Code from nWave-ai/nWave. It costs 37 tokens per session (2,203 once invoked), scanned A, original, MIT.

A set of security principles for designing systems with protections built in from the start. It covers threat modelling, common web risks, restrictive defaults, access control, input handling, and other architectural safeguards.

In plain words
What is it for?
Use it while designing a system or reviewing its architecture to model threats, apply OWASP guidance, set safe defaults, limit permissions, and plan secure boundaries.
Why use it?
It helps find and reduce security risks before they become expensive to fix in running software. It encourages layered protections instead of relying on a single security control.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it while designing a system or reviewing its architecture to model threats, apply OWASP guidance, set safe defaults, limit permissions, and plan secure boundaries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nwave-ai/nwave/nw-security-by-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nWave-ai/nWave --skill nw-security-by-design
Clone the repo
git clone --depth 1 https://github.com/nWave-ai/nWave

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nw-security-by-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-security-by-design/github.svg)](https://agentmods.dev/skills/nwave-ai/nwave/nw-security-by-design)
Your own site
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-security-by-design"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-security-by-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nw-security-by-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/nwave-ai/nwave/nw-security-by-design"><img src="https://agentmods.dev/badge/skills/nwave-ai/nwave/nw-security-by-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.02203
Opus 5.5 $0.00015 $0.00881
Sonnet 5.5 $0.00007 $0.00441
Haiku 4.5 $0.00004 $0.00220

Measured 1mo ago against content hash 62bb8bf1da2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nw-security-by-design scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| Command Injection | `os.system(f"cmd {input}")` | `subprocess.run(["cmd", input], shell=False)` |
nWave/skills/nw-security-by-design/SKILL.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security by Design

OWASP Security Design Principles

Apply these during design -- retrofitting security is 10-100x more expensive.

# Principle Architect Action
1 Security by Design Include security requirements in architecture documents
2 Security by Default Ship restrictive defaults; require explicit opt-in for relaxed settings
3 Defense in Depth Layer controls: WAF + input validation + output encoding + parameterized queries
4 Fail Secure Deny access on error; closed-by-default network policies
5 Least Privilege Scoped service accounts; time-limited tokens; minimum permissions
6 Compartmentalize Network segmentation; separate databases per trust level
7 Separation of Duties Separate deployment approval from code authorship
8 Economy of Mechanism Minimize attack surface; simple, auditable security code
9 Complete Mediation Check authorization on every request; no cached auth decisions
10 Open Design Use published, peer-reviewed algorithms; no security-through-obscurity
11 Least Common Mechanism Separate admin and user interfaces
12 Psychological Acceptability Make the secure path the easy path; minimize user friction

STRIDE Threat Modeling

Apply STRIDE to every component in a Data Flow Diagram (DFD). Four questions drive every session:

  1. What are we working on? (system model)
  2. What can go wrong? (threat identification)
  3. What are we going to do about it? (mitigation)
  4. Did we do a good enough job? (review)

STRIDE Reference

Threat Violated Property Architectural Mitigation
Spoofing Authentication MFA, mutual TLS, certificate pinning, OAuth2+PKCE
Tampering Integrity Input validation, HMAC, parameterized queries, immutable infra
Repudiation Non-repudiation Tamper-evident logging (append-only), digital signatures, SIEM
Info Disclosure Confidentiality Encryption at rest+transit, least privilege, generic error messages
Denial of Service Availability Rate limiting, circuit breakers, auto-scaling, query complexity limits
Elevation of Privilege Authorization Least privilege, RBAC/ABAC, signed tokens verified server-side

Read the full file on GitHub · 202 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 202 lines · 37 tokens per session scan A 62bb8bf1da2e

Subscribe to this mod's changes

nw-security-by-design is a skill published in the GitHub repository nWave-ai/nWave (620 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 2,203 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.