Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

osmotic-pressure渗透压

Agent Skill

osmotic-pressure 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

8,376

周安装

349

GitHub Stars

公开资料未说明

下载量

2,792
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:osmotic-pressure(渗透压)
来源仓库:https://github.com/jcools1977/osmotic-pressure
安装命令:
openclaw skills install osmotic-pressure
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install osmotic-pressure

简介

osmotic-pressure 检测系统间复杂度分布失衡现象并绘制压力传导路径图。

  • 识别界面一侧吸收全部复杂性另一侧人为维持简单假象的问题根源。
  • 适用于微服务架构解耦不足或前后端职责边界模糊场景诊断。
  • 输出热力图与瓶颈节点列表指导重构优先级排序决策。
  • 需配合具体系统拓扑结构输入否则难以准确定位问题区域。

SKILL.md

name
osmotic-pressure
version
1.0.0
description
>
author
J. DeVere Cooley
category
architecture-health
tags
metadata
openclaw
emoji
💧
os
["darwin", "linux", "win32"]
cost
free
requires_api
false
tags

Osmotic Pressure

"In biology, osmotic pressure drives water from low-concentration regions to high-concentration regions through a semipermeable membrane. In software, complexity follows the same law — it flows toward where it's already concentrated, until the membrane tears."

What It Does

Every system has boundaries: between frontend and backend, between services, between modules, between your code and the framework. At each boundary, complexity must live *somewhere*. The question is: where does it accumulate, and when does the accumulation become unsustainable?

Osmotic Pressure maps the complexity gradient across every boundary in your system. It finds the places where one side has absorbed a disproportionate share of the system's complexity — making it fragile, hard to test, and expensive to change — while the other side coasts on artificial simplicity that exists only because the hard work was pushed across the membrane.

The Biology of Complexity

Biological ConceptSoftware Equivalent
CellModule, service, or component
Cell MembraneAPI, interface, or boundary
SoluteComplexity (logic, state, error handling, edge cases)
Osmotic PressureThe force driving complexity to accumulate on one side
Lysis (cell bursting)Module becomes unmaintainable, must be rewritten
Crenation (cell shriveling)Module becomes trivially thin, serves no purpose
IsotonicComplexity balanced appropriately across boundary

The Five Pressure Patterns

1. The God Module (Hypertonic)

One module has absorbed the complexity of its entire neighborhood. Everything is "simple" because everything delegates to it.

┌──────────────────┐     ┌──────┐
│   API Gateway     │────▶│ Auth │  simple
│   1,847 lines     │     └──────┘
│   43 functions    │     ┌──────┐
│   12 dependencies │────▶│ Log  │  simple
│   89% of bugs     │     └──────┘
│                   │     ┌──────┐
│   ALL THE         │────▶│ DB   │  simple
│   COMPLEXITY      │     └──────┘
└──────────────────┘
          ▲
    osmotic pressure is here

Symptom: Every bug ticket, every new feature, every refactor touches the same module. Other modules are "clean" because they're empty of responsibility.

Pressure indicator: Module size × dependency count × bug frequency. When this exceeds neighbors by > 3x, pressure is critical.

2. The Distributed Monolith (Isotonic Failure)

Complexity is "evenly distributed" — but only because every module reimplements the same logic. The membrane between them allows no sharing, so each cell independently evolved the same complexity.

┌──────────┐  ┌──────────┐  ┌──────────┐
│ Service A │  │ Service B │  │ Service C │
│ validates │  │ validates │  │ validates │
│ formats   │  │ formats   │  │ formats   │
│ retries   │  │ retries   │  │ retries   │
│ caches    │  │ caches    │  │ caches    │
└──────────┘  └──────────┘  └──────────┘
  identical     identical     identical
  complexity    complexity    complexity

Symptom: Total system complexity is 3-5x what it should be. Fixing a bug means fixing it in N places. "We have microservices" but each service is a mini-monolith.

Pressure indicator: Code similarity > 60% across modules that should be independent.

3. The Thin Facade (Hypotonic)

A module's public interface is beautifully simple. Its internals are a nightmare. The complexity was pushed inward rather than addressed — a clean API hiding a disaster.

Public Interface:          Implementation:
┌─────────────────┐       ┌─────────────────────────────┐
│ createUser()    │──────▶│ 17 conditional branches      │
│ getUser()       │       │ 4 retry loops                │
│ deleteUser()    │       │ 8 implicit state transitions  │
│                 │       │ 3 undocumented side effects   │
│ Clean. Simple.  │       │ 2 race conditions             │
│ 3 functions.    │       │ 1 prayer                      │
└─────────────────┘       └─────────────────────────────┘

Symptom: The module is easy to use and impossible to maintain. New developers can call it on day one. No developer can modify it after a year.

Pressure indicator: Public surface area vs. internal cyclomatic complexity. Ratios > 1:10 indicate excessive inward pressure.

4. The Complexity Cascade (Pressure Chain)

Complexity flows downhill through a chain of modules. Each layer pushes its hard problems to the next, until the bottom module bears the accumulated weight of every decision above it.

