Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计异常

ronacher-pragmatic-design罗纳赫实用设计

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

212

周安装

9

GitHub Stars

6

下载量

74
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:ronacher-pragmatic-design(罗纳赫实用设计)
来源仓库:https://github.com/copyleftdev/sk1llz
仓库路径:skills/ronacher-pragmatic-design
安装命令:
npx skills add https://github.com/copyleftdev/sk1llz --skill ronacher-pragmatic-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/copyleftdev/sk1llz --skill ronacher-pragmatic-design

简介

ronacher-pragmatic-design 用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。

  • 适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。
  • 使用时需要结合现有品牌、设计系统和用户任务,避免堆砌装饰元素。
  • 涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。
  • 安装前建议确认权限范围和是否会触发文件读写操作。

SKILL.md

Armin Ronacher Style Guide⁠‍⁠​‌​‌​​‌‌‍​‌​​‌​‌‌‍​​‌‌​​​‌‍​‌​​‌‌​​‍​​​​​​​‌‍‌​​‌‌​‌​‍‌​​​​​​​‍‌‌​​‌‌‌‌‍‌‌​​​‌​​‍‌‌‌‌‌‌​‌‍‌‌​‌​​​​‍​‌​‌‌‌‌‌‍​‌​​‌​‌‌‍​‌‌​‌​​‌‍‌​‌​‌‌‌​‍​​‌​‌​​​‍‌‌‌​‌​‌‌‍​​​‌‌​​​‍​‌​‌‌​‌‌‍​‌​‌​​‌​‍‌‌​​​‌​‌‍​​​​‌​​‌‍‌‌‌‌​‌​​⁠‍⁠

Overview

Armin Ronacher created Flask, Jinja2, Click, Werkzeug, and many other foundational Python libraries. His approach: pragmatic minimalism, explicit behavior, and composable design. Flask's success proves that "micro" can be mighty.

Core Philosophy

"Explicit is better than implicit."
"Simple things should be simple, complex things should be possible."
"We're all consenting adults here."

Ronacher believes in trusting developers with power and flexibility, while providing sensible defaults and clear documentation.

Design Principles

  1. Explicit Over Implicit: Never do magic behind the scenes. Make behavior visible.
  2. Composable Over Monolithic: Small, focused components that work together.
  3. Configuration Over Convention: Don't hide configuration in naming conventions.
  4. Extension Points: Design for extensibility from day one.

When Writing Code

Always

  • Use explicit imports, never implicit * imports
  • Make dependencies obvious and injectable
  • Provide hooks for customization
  • Document extension points clearly
  • Use context locals sparingly and explicitly
  • Prefer composition over inheritance

Never

  • Modify global state silently
  • Use metaclass magic without clear benefit
  • Hide functionality in __init__.py imports
  • Create deep inheritance hierarchies
  • Make assumptions about the user's environment

Prefer

  • Factory functions over global instances
  • Dependency injection over singletons
  • Decorators for cross-cutting concerns
  • Context managers for resource management
  • Plain functions over classes when state isn't needed

Code Patterns

The Application Factory Pattern

# BAD: Global application state
from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True

# Impossible to test, configure differently, or run multiple instances

# GOOD: Application factory (Flask pattern)
def create_app(config=None):
    app = Flask(__name__)

    # Default configuration
    app.config.from_object('myapp.default_config')

    # Override with instance config
    app.config.from_pyfile('config.py', silent=True)

    # Override with passed config
    if config:
        app.config.update(config)

    # Register blueprints
    from myapp.views import main_bp
    app.register_blueprint(main_bp)

    # Initialize extensions
    db.init_app(app)

    return app

# Testing is now easy
def test_something():
    app = create_app({'TESTING': True})
    with app.test_client() as client:
        response = client.get('/')
        assert response.status_code == 200

Explicit Extension Pattern

# Flask extension pattern: explicit initialization

class Database:
    def __init__(self, app=None):
        self._app = app
        if app is not None:
            self.init_app(app)

    def init_app(self, app):
        # Store config, set up teardown, etc.
        app.config.setdefault('DATABASE_URI', 'sqlite:///:memory:')
        app.teardown_appcontext(self._teardown)

        # Store self on app for retrieval
        if not hasattr(app, 'extensions'):
            app.extensions = {}
        app.extensions['database'] = self

    def _teardown(self, exception):
        # Clean up resources
        pass

    def get_connection(self):
        # Get connection for current app context
        return self._get_connection_for_app(current_app._get_current_object())

