cmd/jzero/.template/skills/jzero-skills/SKILL.md
Comprehensive knowledge base for jzero framework (enhanced go-zero). Use this skill when working with jzero to understand correct patterns for REST APIs (Handler/Logic/Context architecture), RPC services (service discovery, load balancing), Gateway services, database operations (sqlx, MongoDB, caching), resilience patterns (circuit breaker, rate limiting), and jzero-specific features (git-change-based generation, flexible configuration, custom templates). Essential for generating production-ready jzero code that follows framework conventions.
npx skillsauth add jzero-io/jzero jzero-skillsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Structured knowledge base optimized for AI agents to help developers work effectively with the jzero framework (enhanced go-zero).
This skill provides AI agents with comprehensive jzero knowledge to:
When helping with jzero development:
Reference: references/rest-api-patterns/api-file-structure.md
go_package, group, compact_handler)When to use: Creating or modifying REST API services, implementing HTTP endpoints
When to use: Creating or modifying RPC services, working with proto files, adding validation or middleware
⚠️ CRITICAL REMINDER: ALWAYS use condition.NewChain() - NEVER use condition.New()
When to use: Implementing data persistence, queries, or database operations
Reference: Project Structure
.api file with required settings:jzero gen --desc desc/api/user.apiinternal/logic/ following three-layer architectureSee detailed patterns: REST API File Structure
Choose your schema mode first:
Local SQL Mode (schema files in desc/sql/):
desc/sql/*.sqldesc/sql_migration/ (xx.up.sql & xx.down.sql) ⚠️jzero migrate up, production: auto in cmd/server.go)jzero gen --desc desc/sql/users.sqlRemote Datasource Mode (schema from live database):
desc/sql_migration/ (xx.up.sql & xx.down.sql) ⚠️jzero migrate up, production: auto in cmd/server.go)jzero genCommon steps (both modes):
⚠️ Migration rules: Always create both up/down files, use consecutive numbering (1, 2, 3...)
See detailed patterns: SQL Migration Guide | Database Best Practices
etc/etc.yaml:See detailed guide: Database Connection
jzero-skills/
├── SKILL.md # This file - skill entry point
├── references/ # Detailed pattern documentation
│ ├── rest-api-patterns/ # REST API guides
│ │ └── api-file-structure.md # ⚠️ Critical rules for .api files
│ ├── rpc-patterns/ # RPC/Proto service guides
│ │ ├── proto-file-structure.md # Proto standards & multi-proto
│ │ ├── proto-validation.md # Field validation guide
│ │ └── proto-middleware.md # Middleware patterns
│ └── database-patterns/ # Database operation guides
│ ├── best-practices.md # ⚠️ Critical rules with examples
│ ├── sql-migration.md # ⚠️ Schema changes & migrations
│ ├── database-connection.md # DB & Redis setup
│ ├── model-generation.md # Generate models from SQL
│ └── crud-operations.md # CRUD methods reference
Typical jzero project structure:
myproject/
├── .jzero.yaml # CLI config: code generation, ⚠️ migrate settings
├── desc/
│ ├── api/ # .api files → generates handlers
│ ├── sql/ # .sql files → generates models (local SQL mode)
│ ├── sql_migration/ # xx.up.sql & xx.down.sql for schema changes ⚠️
│ └── proto/ # .proto files → generates RPC code
├── internal/
│ ├── handler/ # HTTP handlers (generated)
│ ├── logic/ # Business logic (implement here)
│ ├── model/ # Data models (generated)
│ ├── svc/ # Service context (dependencies)
│ ├── config/ # Config structs
│ └── middleware/ # Custom middleware
├── etc/
│ └── etc.yaml # Configuration
└── .jzero.yaml # jzero CLI config
condition.NewChain(), NEVER use condition.New() - THIS IS CRITICAL 🚨go_package, group, compact_handler: truexxmodel "project/internal/model/xx"errors.Is(err, model.ErrNotFound) from github.com/pkg/errorsjzero gen --desc before implementing logicusersmodel.Id)condition.New() - This is error-prone and deprecated. ALWAYS use condition.NewChain()go_package, group, or compact_handler in .api files"project/internal/model/users" (wrong)== for error comparison: if err == ErrNotFound (wrong)New to jzero?
jzero new myapi --frame apiBuilding REST APIs?
Creating RPC services?
Working with databases?
Production deployment?
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.