repoforge: Skill for Claude Code

.claude/skills/backend/database/SKILL.md

manage-database-session is a skill for Claude Code from JNZader/repoforge. It costs 25 tokens per session (487 once invoked), scanned A, original, MIT.

A database development guide covering database connections, sessions, and models. A model describes how application data is stored in database tables.

In plain words
What is it for?
Use it when performing database operations, creating sessions with get_db(), or defining SQLAlchemy models and their table fields.
Why use it?
It provides consistent patterns for opening database sessions and defining the application’s data structures.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is JNZader/repoforge's own configuration. It tells Claude Code how to work on repoforge itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything repoforge configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JNZader/repoforge. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JNZader/repoforge/main/.claude/skills/backend/database/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/JNZader/repoforge

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for manage-database-session

README.md
[![agentmods](https://agentmods.dev/badge/skills/jnzader/repoforge/database/github.svg)](https://agentmods.dev/skills/jnzader/repoforge/database)
Your own site
<a href="https://agentmods.dev/skills/jnzader/repoforge/database"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/database/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for manage-database-session

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnzader/repoforge/database"><img src="https://agentmods.dev/badge/skills/jnzader/repoforge/database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 487 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.00487
Opus 5.5 $0.00010 $0.00195
Sonnet 5.5 $0.00005 $0.00097
Haiku 4.5 $0.00003 $0.00049

Measured 1mo ago against content hash 7e249d38adcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

manage-database-session scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/backend/database/SKILL.md · 91 lines

What it actually says

manage-database-session

This skill covers patterns for managing database sessions and models.

Trigger: Load when working with database interactions.

Quick Reference

Task Pattern
Create a database session get_db()
Define a database model Base

Critical Patterns (Summary)

  • Create a database session: Use get_db() to create a session for database operations.
  • Define a database model: Utilize Base to define your database models.

Critical Patterns (Detailed)

Create a database session

Use get_db() to create a session for database operations, ensuring proper management of database connections.

from apps.server.app.models.database import get_db

async def some_database_operation():
    async with get_db() as session:
        # Perform database operations
        pass

Define a database model

Utilize Base to define your database models, which will serve as the foundation for your ORM mappings.

from apps.server.app.models.database import Base
from sqlalchemy import Column, Integer, String

class User(Base):
    __tablename__ = 'users'
    
    id = Column(Integer, primary_key=True, index=True)
    name = Column(String, index=True)

When to Use

  • When creating a new database session for CRUD operations.
  • When defining new models for your database schema.

Commands

python -m alembic upgrade head

Anti-Patterns

Don't: Use raw SQL queries directly

Using raw SQL queries bypasses the ORM and can lead to security vulnerabilities and maintenance issues.

# BAD
async def raw_query():
    await db.execute("SELECT * FROM users")
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 91 lines · 25 tokens per session scan A 7e249d38adcd

Subscribe to this mod's changes

manage-database-session is a skill published in the GitHub repository JNZader/repoforge (5 stars, last pushed 24d ago), licensed MIT. It adds 25 tokens to every session and 487 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

benchling-integration

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

synthetic-sciences/openscience · 44 tokens

building-agents

Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…

ericrisco/rsc-harness · 85 tokens

duckdb-analyst

Use for any analytical question over ./data/.parquet. Prefer DuckDB, always show the SQL.

jin-bo/agentao · 27 tokens

database

Query and manage SQLite, PostgreSQL, and MySQL databases from the command line. Use when the user asks to run SQL queries, inspect database schemas, create or alter tables, import or export data, manage indexes, analyze query performance with EXPLAIN, back up or restore databases, or perform CRUD operations via…

bug-ops/zeph · 76 tokens

qdrant

Manage Qdrant vector database via REST API. Use when the user asks to create or delete collections, upsert or search vectors, inspect points, filter by payload fields, manage snapshots, check cluster status, or debug semantic search issues. Covers collection CRUD, point upsert/search/scroll/count, payload indexes…

bug-ops/zeph · 88 tokens

lamindb

This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological…

synthetic-sciences/openscience · 135 tokens