بنقرة واحدة
project-conventions
Enforces OAuth2 project coding conventions from TECH_SPECS.md during code generation and review
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Enforces OAuth2 project coding conventions from TECH_SPECS.md during code generation and review
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
通过微信机器人发送通知消息(文本、图片、文件、视频)
重新生成 Drogon ORM 模型类(基于当前数据库表结构)
构建和测试C++ OAuth2后端,包含正确的依赖管理
重置测试数据库(清空并重新初始化所有表结构和数据)
执行OAuth2系统的完整端到端(E2E)测试,验证用户登录、授权码流程、token交换、RBAC权限控制和受保护API访问的完整功能。当用户需要在代码变更后验证整个OAuth2认证流程、测试用户登录和权限管理、验证修复后的安全功能、或在生产部署前进行完整的功能验证时使用此技能。
在Docker Compose环境中执行OAuth2系统的完整集成测试和健康检查。当用户需要在代码变更后验证功能、运行端到端测试、检查Docker环境健康状态、或需要验证整个OAuth2系统(前端+后端+数据库+缓存)的集成时使用此技能。确保在Docker环境中测试所有组件的集成,包括健康检查、OAuth2流程、API端点、数据库连接、Redis缓存和前后端通信。
استنادا إلى تصنيف SOC المهني
| name | project-conventions |
| description | Enforces OAuth2 project coding conventions from TECH_SPECS.md during code generation and review |
| user-invocable | false |
Apply these rules to ALL C++ code generated or modified in this project. Loaded automatically by Claude as background knowledge.
| Rule | Requirement |
|---|---|
| Layer separation | Controllers (HTTP) -> Plugin/Service (business) -> Storage (data) -> Model (ORM) |
| Drogon-first | Use Drogon built-ins over third-party libraries |
| Plugin pattern | Core logic in OAuth2Plugin, server wiring in OAuth2Server |
| ORM immutable | NEVER edit files in models/ -- use drogon_ctl to regenerate |
| Pattern | Status |
|---|---|
Async callbacks (Mapper::findOne, execSqlAsync) | REQUIRED -- always prefer |
Synchronous (Mapper::findBy with future) | RESTRICTED -- only when necessary |
Coroutines (CoroMapper) | FORBIDDEN -- never use |
[sharedCb] -- REQUIRED for callback lifetime[this], [&var] -- FORBIDDEN unless PR explains lifetime guaranteeauto sharedCb = std::make_shared<std::function<void(const ResultType &)>>(
std::move(callback));
// Use *sharedCb to invoke
| Operation | Allowed | Method |
|---|---|---|
| SELECT | ORM only | Mapper::findBy, Mapper::findOne |
| INSERT | ORM only | Mapper::insert |
| UPDATE | ORM only | Mapper::update |
| JOIN | Forbidden | Split into multiple queries or Criteria::In |
| Raw SQL | Exception only | DDL, UPDATE...RETURNING, batch ops |
const DrogonDbException &e for DB operations(*sharedCb)(errorResult)LOG_DEBUG (dev), LOG_INFO (flow), LOG_WARN (issues), LOG_ERROR (failures)[+], [-], [!] instead of emojidrogon_test.h)MemoryOAuth2Storage and PostgreSQL{Unit|Integration|Security}_{Module}_{Function}_{Scenario}