-
Notifications
You must be signed in to change notification settings - Fork 563
Feat/postgresql sql optimization #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
203776d
feat(autoskills): support shadcn-svelte and discriminate React shadcn
seba3567 c86df5e
feat(autoskills): add PostgreSQL and SQL optimization skills
seba3567 ca555eb
feat(autoskills): keep postgres-ruby separate and add postgresql sepa…
seba3567 feda5b9
fix(review): update review metadata to skipped and restrict postgresq…
seba3567 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/autoskills/skills-registry/postgres-best-practices/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| name: postgres-best-practices | ||
| description: Best practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use when writing SQL, designing database schemas, optimizing queries, or setting up a Postgres database. | ||
| --- | ||
|
|
||
| # Postgres Best Practices | ||
|
|
||
| Guidelines and best practices for working with Postgres, covering schema design, indexing, query optimization, and common pitfalls. | ||
|
|
||
| ## References | ||
|
|
||
| | Area | Resource | When to Use | | ||
| | -------------- | --------------------------------- | ------------------------------------------------ | | ||
| | Schema Design | `references/schema-design.md` | Designing tables, choosing data types, normalizing | |
9 changes: 9 additions & 0 deletions
9
.../autoskills/skills-registry/postgres-best-practices/references/schema-design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Schema Design | ||
|
|
||
| Best practices for designing Postgres schemas. | ||
|
|
||
| ## Choosing Data Types | ||
|
|
||
| - Prefer `text` over `varchar(n)` unless a length constraint is meaningful to the domain. | ||
| - Use `timestamptz` instead of `timestamp` to always store timezone-aware timestamps. | ||
| - Use `uuid` for primary keys when IDs may be exposed externally or generated client-side. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"skipped"queda clasificado implícitamente como"ok"en el fallback de seguridad.Al añadir
"skipped"en Line 35, el fallback desecurityCheckForEntry(Lines 232-240) sigue siendo binario ("flagged"vs resto), por lo que una skill no revisada puede terminar con estado"ok"cuando faltasecurityCheck. Esto degrada la señal de seguridad.Propuesta de ajuste (mapeo exhaustivo)
function securityCheckForEntry(skillName: string, entry: RegistryEntry): InstallSecurityCheck { if (entry.securityCheck) { return { name: skillName, status: entry.securityCheck.status, summary: entry.securityCheck.summary, findings: entry.securityCheck.findings, }; } + const reviewStatus = entry.review?.status; + const status: InstallSecurityCheck["status"] = + reviewStatus === "flagged" || reviewStatus === "skipped" ? "warning" : "ok"; + return { name: skillName, - status: entry.review?.status === "flagged" ? "warning" : "ok", + status, summary: entry.review?.summary || - (entry.review?.status === "flagged" + (reviewStatus === "flagged" || reviewStatus === "skipped" ? "The sync review found issues that should be checked." : "The sync review did not find security issues."), findings: entry.review?.flags || [], }; }📝 Committable suggestion
🤖 Prompt for AI Agents