Frontend   →  "Let the API handle that"
API Layer  →  "Let the service handle that"
Service    →  "Let the database handle that"
Database   →  [Complex stored procedures, triggers, views, materialized
               aggregations doing what should be application logic]

Symptom: The bottom of the stack is fragile and critical. Changing the database schema requires understanding the entire application. The database is doing business logic.

Pressure indicator: Complexity increases monotonically down the call stack. The ratio of bottom-layer complexity to top-layer complexity exceeds 5:1.

5. The Boundary Void (Zero Pressure)

Two modules interact but have no defined boundary. Complexity flows freely in both directions. There's no membrane at all — just a zone of chaos where one module bleeds into the other.

┌─────────────────────────────────────┐
│  Module A ... ??? ... Module B      │
│  imports from B, B imports from A   │
│  shared state, shared types         │
│  no clear interface                 │
│  no clear ownership                 │
│  entropy: maximum                   │
└─────────────────────────────────────┘

Symptom: Nobody knows where A ends and B begins. Pull requests touch both "modules." Tests can't be scoped to one side.

Pressure indicator: Circular dependencies + shared mutable state + zero interface definition.

Measurement Framework

Complexity Metrics Per Module

MetricWhat It Measures
Lines of LogicExecutable lines, excluding declarations and imports
Cyclomatic ComplexityBranching paths through the module
State SurfaceNumber of mutable state variables managed
Error Handling DensityRatio of error/edge-case code to happy-path code
Dependency WeightNumber and depth of dependencies consumed
Export SurfaceNumber of things exposed to consumers
Change FrequencyHow often this module changes (git analysis)
Bug DensityBugs-per-line (from commit message analysis)

Pressure Calculation

For each boundary between module A and module B:

  Complexity(A) = weighted sum of all metrics for A
  Complexity(B) = weighted sum of all metrics for B

  Pressure = |Complexity(A) - Complexity(B)| / max(Complexity(A), Complexity(B))

  0.0 - 0.2  →  Isotonic (healthy balance)
  0.2 - 0.4  →  Mild pressure (monitor)
  0.4 - 0.6  →  Moderate pressure (rebalance recommended)
  0.6 - 0.8  →  High pressure (rebalance needed)
  0.8 - 1.0  →  Critical (lysis imminent)

Output Format

╔══════════════════════════════════════════════════════════════╗
║                 OSMOTIC PRESSURE ANALYSIS                   ║
║            System Equilibrium Score: 0.58 (Stressed)        ║
╠══════════════════════════════════════════════════════════════╣
║                                                              ║
║  PRESSURE MAP:                                               ║
║                                                              ║
║  Frontend ──[0.31]──▶ API ──[0.72]──▶ Service ──[0.44]──▶ DB║
║  (low)                      (HIGH)              (moderate)   ║
║                                                              ║
║  CRITICAL IMBALANCE:                                         ║
║  ┌──────────────────────────────────────────────┐            ║
║  │  API Layer → Service Layer                    │            ║
║  │  Pressure: 0.72 (High — approaching lysis)    │            ║
║  │  Pattern: God Module (Service layer)          │            ║
║  │                                                │            ║
║  │  API Layer:    142 LOL, CC 8, 3 state vars    │            ║
║  │  Service Layer: 2,847 LOL, CC 67, 28 state    │            ║
║  │                                                │            ║
║  │  Diagnosis: API is a thin pass-through.        │            ║
║  │  Service absorbed ALL business logic, ALL      │            ║
║  │  error handling, ALL state management.          │            ║
║  │                                                │            ║
║  │  Recommendation: Extract validation,            │            ║
║  │  transformation, and error policy to API layer. │            ║
║  │  Target pressure: < 0.40                        │            ║
║  └──────────────────────────────────────────────┘            ║
║                                                              ║
║  PATTERN SUMMARY:                                            ║
║  ├── God Modules: 1 (ServiceLayer)                           ║
║  ├── Thin Facades: 2 (APIGateway, AuthModule)                ║
║  ├── Complexity Cascades: 1 (Frontend → DB)                  ║
║  ├── Distributed Duplication: 0                              ║
║  └── Boundary Voids: 0                                       ║
╚══════════════════════════════════════════════════════════════╝

When to Invoke

  • During architecture design (set healthy pressure budgets before building)
  • After rapid feature development (complexity accumulates under speed pressure)
  • When one module seems to attract all the bugs
  • When a "simple" module is impossible to test
  • Before a rewrite (understand where the pressure is before redistributing)

Why It Matters

Complexity is conserved. You can't eliminate it — only distribute it. The question isn't "how do we reduce complexity?" but "where should complexity live, and is it living there?"

Systems don't fail because they're complex. They fail because the complexity is concentrated where it shouldn't be — behind thin facades, inside god modules, at the bottom of cascading chains. Osmotic Pressure makes the invisible distribution visible.

Zero external dependencies. Zero API calls. Pure complexity analysis.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

82.28%
按下载量换算2,297

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills