Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Assists with SAP HANA Developer CLI (hana-cli) for database development and administration. Use when: installing hana-cli, connecting to SAP HANA databases, inspecting database objects (tables, views, procedures, functions), managing HDI containers, executing SQL queries, converting metadata to CDS/EDMX/OpenAPI formats, managing SAP HANA Cloud instances, working with BTP CLI integration, or troubleshooting hana-cli commands. Covers: 91 commands, 17+ output formats, HDI container management, clou
.claude/skills/secondsky-sap-hana-cli/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 85% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 208% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 161% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 242% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 224% | 0% |
A developer-centric command-line interface for SAP HANA database development, particularly useful in non-SAP tooling environments like VS Code.
Repository: https://github.com/SAP-samples/hana-developer-cli-tool-example npm Package: https://www.npmjs.com/package/hana-cli Current Version: 3.202405.1 (April 2024) Node.js Requirement: ≥20.19.0
bash# Install globally via npm (recommended) npm install -g hana-cli # Verify installation hana-cli version
bash# Interactive connection setup hana-cli connect # Or specify connection directly hana-cli connect -n "hostname:port" -u DBUSER -p PASSWORD --save # Using service key (HANA Cloud) hana-cli connectViaServiceKey
The hana-mcp-server integration enables natural language database operations through Claude's Model Context Protocol. Use conversational queries alongside traditional CLI commands for a complete development workflow.
The bundled MCP config pins hana-mcp-server@0.3.4. Use sap-dependency-security before changing this pin because the server receives HANA tenant connection environment variables.
Required configuration (add to ~/.zshrc, ~/.bashrc, or project .env):
bashexport HANA_HOST="your-hana-host.hanacloud.ondemand.com" export HANA_PORT="443" export HANA_USER="DBADMIN" export HANA_PASSWORD="your-password" export HANA_ENCRYPT="true" # Optional, defaults to true export HANA_DATABASE="" # Optional, for MDC tenant export HANA_CONNECTION_TYPE="single-container" # Optional
| Scenario | Recommended Tool | Why | |----------|------------------|-----| | Exploratory queries, ad-hoc analysis | MCP | Natural language, no syntax needed | | Automation scripts, CI/CD pipelines | CLI | Scriptable, consistent output | | Learning database structure | MCP | Conversational discovery | | Generating CDS/EDMX/OpenAPI output | CLI | Supports 17+ formats | | Complex multi-step workflows | CLI | Fine-grained control | | Quick data sampling and inspection | MCP | Faster for one-off queries |
The hana-mcp-server provides these MCP tools:
list_schemas: Enumerate all schemaslist_tables: Show tables in a schemadescribe_table: Get table structure and metadataquery: Execute SQL queries from natural languagesample_data: Retrieve sample rowssystem_info: Database status and performancebash# 1. Use MCP to explore (natural language) "Show me all tables in the PRODUCTS schema" # 2. Use MCP to understand structure "Describe the PRODUCTS.INVENTORY table" # 3. Use CLI for format conversion (precise output) hana-cli inspectTable -t INVENTORY -s PRODUCTS -o cds # 4. Use CLI for HDI operations hana-cli createContainer -c MY_CONTAINER
| Command | Aliases | Purpose | |---------|---------|---------| | inspectTable | it, table | Inspect table structure | | inspectView | - | Inspect view definition | | inspectProcedure | - | Inspect stored procedure | | inspectFunction | - | Inspect function definition | | tables | - | List all tables in schema | | views | - | List all views in schema | | procedures | - | List stored procedures | | functions | - | List functions |
| Command | Aliases | Purpose | |---------|---------|---------| | querySimple | qs | Execute SQL query | | callProcedure | cp | Execute stored procedure | | hdbsql | - | Direct SQL execution |
| Command | Aliases | Purpose | |---------|---------|---------| | containers | cont | List HDI containers | | createContainer | - | Create new container | | dropContainer | - | Remove container | | activateHDI | - | Enable HDI service | | adminHDI | - | Administer HDI privileges |
| Command | Aliases | Purpose | |---------|---------|---------| | hanaCloudInstances | - | List HANA Cloud instances | | hanaCloudStart | - | Start cloud instance | | hanaCloudStop | - | Stop cloud instance | | btp | - | Configure BTP CLI | | btpInfo | - | Display BTP target info |
The --output / -o option supports 17+ formats:
| Format | Use Case | |--------|----------| | tbl | Human-readable table (default) | | json | JSON data | | yaml | YAML format | | csv | CSV export | | excel | Excel file | | cds | CAP CDS definitions | | hdbcds | HANA CDS format | | hdbtable | HDB Table definitions | | sql | SQL DDL statements | | edmx | OData EDMX metadata | | openapi | OpenAPI/Swagger spec | | graphql | GraphQL schema |
Connection credentials are searched in priority order:
default-env-admin.json (with --admin flag).cdsrc-private.json (via cds bind).env file with VCAP_SERVICES--conn parameterdefault-env.json in current/parent directories~/.hana-cli/default.jsonFor connection templates, see templates/default-env.json.
bash# Inspect table structure hana-cli inspectTable -s MYSCHEMA -t MYTABLE # Convert to CDS format hana-cli inspectTable -s MYSCHEMA -t MYTABLE -o cds
bash# Convert all objects in schema to CDS hana-cli massConvert -s MYSCHEMA
bash# Run query and export to JSON hana-cli querySimple -q "SELECT * FROM MYTABLE" -o json # Export to Excel file hana-cli querySimple -q "SELECT * FROM MYTABLE" -o excel -f ./output -n report
bash# List all containers hana-cli containers # Create new container hana-cli createContainer -c MY_CONTAINER -g MY_GROUP # Create container users hana-cli createContainerUsers -c MY_CONTAINER
Many commands have browser-based UI alternatives (suffix UI):
tablesUI - Browse tables visuallycontainersUI - Manage containers in browsermassConvertUI - Visual mass conversionquerySimpleUI - Query builder interfacesystemInfoUI - System dashboardFor comprehensive documentation:
references/command-reference.mdreferences/connection-security.mdreferences/hdi-management.mdreferences/output-formats.mdreferences/cloud-operations.mdreferences/db-inspection.mdreferences/mass-operations.mdreferences/system-admin.mdreferences/web-ui.mdreferences/troubleshooting.mdreferences/development-environment.mdreferences/abap-programming.mdbash# Check current connection status hana-cli status # Test with explicit credentials hana-cli connect -n "host:443" -u USER -p PASS --encrypt true # Use SSL trust store hana-cli connect --trustStore /path/to/certificate.pem
bash# Diagnose privilege errors hana-cli privilegeError # View current user info hana-cli inspectUser
references/command-reference.md - Complete command reference with all optionsreferences/abap-programming.md - ABAP-specific programming patternsreferences/development-environment.md - Development setup and environment guidancereferences/connection-security.md - Secure connection and credential handlingreferences/troubleshooting.md - Common errors and recovery stepstemplates/default-env.json - Local connection template for CAP-style bindingstemplates/cdsrc-private.json - CAP private configuration templateLast Updated: 2025-11-26 | Version: 1.1.0
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→pass | 11,993 | 2,327 | -81% | 1 | 1 | 0% | 1,865 | 3,447 | +85% | 0 | 0 | — |
case-05 | pass→pass | 10,123 | 2,705 | -73% | 1 | 1 | 0% | 1,839 | 3,494 | +90% | 0 | 0 | — |
case-01 | fail→pass | 7,327 | 3,653 | -50% | 1 | 1 | 0% | 1,258 | 3,869 | +208% | 0 | 0 | — |
case-02 | pass→pass | 7,705 | 2,145 | -72% | 1 | 1 | 0% | 1,426 | 3,467 | +143% | 0 | 0 | — |
case-03 | fail→pass | 8,040 | 3,888 | -52% | 1 | 1 | 0% | 1,439 | 3,754 | +161% | 0 | 0 | — |
case-06 | pass→pass | 6,418 | 2,091 | -67% | 1 | 1 | 0% | 1,070 | 3,476 | +225% | 0 | 0 | — |
case-07 | fail→pass | 5,643 | 2,504 | -56% | 1 | 1 | 0% | 1,048 | 3,579 | +242% | 0 | 0 | — |
case-08 | pass→pass | 6,178 | 2,787 | -55% | 1 | 1 | 0% | 1,093 | 3,539 | +224% | 0 | 0 | — |
case-09 | fail→pass | 6,678 | 3,277 | -51% | 1 | 1 | 0% | 1,119 | 3,626 | +224% | 0 | 0 | — |
case-10 | fail→pass | 7,143 | 2,688 | -62% | 1 | 1 | 0% | 1,163 | 3,527 | +203% | 0 | 0 | — |
case-11 | pass→pass | 6,498 | 2,763 | -57% | 1 | 1 | 0% | 1,159 | 3,556 | +207% | 0 | 0 | — |
case-12 | fail→pass | 5,132 | 2,336 | -54% | 1 | 1 | 0% | 882 | 3,460 | +292% | 0 | 0 | — |
case-13 | fail→pass | 9,443 | 2,935 | -69% | 1 | 1 | 0% | 1,604 | 3,529 | +120% | 0 | 0 | — |
case-19 | fail→pass | 5,036 | 2,370 | -53% | 1 | 1 | 0% | 795 | 3,467 | +336% | 0 | 0 | — |
case-14 | pass→pass | 5,813 | 3,070 | -47% | 1 | 1 | 0% | 997 | 3,517 | +253% | 0 | 0 | — |
case-15 | fail→pass | 5,284 | 1,675 | -68% | 1 | 1 | 0% | 1,001 | 3,389 | +239% | 0 | 0 | — |
case-16 | pass→pass | 4,499 | 2,794 | -38% | 1 | 1 | 0% | 709 | 3,505 | +394% | 0 | 0 | — |
case-17 | fail→pass | 6,323 | 2,333 | -63% | 1 | 1 | 0% | 1,121 | 3,537 | +216% | 0 | 0 | — |
case-18 | pass→pass | 6,149 | 2,321 | -62% | 1 | 1 | 0% | 1,026 | 3,533 | +244% | 0 | 0 | — |
case-20 | pass→pass | 5,126 | 3,974 | -22% | 1 | 1 | 0% | 919 | 3,732 | +306% | 0 | 0 | — |
case-21 | pass→pass | 3,579 | 2,674 | -25% | 1 | 1 | 0% | 580 | 3,496 | +503% | 0 | 0 | — |
case-22 | fail→pass | 7,345 | 2,439 | -67% | 1 | 1 | 0% | 1,225 | 3,481 | +184% | 0 | 0 | — |
case-23 | pass→fail | 5,798 | 6,099 | +5% | 1 | 1 | 0% | 1,049 | 4,267 | +307% | 0 | 0 | — |
case-24 | pass→pass | 5,358 | 4,330 | -19% | 1 | 1 | 0% | 942 | 3,890 | +313% | 0 | 0 | — |
case-25 | pass→pass | 9,671 | 4,336 | -55% | 1 | 1 | 0% | 1,753 | 3,855 | +120% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +44 percentage points is the difference between those two pass rates over the 25 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.