Skills database
๐Ÿ“ฆ

database

Content revision r3 High Risk โšก Contains scriptsโš™๏ธ External commands๐Ÿ”‘ Env variables

Build Reliable Python Database Layers

Database layers often suffer from inconsistent sessions, schemas, and query patterns. This skill provides reusable SQLModel and SQLAlchemy examples for connections, repositories, migrations, optimization, and tests.

Supports: Claude Codex Code(CC)
โš ๏ธ 38 Poor

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "database" from https://skillstore.io/skills/azeem-2-database.md and its manifest at https://skillstore.io/api/skills/azeem-2-database/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.

Your Agent should still show its plan and request any confirmation required by the security policy.

Agent-readable resources

Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.

Test it

Using "database". Review a task repository that lists records by owner and supports pagination.

Expected outcome:

  • Finding: owner scoping is applied before optional filters.
  • Recommendation: cap page size and use typed filter fields.
  • Tests: verify cross-owner isolation, empty pages, and invalid limits.

Using "database". Plan a migration that adds a required status field to a large table.

Expected outcome:

  • Phase 1: add the nullable field without a table-wide default.
  • Phase 2: backfill records in monitored batches.
  • Phase 3: validate values, add the constraint, and define rollback.

Security Audit

High Risk
v12 โ€ข 7/23/2026 Open versioned report

Most alerts are false positives caused by SQLModel Session.exec and Markdown fences; they do not invoke Python, processes, or shells. The production example retains a default database credential, and generic repository writes accept unrestricted model fields.

1
Files scanned
745
Lines analyzed
1
Review items
0
False positives ignored

Confirmed security concerns (1)

High
Unrestricted Model Field Assignment
The generic create and update methods accept unrestricted dictionaries and assign every matching model field. Untrusted input could alter ownership, activation, identifier, or audit fields.
Both write paths take Dict[str, Any] without a typed input schema or field allowlist. The models define ownership and activation fields that these paths could overwrite.
Capability review items (1)

These are real local capabilities that may be expected for this skill, so they require review but are not counted as confirmed malicious behavior.

High
Database connection strings
"url": os.getenv("DATABASE_URL", "postgresql+asyncpg://user:pass@localhost/db"),
The production configuration falls back to the literal credential pair user:pass when DATABASE_URL is absent. Copying this pattern can create a predictable production credential instead of failing closed.
Audited by: codex View Audit History โ†’
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/azeem-2-database/audits/12?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/azeem-2-database/security.svg)](https://skillstore.io/skills/azeem-2-database?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/azeem-2-database?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/azeem-2-database/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/azeem-2-database.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

Azeem-2. (2026). database security audit report (audit version 12) [Author version unspecified]. Skillstore. https://skillstore.io/skills/azeem-2-database/audits/12

BibTeX citation

@techreport{azeem-2-azeem-2-database-2026, author = {Azeem-2}, title = {database security audit report (audit version 12)}, institution = {Skillstore}, year = {2026}, number = {12}, url = {https://skillstore.io/skills/azeem-2-database/audits/12}, note = {Author version unspecified} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "database security audit report (audit version 12)" version: "unspecified" type: report authors: - name: "Azeem-2" date-released: "2026-07-23" url: "https://skillstore.io/skills/azeem-2-database/audits/12" identifiers: - type: other value: "skillstore:azeem-2-database:audit:12" description: "Skillstore immutable audit report identifier"

Compare variants

2 installable variants

Each author remains a separate installable skill. The recommended variant is ranked by Skillstore evidence.

Why this variant is first

Highest Skillstore Score
sickn33 Recommended

sickn33-database

Skillstore Score 78
Evidence Confidence High
Skillstore usage 9
Updated

2026-08-21

Azeem-2 Current

azeem-2-database

Skillstore Score 38
Evidence Confidence Medium
Skillstore usage 9
Updated

2026-08-21

Skillstore Score

Why this score Evidence Confidence: Medium
55
Architecture
85
Maintainability
87
Content
71
Community
74
Spec Compliance

What You Can Build

Create an application data layer

Define models, sessions, repositories, and indexes for a new Python service.

Review production database design

Assess pooling, migrations, query plans, and PostgreSQL monitoring before deployment.

Build isolated database tests

Create fixtures and test cases for transactions, repositories, pagination, and tenant boundaries.

Try These Prompts

Create a starter schema
Design SQLModel models for [domain]. Include field types, relationships, constraints, and essential indexes. Explain each design choice.
Build an async repository
Create an AsyncSession repository for [model]. Include typed create and update inputs, pagination, transactions, rollback, and an explicit field allowlist.
Review a migration
Review this migration plan for [change]. Identify locking, data loss, rollback, index, and deployment risks. Propose safer steps.
Audit performance and isolation
Audit this database design for [workload]. Analyze query plans, pool sizing, tenant isolation, authorization boundaries, monitoring, and failure recovery.

Best Practices

  • Use typed create and update schemas with explicit field allowlists.
  • Require production connection URLs through secret management and fail when configuration is missing.
  • Test transactions, tenant isolation, migrations, and query plans before deployment.

Avoid

  • Do not copy placeholder credentials into production configurations.
  • Do not pass untrusted dictionaries directly into generic repository methods.
  • Do not mix synchronous session calls with asynchronous engines and request handlers.

Frequently Asked Questions

Does this skill connect to my database?
No. It provides guidance and examples for your agent to adapt within your project.
Which databases are covered?
The patterns target PostgreSQL, MySQL, and SQLite through SQLModel and SQLAlchemy.
Can I use the examples unchanged in production?
No. Validate session APIs, credentials, authorization, schema rules, and operational settings for your environment.
Can it help create migrations?
Yes. It can draft Alembic migration structures, indexes, constraints, upgrade steps, and rollback plans.
How should database secrets be handled?
Store them in an approved secret manager or protected environment variable. Production startup should fail when they are absent.
Does it support asynchronous applications?
Yes. Review each example for consistent AsyncSession types and awaited methods before integration.

Developer Details

Author

Azeem-2

License

MIT

Skillstore revision

r3

Version notice

The author did not declare a version.

Ref

89edfdc710d0846129dcee6a929477b04f08052c

Maintenance freshness

7/24/2026

Usage

8 downloads ยท 265 views

File structure

๐Ÿ“„ SKILL.md

More from Azeem-2

View all
View all