From greenative-skills
Interact with the Greenative Platform KVS (Key-Value Store) API to manage stores and key-value entries.
How this skill is triggered — by the user, by Claude, or both
Slash command
/greenative-skills:kvsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
User request: $ARGUMENTS
User request: $ARGUMENTS
Manage key-value stores and entries 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: "kvs"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":"kvs","action":"..."}' | base64)" \
"$GN_ENDPOINT"
stores)No additional parameters required.
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":"kvs","action":"stores"}' | base64)" \
"$GN_ENDPOINT"
Response:
{
"data": [
{"id": "default", "registeredAt": "2024-04-24T09:42:29.628Z"}
],
"status": "success"
}
create)Creates a new entry. Fails if the key already exists — use put to overwrite.
Parameters:
key (required) — Entry keyvalue (required) — JSON object valuestore (optional) — Store name (defaults to "default")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":"kvs","action":"create","key":"user1","value":{"name":"Alice","age":30}}' | base64)" \
"$GN_ENDPOINT"
With explicit store:
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":"kvs","action":"create","key":"user1","value":{"name":"Alice"},"store":"mystore"}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": "user1", "status": "success"}
put)Creates or overwrites an entry. Use this when you want to update an existing key.
Parameters:
key (required) — Entry keyvalue (required) — JSON object valuestore (optional) — Store name (defaults to "default")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":"kvs","action":"put","key":"user1","value":{"name":"Alice","age":31}}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": "user1", "status": "success"}
get)Parameters:
key (required) — Entry keystore (optional) — Store name (defaults to "default")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":"kvs","action":"get","key":"user1"}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": {"name": "Alice", "age": 31}, "status": "success"}
delete)Parameters:
key (required) — Entry keystore (optional) — Store name (defaults to "default")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":"kvs","action":"delete","key":"user1"}' | base64)" \
"$GN_ENDPOINT"
Response:
{"data": "Entry deleted", "status": "success"}
keys)Parameters:
store (optional) — Store name (defaults to "default")filter (optional) — String to filter keys byAUTH=$(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":"kvs","action":"keys"}' | base64)" \
"$GN_ENDPOINT"
With filter:
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":"kvs","action":"keys","filter":"user","store":"mystore"}' | base64)" \
"$GN_ENDPOINT"
Response:
{
"data": [
{"id": "user1", "registeredAt": "2024-04-24T09:42:29.628Z", "updatedAt": "2024-04-24T10:15:00.000Z"}
],
"status": "success"
}
create fails if the key already exists; put overwrites if the key exists. Use create for insert-only semantics, put for upsert.store parameter defaults to "default" if omitted.1.0, 2.0) auto-convert to integer type.stores to discover available stores, then keys to browse entries within a store.npx claudepluginhub greenative-ai/skills --plugin greenative-skillsGuides Vercel KV setup and usage for Next.js caching, sessions, rate limiting, TTL storage. Covers best practices, atomic ops like incr/setnx, pipelines, error handling.
Provides Cloudflare Workers KV API for global edge key-value storage, including bindings, put/get/delete/list with TTL/metadata/pagination, caching, and handling KV_ERROR/429 limits.
Provides deep operational guidance for 15 key-value stores including Redis/Valkey (cluster, Streams), DynamoDB (single-table), etcd, and more. Use for production configuration, tuning, operations.