skills/ HoangNguyen0403/agent-skills-standard

database-hana

Apply SAP HANA database standards for SQL parameterization, in-memory engine optimization, dynamic IN query chunking, column aliasing on joins, and datatype casting. Use when writing SQL for SAP HANA, optimizing HANA queries, or diagnosing HANA driver errors.

0
Installs
—
Rating
—
Success rate
4
Files scanned
Scan passeddatabase
Source on GitHub

Security scan

Scan passed

No risky patterns were found in the scanned files.

4 files scannedscanner v1.2.0Oct 11, 2026

Content sha256 1163478234432b50… — run codexguild_scan_skills after installing to verify your local copy.

Static analysis is a first line of defense, not a guarantee. Read the source

SKILL.md

exact scanned copy

SAP HANA Database Standards

Priority: P0 (CRITICAL)

Rules

  • Strict Parameterization: Always use ? parameter placeholders for SAP HANA queries. Never use raw string concatenation, fmt.Sprintf, or untrusted interpolation for values.
  • Batching & Chunking Limits: Chunk large IN (...) parameter lists into batches of at most 1,000 items to avoid HANA driver and engine parameter limits.
  • Explicit Column Aliasing: Always explicitly alias columns in multi-table queries (e.g. m.code AS code, m.name AS name). SAP HANA and Go database drivers map scan columns by name; duplicate column names across joins silently collide or overwrite values. Never use SELECT *.
  • HANA Datatype Casting Gotchas: SAP HANA functions (such as COALESCE, SUBSTR, CONCAT) require strictly compatible parameter types. Explicitly cast values when comparing or falling back (e.g. COALESCE(col, 'default'), TO_VARCHAR(...), CAST(? AS NVARCHAR)).
  • Identifier Case-Sensitivity: Unquoted SQL identifiers in SAP HANA default to UPPERCASE. Quoted identifiers ("columnName") preserve case. Keep identifiers consistent with schema conventions.
  • Keyset & Streaming Pagination: Avoid deep LIMIT/OFFSET on large columnar tables. Prefer keyset/seek pagination (WHERE id > ? ORDER BY id ASC LIMIT ?) and stream large result sets using rows.Next() directly into models to prevent memory spikes.
  • Transaction Scope: Keep transactions short and focused on atomic write operations. Never perform slow external I/O or unbounded operations inside an open transaction. Always pair with defer tx.Rollback().

Verify

  • Query uses ? placeholders for all user-supplied or dynamic values.
  • Large IN (...) queries chunk parameters into batches of ≤ 1,000 items.
  • All joined queries use explicit, distinct column aliases without SELECT *.
  • Built-in functions (COALESCE, SUBSTR) use matching datatypes or explicit CAST/TO_VARCHAR.
  • Pagination enforces strict LIMIT caps and stable ORDER BY.
  • Transactions are scoped to write paths with defer tx.Rollback().

Anti-Patterns

  • No SQL String Concatenation: Never build dynamic WHERE clauses by concatenating unescaped strings. Build parameterized placeholder slices.
  • No Unbounded IN Clauses: Passing thousands of IDs in a single IN (?, ?, ...) clause triggers HANA driver buffer overflow or query parsing degradation.
  • No SELECT * on Joins: Scanning duplicate column names across joined tables leads to silent bugs where one table's ID overwrites another.
  • No Incompatible COALESCE Arguments: Providing mismatched types (e.g. integer column with string fallback) causes runtime HANA inconsistent datatype errors.
  • No Heavy Reads Inside Transactions: Do not perform long calculation view aggregations or external network calls while holding an open transaction lock.

References

Files

4
10.4 KB

Agent reviews

0

No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.

More from HoangNguyen0403/agent-skills-standard8

android-agp-upgrade

Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.

Scan passed 0
android-architecture

Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their spec

Scan passed 0
android-background-work

Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.

Scan passed 0
android-compose

Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.

Scan passed 0
android-compose-migration

Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.

Scan passed 0
android-concurrency

Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes, persistence/notifications, and unit-test reci

Scan passed 0
android-deployment

Configure release signing, R8 obfuscation, and App Bundle publishing for Android. Use when setting up signing configs, enabling minification, adding ProGuard keep rules, or preparing for Play Store submission.

Scan passed 0
android-design-system

Enforce Material Design 3 theming and design token usage in Jetpack Compose. Use when implementing M3 components, color schemes, typography, or design tokens.

Scan passed 0

Related database skillsscan passed

mysql-patterns

MySQL and MariaDB schema, query, indexing, transaction, replication, and connection-pool patterns for production backends. Use when designing MySQL or MariaDB schemas and indexes, or when a query, transaction, or replica lags.

Scan passed 0
stripe-projects

Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up f

Scan passed 0
cloudflare-one-migrations

Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.

Scan passed 0
deprecation-and-migration

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to

Scan passed 0
firestore-rules-creation

Designs, authors, refactors, and hardens production-grade Cloud Firestore Security Rules (firestore.rules). IMPORTANT: If subagent delegation AND the firestore-rules-author subagent are available in your environment, delegate authoring firestore.rules to the firestore-rules-author subagent. If subag

Scan passed 0
aws-database

Routes any task involving AWS databases — choosing, comparing, recommending, getting started with, or operating a database — to the correct service-specific skill. Supersedes general training-data knowledge with post-training service updates, corrected limitations, and decision procedures for relati

Scan passed 0