goframe-v2▌
gogf/skills · updated May 19, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
GoFrame v2 development conventions and component standards for Go services and APIs.
- ›Use gf init to scaffold HTTP and microservice projects; auto-generated dao, do, and entity files must never be manually modified
- ›Implement business logic directly in the service/ directory; avoid the logic/ directory unless explicitly required
- ›Always use DO objects from internal/model/do/ for database operations; never use g.Map or map[string]interface{} , and leverage nil field handling for conditio
Critical Conventions
Project Development Standards
- For complete projects (HTTP/microservices), install GoFrame CLI and use
gf initto create project scaffolding. See Project Creation - init for details. - Auto-generated code files (dao, do, entity) MUST NOT be manually created or modified per GoFrame conventions.
- Unless explicitly requested, do NOT use the
logic/directory for business logic. Implement business logic directly in theservice/directory. - Reference complete project examples:
- HTTP service best practice: user-http-service
- gRPC service best practice: user-grpc-service
Component Usage Standards
- Before creating new methods or variables, check if they already exist elsewhere and reuse existing implementations.
- Use the
gerrorcomponent for all error handling to ensure complete stack traces for traceability. - When exploring new components, prioritize GoFrame built-in components and reference best practice code from examples.
- Database Operations MUST use DO objects (
internal/model/do/), neverg.Mapormap[string]interface{}. DO struct fields areinterface{}; unset fields remainniland are automatically ignored by the ORM:// Good - use DO object dao.Users.Ctx(ctx).Where(cols.Id, id).Data(do.User{Uid: uid}).Update() // Good - conditional fields, unset fields are nil and ignored data := do.User{} if password != "" { data.PasswordHash = hash } if isAdmin != nil { data.IsAdmin = *isAdmin } dao.Users.Ctx(ctx).Where(cols.Id, id).Data(data).Update() // Good - explicitly set a column to NULL using gdb.Raw dao.Instances.Ctx(ctx).Where(cols.Id, id).Data(do.Instance{IdleSince: gdb.Raw("NULL")}).Update() // Bad - never use g.Map for database operations dao.Users.Ctx(ctx).Data(g.Map{cols.Uid: uid}).Update()
Code Style Standards
- Variable Declarations: When defining multiple variables, use a
varblock to group them for better alignment and readability:// Good - aligned and clean var ( authSvc *auth.Service bizCtxSvc *bizctx.Service k8sSvc *svcK8s.Service notebookSvc *notebook.Service middlewareSvc *middleware.Service ) // Avoid - scattered declarations authSvc := auth.New() bizCtxSvc := bizctx.New() k8sSvc := svcK8s.New() - Apply this pattern when you have 3 or more related variable declarations in the same scope.
Soft Delete & Time Maintenance
GoFrame provides automatic soft delete and time maintenance features. When a table contains created_at, updated_at, or deleted_at fields, the ORM handles these automatically.
Automatic Time Fields
| Field | Auto Behavior |
|---|---|
created_at |
Auto-written on Insert/InsertAndGetId, never modified afterward |
updated_at |
Auto-written on Insert/Update/Save |
deleted_at |
Auto-written on Delete (soft delete), auto-filtered on queries |
Critical Rules
1. NEVER manually set time fields - GoFrame handles these automatically:
// WRONG - redundant manual time setting
dao.User.Ctx(ctx).Data(do.User{
Name: "john",
CreatedAt: gtime.Now(), // REDUNDANT! Framework handles this
UpdatedAt: gtime.Now(), // REDUNDANT! Framework handles this
}).Insert()
// CORRECT - let framework handle time fields
dao.User.Ctx(ctx).Data(do.User{
Name: "john",
}).Insert()
2. NEVER manually add WhereNull(cols.DeletedAt) - GoFrame auto-adds soft delete filter:
// WRONG - redundant soft delete condition
dao.User.Ctx(ctx).
Where(do.User{Status: 1}).
WhereNull(cols.DeletedAt). // REDUNDANT! Framework auto-adds this
Scan(&list)
// CORRECT - framework auto-adds deleted_at IS NULL
dao.User.Ctx(ctx).
Where(do.User{Status: 1}).
Scan(&list)
3. Use Delete() for soft delete - Framework converts to UPDATE SET deleted_at = NOW():
// CORRECT - use Delete(), framework handles soft delete
dao.User.Ctx(ctx).Where(do.User{Id: id}).Delete()
// Actual SQL: UPDATE `sys_user` SET `deleted_at`=NOW() WHERE `id`=?
// WRONG - manual Update with deleted_at
dao.User.Ctx(ctx).
Where(do.User{Id: id}).
Data(do.User{DeletedAt: gtime.Now()}). // REDUNDANT!
Update()
Field Type Support
The deleted_at field supports multiple types:
- DateTime/Timestamp: Default, stores deletion time
- Integer: Stores Unix timestamp (seconds)
- Boolean: Stores 0/1 for deleted state
Configuration (Optional)
Time field names can be customized in config.yaml:
database:
default:
createdAt: "created_at" # Custom field name
updatedAt: "updated_at"
deletedAt: "deleted_at"
timeMaintainDisabled: false # Set true to disable this feature
GoFrame Documentation
Complete GoFrame development resources covering component design, usage, best practices, and considerations: GoFrame Documentation
GoFrame Code Examples
Rich practical code examples covering HTTP services, gRPC services, and various project types: GoFrame Examples
How to use goframe-v2 on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add goframe-v2
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches goframe-v2 from GitHub repository gogf/skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate goframe-v2. Access the skill through slash commands (e.g., /goframe-v2) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★71 reviews- ★★★★★Shikha Mishra· Dec 24, 2024
Registry listing for goframe-v2 matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Ganesh Mohane· Dec 20, 2024
goframe-v2 has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Ira Tandon· Dec 16, 2024
Keeps context tight: goframe-v2 is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★William Huang· Dec 16, 2024
goframe-v2 has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Luis Thomas· Dec 16, 2024
goframe-v2 reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Noor Haddad· Dec 12, 2024
goframe-v2 is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Ishan Taylor· Dec 8, 2024
Registry listing for goframe-v2 matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Sakshi Patil· Nov 11, 2024
Solid pick for teams standardizing on skills: goframe-v2 is focused, and the summary matches what you get after install.
- ★★★★★Luis Robinson· Nov 7, 2024
We added goframe-v2 from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★William Martinez· Nov 7, 2024
Solid pick for teams standardizing on skills: goframe-v2 is focused, and the summary matches what you get after install.
showing 1-10 of 71