safe-by-default-architect

Convert recurring unsafe implementation patterns into safe architectural defaults and static analysis rules.

5|4|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/takusaotome/claude-skills-library --skill safe-by-default-architect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-by-default-architect
Source: https://github.com/takusaotome/claude-skills-library/tree/main/skills/safe-by-default-architect
Command: npx skills add https://github.com/takusaotome/claude-skills-library --skill safe-by-default-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill prevents recurring security and reliability defects by turning repeated dangerous implementation patterns into safe architectural defaults, forbidden-to-safe mappings, common layers, and enforceable static rules.

Core Features & Use Cases

  • Safe Pattern Catalog Creation: Converts incident/RCA evidence into a prioritized set of approved safe patterns with rationale.
  • Forbidden Pattern List & Taxonomy: Produces a structured inventory of anti-patterns mapped to concrete danger categories (e.g., injection, silent corruption, environment divergence).
  • Common Layer Design: Recommends shared abstractions (services, repositories, wrappers) that make unsafe behavior hard to implement.
  • Static Rule Candidate Plan: Proposes lint/semgrep/regex/static-analysis rules with false-positive risk notes and enforcement severity/rollout guidance.
  • Exception Governance & Review Addendum: Defines when deviations are allowed (review-required vs approval-required vs prohibited) and adds checklist items to align human review with the new standards.

Quick Start

Use the safe-by-default-architect skill to transform your top recurring RCA findings into a safe pattern catalog, forbidden-to-safe mapping table, and a rollout-ready set of static rule candidates for your codebase.

Frequently Asked Questions about safe-by-default-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert recurring RCA findings into enforceable static analysis rules?

To convert recurring RCA findings into enforceable static analysis rules, you extract pattern evidence from incidents, classify danger mechanisms, define approved safe replacements, and produce a phased rollout plan for lint or semgrep rules. This includes mapping forbidden patterns to safe defaults.

What is a deny-by-default architecture and how does it prevent security defects?

A deny-by-default architecture prevents security defects by making the safe path the default path. It transforms recurring unsafe implementation patterns into safe architectural defaults, forbidden pattern inventories, and common layer abstractions that make unsafe behavior hard to implement across controller, API, database, file, and time boundaries.

How do I create a forbidden pattern inventory from incident evidence?

Creating a forbidden pattern inventory from incident evidence involves extracting recurring unsafe implementation patterns from your RCA findings, classifying them into concrete danger categories like injection or silent corruption, and mapping each anti-pattern to an approved safe replacement with a structured taxonomy.

How do I design common layer abstractions to prevent unsafe coding patterns?

Designing common layer abstractions to prevent unsafe coding patterns involves recommending shared services, repositories, and wrappers that make unsafe behavior hard to implement. These abstractions enforce safe defaults across controller, API, database, file, and time boundaries by centralizing security standards.

Can I use semgrep rules to enforce safe defaults without blocking legitimate code?

Yes, you can use semgrep rules to enforce safe defaults. The process produces static rule candidates with false-positive risk notes and enforcement severity guidance, allowing a phased rollout that minimizes friction while blocking dangerous implementation patterns identified from RCA evidence.

What is exception governance and when should I allow deviations from security standards?

Exception governance defines when deviations from security standards are allowed by categorizing them as review-required, approval-required, or prohibited. It adds checklist items to align human code review processes with the new safe defaults and forbidden pattern inventories.