Skip to content
Back to skills

Architecture

ASecurity

Design systems that evolve and work offline (Local-First, WASM, CRDTs).

  • 23 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 14, 2026
ai-agentsrustgosqlrailsapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned October 14, 2026

npx -y skills add andreibesleaga/GABBE --skill architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Architecture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-architecture/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-architecture)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: adaptive-architecture
description: Design systems that evolve and work offline (Local-First, WASM, CRDTs).
triggers: [local-first, offline-first, crdt, automerge, yjs, wasm, webassembly, edge ai, resiliency]
tags: [architecture]
context_cost: medium
---
# Adaptive Architecture Skill

## Goal
To build systems that are robust, responsive, and respectful of user data ownership.

## Capabilities

### 1. Local-First (The New Standard)
-   **CRDTs**: Conflict-free Replicated Data Types for automatic syncing (Automerge/Yjs).
-   **Sync Engines**: Replicache, ElectricSQL, PouchDB.
-   **Philosophy**: The *client* is the source of truth. The *server* is just a backup/relay.

### 2. Emerging Runtimes (WASM)
-   **Universal Compute**: Run the same Rust/Go code on Server, Browser, and IoT Edge.
-   **Sandboxing**: Securely run untrusted plugins (Extensibility).
-   **WASI**: WebAssembly System Interface for "Write Once, Run Anywhere" (really).

### 3. Edge AI Offloading
-   **Hybrid Inference**: Run small models (SLMs) on-device (latency/privacy) and large models (LLMs) in cloud.
-   **TensorFlow Lite / ONNX**: Optimizing models for mobile/edge.

## Steps
1.  **Data Ownership**: Give users their data (SQLite on device).
2.  **Optimistic UI**: UI updates immediately. Sync happens in background.
3.  **Conflict Resolution**: Use CRDTs to mathematically guarantee convergence.

## Deliverables
-   `sync-strategy.md`: Choice of CRDT vs Last-Write-Wins.
-   `wasm-plugin.rs`: Template for a WASM extension.
-   `local-db.schema`: Schema for client-side SQLite.

## Security & Guardrails

### 1. Skill Security (Adaptive Architecture)
- **CRDT Poisoning Defense**: When agents design Local-First applications, they must mandate cryptographic signing for all CRDT (Conflict-free Replicated Data Type) operations. If an offline client's operations are merged without signature verification, a compromised local device could inject malicious state changes that replicate across the entire network.
- **WASM Sandbox Escape Identification**: The agent must treat WebAssembly (WASM) not as a perfect security boundary, but as a defense-in-depth layer. Any architecture utilizing WASI must explicitly define the minimal required capability grants (e.g., denying arbitrary filesystem access to WASM plugins).

### 2. System Integration Security
- **Data Residency & Local-First**: If the system handles regulated data (HIPAA, GDPR), the agent must heavily scrutinize the offline-first design. Storing full SQLite replicas on untrusted user devices (phones, laptops) bypasses central data loss prevention (DLP) controls. The architecture must enforce aggressive local data expiration and mandatory on-device encryption at rest (e.g., SQLCipher).
- **Edge AI Prompt Leakage**: When offloading inference to the Edge (SLMs), the architecture must not rely on sensitive, system-level prompts or API keys that are transmitted to the local device. The agent must verify that the Edge AI component only processes localized, sandboxed logic without exposing central intellectual property.

### 3. LLM & Agent Guardrails
- **Offline Mode Hallucination**: The LLM might confidently propose an offline-first architecture for operations that inherently require synchronous, central validation (e.g., financial ledger transactions). The agent must aggressively push back against applying CRDTs or Local-First patterns to strong-consistency domains, preventing "double-spend" vulnerabilities by design.
- **Complexity Bias**: The agent must counter its own bias towards proposing complex, modern patterns (WASM + CRDTs + Edge AI) for simple problems. It must enforce a "Simplicity Veto" if the NFRs do not explicitly demand extreme disconnection tolerance, thereby reducing the overall attack surface.

Files in this skill

  • adaptive-architecture.skill.md3.7 KB
  • api-design.skill.md4.7 KB
  • api-standards.skill.md1.7 KB
  • arch-debt.skill.md8.2 KB
  • arch-design.skill.md12.6 KB
  • arch-patterns.skill.md3.9 KB
  • arch-review.skill.md14.1 KB
  • architecture-governance.skill.md3.6 KB
  • attribute-driven-design.skill.md7.5 KB
  • blockchain-dlt.skill.md1.9 KB
  • compatibility-design.skill.md3.6 KB
  • critical-systems-arch.skill.md2 KB
  • design-patterns.skill.md4.3 KB
  • diagramming.skill.md13.9 KB
  • domain-model.skill.md12.1 KB
  • enterprise-migration-scenario.skill.md2 KB
  • enterprise-patterns.skill.md1.9 KB
  • error-handling-strategy.skill.md3.9 KB
  • event-driven-architecture.skill.md1.8 KB
  • event-governance.skill.md3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.