From greenative-skills
Interact with the Greenative Platform Entity API to transfer data between storages, load CSVs into databases, and export database tables to CSV.
How this skill is triggered — by the user, by Claude, or both
Slash command
/greenative-skills:entityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
User request: $ARGUMENTS
User request: $ARGUMENTS
Transfer data between storage and database datasources on the Greenative Platform. All requests are POST to $GN_ENDPOINT with a base64-encoded JSON body.
Build the authorization header from the environment variables:
AUTH=$(printf "%s:%s" "$GN_KEY" "$GN_SECRET" | base64 | tr -d '\n')
Every request must include this header: -H "Authorization: Basic $AUTH"
The JSON body must include:
component: "entity"The JSON request body must be base64-encoded before sending. Use printf to build the JSON, pipe through base64, and pass via command substitution to curl -d:
AUTH=$(printf "%s:%s" "$GN_KEY" "$GN_SECRET" | base64 | tr -d '\n')
curl -s -X POST -H 'content-type: application/json' -H "Authorization: Basic $AUTH" \
-d "$(printf '{"component":"entity","action":"..."}' | base64)" \
"$GN_ENDPOINT"
All operations use the transfer action — behavior differs based on which parameters are provided.
Parameters:
from (required) — Source storage datasource nameto (required) — Destination storage datasource nameobject (required) — Specific object filename to transferAUTH=$(printf "%s:%s" "$GN_KEY" "$GN_SECRET" | base64 | tr -d '\n')
curl -s -X POST -H 'content-type: application/json' -H "Authorization: Basic $AUTH" \
-d "$(printf '{"component":"entity","action":"transfer","from":"storage1","to":"storage2","object":"data.csv"}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": "Transferred successfully", "status": "success"}
Parameters:
from (required) — Source storage datasource nameto (required) — Destination storage datasource namefilter (required) — String to match in object names (instead of object)AUTH=$(printf "%s:%s" "$GN_KEY" "$GN_SECRET" | base64 | tr -d '\n')
curl -s -X POST -H 'content-type: application/json' -H "Authorization: Basic $AUTH" \
-d "$(printf '{"component":"entity","action":"transfer","from":"storage1","to":"storage2","filter":"2024-04"}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": "Transferred successfully", "status": "success"}
Parameters:
from (required) — Storage datasource name (source)to (required) — Database datasource name (destination)object (required) — CSV filename in storagetable (required) — Target database table nameworker (required) — Number of parallel workersAUTH=$(printf "%s:%s" "$GN_KEY" "$GN_SECRET" | base64 | tr -d '\n')
curl -s -X POST -H 'content-type: application/json' -H "Authorization: Basic $AUTH" \
-d "$(printf '{"component":"entity","action":"transfer","from":"storage1","to":"db1","object":"data.csv","table":"my_table","worker":4}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": "Transferred successfully", "status": "success"}
Parameters:
from (required) — Database datasource name (source)to (required) — Storage datasource name (destination)table (required) — Source table name (the CSV file will be named after the table)AUTH=$(printf "%s:%s" "$GN_KEY" "$GN_SECRET" | base64 | tr -d '\n')
curl -s -X POST -H 'content-type: application/json' -H "Authorization: Basic $AUTH" \
-d "$(printf '{"component":"entity","action":"transfer","from":"db1","to":"storage1","table":"my_table"}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": "Transferred successfully", "status": "success"}
transfer action — the combination of parameters determines the transfer type.object for a single file or filter for multiple files matching a pattern.object, table, and worker parameters.table (the output CSV is named after the table).worker parameter controls parallelism for CSV-to-DB loading./datasource skill to list available datasources and verify connections before transferring.npx claudepluginhub greenative-ai/skills --plugin greenative-skillsMigrates data between formats (CSV/JSON/Excel/Parquet), databases (MySQL to PostgreSQL/SQLite), and API imports using pandas, pgloader, with backups, dry runs, and integrity checks.
Imports data into AWS data lake (S3 Tables or Iceberg) from S3 files, local uploads, JDBC (Oracle, PostgreSQL, MySQL, SQL Server, RDS), Redshift, Snowflake, BigQuery, DynamoDB, or Glue tables. For one-time loads, pipelines, migrations.
Automates archiving historical PostgreSQL/MySQL records to archive tables or S3/Azure Blob storage based on age or status, reducing primary database size.