AGENT SKILL

Pyramid 框架扩展点参考

pyramid-core

Pyramid 框架特性参考——请求方法、自定义指令、事件、补间(tween)、异常视图、视图谓词、视图派生器、回调、渲染器以及静态视图。当用户询问 Pyramid 框架的任何扩展点时使用。

使用场景开发参考
License 许可
MIT
最近更新
2026-10-24
Stars
★ 0
Forks
0

01 前言 Front Matter

name
pyramid-core
description
Pyramid framework features reference — request methods, custom directives, events, tweens, exception views, view predicates, view derivers, callbacks, renderers, and static views. Use when the user asks about any Pyramid framework extension point.
dependencies
[ "pyramid-developer" ]

02 资源文件 8

03 SKILL.md 正文

MANAGED SKILL — Do not edit this file here. It is managed from an external source repository. To make changes, update the source and run "update my skills" to sync.

Pyramid Core (Framework Features)

Canonical reference for Pyramid's framework extension points — the building blocks that all three developer personas (App, Plugin, Library) use when extending Pyramid's request/response pipeline, configuration system, and event model.

If you're looking for persona-specific guidance:

  • App Developer — composition root wiring, test infrastructure, pshell snippets → see pyramid-app
  • Plugin Developer — domain modules, service layer, REST endpoint scaffolding → see pyramid-plugin
  • Library Developer — standalone extensions, includeme for consumers, settings → see pyramid-library

For shared Pyramid conventions (registry, models, authorization, transactions), see the pyramid-developer always-on rule.


Install Actions

1. Copy this skill directory

Copy the entire pyramid-core/ directory to the install target so that the reference guides are available at runtime.


Runtime Behavior (After Installation)

When installed, this skill acts as a router for Pyramid framework feature questions. Match the user's intent to the right reference:

Capability Routing

Intent Delegate to
Request methods, reified properties, registry attributes, response/finished callbacks, exception views, custom renderers Read and follow request-and-response.md
Scanning (config.scan()), custom directives, config.action(), conflict detection, view predicates, route predicates, view derivers, static views Read and follow configuration.md
Event system, built-in events, custom events, subscriber predicates Read and follow events.md
Tweens, tween ordering, middleware patterns Read and follow tweens.md
Pyramid conventions, architecture, patterns Answer using the installed pyramid-developer rule's knowledge

Trigger Phrases

  • Request/response: "add_request_method", "request method", "reified property", "reify", "request.add_response_callback", "response callback", "finished callback", "add_finished_callback", "exception view", "notfound view", "forbidden view", "exception_view_config", "custom renderer", "add_renderer"
  • Configuration: "config.scan", "scan", "ignore scan", "add_directive", "custom directive", "config.action", "conflict detection", "discriminator", "view predicate", "add_view_predicate", "route predicate", "add_route_predicate", "view deriver", "add_view_deriver", "static view", "add_static_view", "static_url"
  • Events: "event", "subscriber", "add_subscriber", "NewRequest", "NewResponse", "BeforeRender", "ApplicationCreated", "custom event", "notify", "subscriber predicate"
  • Tweens: "tween", "add_tween", "tween factory", "tween ordering", "over", "under"

Routing Rules

  1. If the user asks about request methods, callbacks, exception views, or renderers → read and follow request-and-response.md
  2. If the user asks about scanning, directives, predicates, derivers, or static views → read and follow configuration.md
  3. If the user asks about events or subscribers → read and follow events.md
  4. If the user asks about tweens or middleware → read and follow tweens.md
  5. If the user asks about Pyramid conventions or patterns → answer directly from the installed rule
  6. If the question spans multiple areas, answer directly and mention the relevant references for follow-up

04 同仓库更多 Skills

cartaorobbin
cartaorobbin/pyramid-temporal

pytest 测试编写

write-pytest

为任何 Python 代码库编写 pytest 测试。当用户要求编写测试、创建测试、添加测试,或测试某个模块/服务/端点/函数时使用。与框架无关;当检测到相关信号时会路由到框架专用的辅助工具。遵循“先研究—再讨论—后编写”的流程。

测试工程师测试与质量保障
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

会话质量保障检查

quality-assurance

对当前聊天会话执行质量保障检查——任务前验证、任务后清单和代码审查。在完成任务时、提交前或用户要求进行 QA 审查时使用。

测试工程师测试与质量保障
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Python 开发规范配置

python-developer

Python 开发者总括技能——一次性安装 Python 编码约定,并捆绑配套技能(最佳实践、测试、依赖管理)完成统一配置。当用户要求建立 Python 开发规范、安装 Python 技能,或说“搭建 Python 开发环境”时使用。

软件开发工程师开发参考
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Python 编码最佳实践

python-best-practices

全面的 Python 编码约定与最佳实践。当用户询问 Python 约定、编码模式、最佳实践、代码风格、反模式,或“这段 Python 代码应该怎么写”时使用。

软件开发工程师开发参考
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Pyramid 扩展库开发

pyramid-library

库开发者角色:开发独立的 Pyramid 扩展(拥有自己的仓库与包),并向外部使用者暴露 includeme。当用户构建可复用的 Pyramid 库、为使用者设计 includeme、注册自定义指令/tween/请求方法,或使用规范的应用程序测试库时使用。

软件开发工程师开发参考
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Pyramid 框架开发规范

pyramid-developer

Pyramid 框架开发约定——配置/注册表、基于 includeme 的模块系统、pyramid_services、模型、Cornice REST、ACL 授权以及事务处理。在为一个项目建立 Pyramid 开发规范时使用。

软件开发工程师开发参考
★ 0