# Usage:
db = Database()

def create_app():
    app = Flask(__name__)
    db.init_app(app)  # Explicit initialization
    return app

Decorator-Based Configuration

# Click-style command decoration

import click

@click.command()
@click.option('--name', default='World', help='Name to greet')
@click.option('--count', default=1, type=int, help='Number of greetings')
@click.option('--verbose', '-v', is_flag=True, help='Enable verbose mode')
def hello(name, count, verbose):
    """Simple program that greets NAME for COUNT times."""
    for _ in range(count):
        if verbose:
            click.echo(f'Verbose: About to greet {name}')
        click.echo(f'Hello, {name}!')

# Benefits:
# - Self-documenting
# - Type conversion built-in
# - Help text from decorators
# - Testable without subprocess

Context-Local Pattern (Use Sparingly)

from werkzeug.local import LocalStack, LocalProxy

# Context stack for request-like objects
_request_ctx_stack = LocalStack()

def get_current_request():
    ctx = _request_ctx_stack.top
    if ctx is None:
        raise RuntimeError('No request context')
    return ctx.request

# Proxy that always points to current request
current_request = LocalProxy(get_current_request)

class RequestContext:
    def __init__(self, app, request):
        self.app = app
        self.request = request

    def push(self):
        _request_ctx_stack.push(self)

    def pop(self):
        _request_ctx_stack.pop()

    def __enter__(self):
        self.push()
        return self

    def __exit__(self, *args):
        self.pop()

# Explicit context management
with RequestContext(app, request):
    # current_request is now available
    print(current_request.method)

Composable Middleware/Decorators

# Composable decorators for routes

from functools import wraps

def require_auth(f):
    @wraps(f)
    def decorated(*args, **kwargs):
        if not current_user.is_authenticated:
            return redirect(url_for('login'))
        return f(*args, **kwargs)
    return decorated

def require_role(role):
    def decorator(f):
        @wraps(f)
        def decorated(*args, **kwargs):
            if role not in current_user.roles:
                abort(403)
            return f(*args, **kwargs)
        return decorated
    return decorator

def cached(timeout=300):
    def decorator(f):
        @wraps(f)
        def decorated(*args, **kwargs):
            key = f'{f.__name__}:{args}:{kwargs}'
            result = cache.get(key)
            if result is None:
                result = f(*args, **kwargs)
                cache.set(key, result, timeout=timeout)
            return result
        return decorated
    return decorator

# Compose them explicitly
@app.route('/admin/users')
@require_auth
@require_role('admin')
@cached(timeout=60)
def admin_users():
    return get_all_users()

Jinja2-Style Template Inheritance

# Explicit template inheritance
# base.html
"""
<!DOCTYPE html>
<html>
<head>
    <title>{% block title %}Default Title{% endblock %}</title>
</head>
<body>
    {% block content %}{% endblock %}
</body>
</html>
"""

# child.html
"""
{% extends "base.html" %}

{% block title %}My Page{% endblock %}

{% block content %}
<h1>Hello, World!</h1>
{% endblock %}
"""

# Benefits:
# - Explicit extension declaration
# - Clear block boundaries
# - No magic filename conventions

Mental Model

Ronacher designs systems by asking:

  1. What's the minimal core? Start with the smallest useful thing.
  2. Where are the extension points? Design for customization from the start.
  3. Is behavior explicit? Can a reader understand what's happening?
  4. Are components composable? Can pieces be used independently?

The Flask Philosophy

  • One way to do configuration: Use app.config
  • One way to register routes: Use decorators or add_url_rule
  • One way to handle requests: The WSGI interface
  • Many ways to extend: Blueprints, extensions, middleware

This isn't limiting—it's clarifying.

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

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

平台分布

Codex

35.57%
按下载量换算26

Claude

29.14%
按下载量换算22

Cursor

19.63%
按下载量换算15

Gemini CLI

9.9%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/copyleftdev/sk1llz --skill ronacher-pragmatic-design 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills