[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BRZG5KA5N9VS51AX22VSTW":3,"skill-same:01M7BRZG5KA5N9VS51AX22VSTW":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7BRZG5KA5N9VS51AX22VSTW","redshift-api",null,"Run SQL against Amazon Redshift — submit statements, poll status, page through results, and browse databases\u002Fschemas\u002Ftables. Use this whenever the user wants to query Redshift (provisioned cluster or Serverless), ask \"what tables are in this schema\", check a query's status, or mentions `redshift-data`, a Redshift cluster identifier \u002F workgroup name, or a `redshift-data.{region}.amazonaws.com` endpoint. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","thimslugga\u002Fagent-plugins","thimslugga","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F285055?v=4","01M7BRYXXABGR31PBN8YW9YYD3","Adam Kaminski","01M7BRYXY1GHRY2VCK15WG8NCZ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Faws\u002Fskills\u002Fredshift-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: redshift-api\ndescription: Run SQL against Amazon Redshift — submit statements, poll status, page through results, and browse databases\u002Fschemas\u002Ftables. Use this whenever the user wants to query Redshift (provisioned cluster or Serverless), ask \"what tables are in this schema\", check a query's status, or mentions `redshift-data`, a Redshift cluster identifier \u002F workgroup name, or a `redshift-data.{region}.amazonaws.com` endpoint. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.\n---\n\nIn the Amazon Redshift Data API, every call is a `POST` to `https:\u002F\u002Fredshift-data.\u003Cregion>.amazonaws.com\u002F` with\n`Content-Type: application\u002Fx-amz-json-1.1` and `X-Amz-Target: RedshiftData.\u003CAction>` — there are no\nREST-style paths. The API is fully asynchronous: submit a statement, get back an `Id`, poll\n`DescribeStatement` until done, then page results with `GetStatementResult` —\n`scripts\u002Frs_query.sh` (operation 1) drives that loop for you. The same calls work against\nprovisioned clusters and Serverless; only the connection-target field differs.\n\n## Request setup\n\nAuthentication is handled by the runtime — requests to this API are signed with credentials\nconfigured for the workspace, so there is nothing to set up. Do not try to obtain AWS keys or sign\nrequests yourself. A persistent `AccessDeniedException` means the credential isn't configured for\nthis workspace — report that instead of debugging auth.\n\nTwo pieces of configuration are real and required:\n\n**1. Region** — it's part of the endpoint hostname:\n\n```bash\nexport AWS_DEFAULT_REGION=\"us-east-1\"        # the region your cluster \u002F workgroup is in\n```\n\n**2. Connection target** — which cluster\u002Fworkgroup and database the Data API connects to. Pick one\nand put the matching JSON fields in `RS_TARGET`; the recipes below merge it into each request body:\n\n- **Serverless** — pass `WorkgroupName`. The configured identity is mapped to a database user.\n  Simplest.\n- **Provisioned, temporary credentials** — pass `ClusterIdentifier` and `DbUser`. The Data API\n  resolves database credentials under the hood.\n- **Provisioned or Serverless, Secrets Manager** — pass `SecretArn` pointing to a secret that holds\n  the database login.\n\nSet whichever applies once:\n\n```bash\nexport RS_DATABASE=\"dev\"\n# Serverless:\nexport RS_TARGET='{\"WorkgroupName\": \"my-workgroup\"}'\n# — or provisioned + temp creds:\n# export RS_TARGET='{\"ClusterIdentifier\": \"my-cluster\", \"DbUser\": \"my_user\"}'\n# — or either + Secrets Manager:\n# export RS_TARGET='{\"ClusterIdentifier\": \"my-cluster\", \"SecretArn\": \"arn:aws:secretsmanager:us-east-1:123456789012:secret:rs-creds-AbCdEf\"}'\n```\n\n**The helper used below.** One function wraps the endpoint, the headers, and the action name. The\n`Authorization` header is a placeholder — the runtime replaces it with a real signature.\n\n```bash\nrsapi() {\n  local action=\"$1\"\n  curl -sS \"https:\u002F\u002Fredshift-data.${AWS_DEFAULT_REGION}.amazonaws.com\u002F\" \\\n    -H \"Content-Type: application\u002Fx-amz-json-1.1\" \\\n    -H \"X-Amz-Target: RedshiftData.${action}\" \\\n    -H \"Authorization: placeholder\" \\\n    -d \"${2:?rsapi needs a JSON body as the second argument}\"\n}\n```\n\n**Sanity check** — list databases. A `200` with a `Databases` array confirms the workspace is wired\nup and the connection target is right. An error names which layer failed.\n\n```bash\nrsapi ListDatabases \"$(jq -n --argjson t \"$RS_TARGET\" --arg db \"$RS_DATABASE\" \\\n  '$t + {Database: $db}')\" | jq .\n```\n\n## Core operations\n\nEvery action that connects to the database takes the same merged target body —\n`$t + {Database: $db, ...}`. Errors come back as `{\"__type\": \"\u003CException>\", \"message\": \"...\"}`\ninstead of the expected shape; on any call, an absent top-level field (`Id`, `Status`, `Records`, …)\nmeans you got the error envelope — print it and stop.\n\n### 1. Run a query (`scripts\u002Frs_query.sh`)\n\nRun SQL through the bundled script (path is relative to this skill's directory): it submits with\n`ExecuteStatement`, polls `DescribeStatement` to a terminal state, pages `GetStatementResult` on\n`NextToken`, and decodes the typed one-key cell objects.\n\n```bash\nscripts\u002Frs_query.sh \\\n  'SELECT event_name, COUNT(*) AS n FROM public.events\n   WHERE event_date >= :start GROUP BY 1 ORDER BY 2 DESC LIMIT 20' \\\n  --param start=2024-01-01 --name top-events\n```\n\n- SQL is one argument (or stdin). Instance specifics come from `AWS_DEFAULT_REGION` \u002F `RS_TARGET` \u002F\n  `RS_DATABASE` above; `--database` overrides the database.\n- `--param NAME=VALUE` (repeatable) binds `:NAME` placeholders — values are always strings; the\n  database casts them. `--name` sets `StatementName` so the query shows up in `ListStatements`.\n- `--max-rows N` caps fetched rows (default 10000, `0` = everything); `--json` emits one JSON object\n  per row instead of TSV with a header. Statement id, status, duration, and row counts go to stderr.\n- Exit codes: `0` success, `1` submit failed or SQL `FAILED`\u002F`ABORTED` (the API's own message on\n  stderr), `2` gave up waiting after `--max-wait` seconds (default 600) — the statement id is on\n  stderr; resume it with operation 2.\n\nIf the script errors, read it — it's plain `curl` + `jq` — and debug against `references\u002Fapi.md`.\nFor `BatchExecuteStatement` and sub-statement results, session reuse (`SessionKeepAliveSeconds` \u002F\n`SessionId`), `ResultFormat: CSV`, cancelling, or catalog browsing, use the actions below.\n\n### 2. Resume a statement by id (`DescribeStatement` → `GetStatementResult`)\n\nWhen the script exits 2 (timeout) or you have a statement id from elsewhere, poll and fetch\ndirectly:\n\n```bash\nrsapi DescribeStatement \"$(jq -n --arg id \"$ID\" '{Id: $id}')\" \\\n  | jq '{Status, Duration, ResultRows, HasResultSet, Error}'\nrsapi GetStatementResult \"$(jq -n --arg id \"$ID\" '{Id: $id}')\" \\\n  | jq -r '.Records[]? | [.[] | if .isNull then null else to_entries[0].value end] | @tsv'\n```\n\n- `Status` ∈ `SUBMITTED`, `PICKED`, `STARTED`, `FINISHED`, `FAILED`, `ABORTED`. Only `FINISHED`\n  with `HasResultSet: true` has rows; `FAILED` carries the SQL error in `.Error`. `Duration` is\n  **nanoseconds**.\n- Result cells are typed one-key objects (see the gotcha under Error handling); column names\u002Ftypes\n  are in `.ColumnMetadata` on the first page. Further pages follow `NextToken` — no page-size knob;\n  `DescribeStatement.ResultRows` is the total up front.\n\n### 3. Cancel a running statement (`CancelStatement`)\n\n```bash\nrsapi CancelStatement \"$(jq -n --arg id \"$ID\" '{Id: $id}')\" | jq .\n# {\"Status\": true} on success — best-effort, check DescribeStatement to confirm.\n```\n\n### 4. Run multiple statements in one call (`BatchExecuteStatement`)\n\nAll statements run in one transaction — all commit or all roll back.\n\n```bash\nrsapi BatchExecuteStatement \"$(jq -n --argjson t \"$RS_TARGET\" --arg db \"$RS_DATABASE\" '$t + {\n    Database: $db,\n    Sqls: [\"CREATE TEMP TABLE tmp AS SELECT 1 AS x\", \"SELECT * FROM tmp\"]\n  }')\" | jq '{Id}'\n```\n\n`DescribeStatement` on the parent `Id` returns a `SubStatements[]` array. Each sub-statement has its\nown `Id` (the parent ID with a `:1`, `:2`, … suffix), `Status`, and `HasResultSet` — fetch each\nsub-statement's results with its own `GetStatementResult` call.\n\n### 5. List recent statements (`ListStatements`)\n\n```bash\nrsapi ListStatements '{\"MaxResults\": 20, \"Status\": \"ALL\"}' \\\n  | jq '.Statements[] | {Id, StatementName, Status, QueryString: (.QueryString[0:80]), CreatedAt}'\n```\n\n`Status` filter: `SUBMITTED`, `PICKED`, `STARTED`, `FINISHED`, `FAILED`, `ABORTED`, `ALL` — **only\nfinished statements are listed if you omit it**. `MaxResults` 0–100. `RoleLevel` defaults to `true`\n(includes statements from anyone assuming the same IAM role); set `false` to see only this session's.\n\n### 6. Browse the catalog (`ListDatabases` \u002F `ListSchemas` \u002F `ListTables` \u002F `DescribeTable`)\n\nAll four take the merged target body. Patterns use SQL `LIKE` wildcards (`%`, `_`).\n\n- **`ListDatabases`** — `Databases[]` (strings)\n- **`ListSchemas`** — `SchemaPattern` (optional) — `Schemas[]` (strings)\n- **`ListTables`** — `SchemaPattern`, `TablePattern` — `Tables[] {schema, name, type}` — `type` ∈ `TABLE`\u002F`VIEW`\u002F`SYSTEM TABLE`\u002F`GLOBAL TEMPORARY`\u002F`LOCAL TEMPORARY`\u002F`ALIAS`\u002F`SYNONYM`\n- **`DescribeTable`** — `Schema`, `Table` — `ColumnList[] {name, typeName, nullable, length, precision}`\n\n```bash\nrsapi ListTables \"$(jq -n --argjson t \"$RS_TARGET\" --arg db \"$RS_DATABASE\" \\\n  '$t + {Database: $db, SchemaPattern: \"public\", TablePattern: \"ev%\"}')\" | jq '.Tables'\n```\n\nJSON field names are PascalCase (`WorkgroupName`, not `workgroup-name`). All four are paginated\n(`NextToken`). See `references\u002Fapi.md` for every action's body shape.\n\n## Pagination\n\n`GetStatementResult`, `ListStatements`, `ListDatabases`, `ListSchemas`, `ListTables`, and\n`DescribeTable` all use the same scheme: the response carries `NextToken` when there's more; pass it\nback as `NextToken` in the next request body. Stop when it's absent.\n\n## Rate limits\n\n- **Active statements** — up to 500 active (`SUBMITTED`\u002F`STARTED`) per cluster or workgroup. Excess\n  submits fail with `ActiveStatementsExceededException`.\n- **Result size** — 500 MB per statement (after gzip) and 64 KB per row. Larger results fail; add a\n  `LIMIT` or use `UNLOAD ... TO 's3:\u002F\u002F...'`.\n- **Result retention** — 24 hours; after that `GetStatementResult` returns\n  `ResourceNotFoundException`.\n- **Statement duration** — 24 hours max. **Query string** — 100 KB max.\n- **API rate** — fixed, non-adjustable TPS quotas per account\u002Fregion: `DescribeStatement` 100,\n  `ExecuteStatement` 30, `GetStatementResult` 20, `BatchExecuteStatement` 20, and only **3 TPS** for\n  `CancelStatement`, `ListStatements`, `ListDatabases`, `ListSchemas`, `ListTables`, `DescribeTable`.\n  Exceeding one returns `ThrottlingException` (HTTP 400) — back off and don't poll in a hot loop.\n\n## Error handling\n\nErrors return as `{\"__type\": \"\u003CException>\", \"message\": \"...\"}` (HTTP 400\u002F403\u002F500). The `__type`\nfield is the discriminator.\n\n- **`ValidationException` (400)** — Bad parameters. Common: passing both `ClusterIdentifier` and `WorkgroupName`, or neither; missing `Database`; wrong field casing.\n- **`ActiveStatementsExceededException` (400)** — Too many in flight. `ListStatements` `{\"Status\":\"STARTED\"}` shows what's running.\n- **`ActiveSessionsExceededException` (400)** — >500 open sessions. Stop passing `SessionKeepAliveSeconds` or wait for idle ones to expire.\n- **`ExecuteStatementException` (500)** — Submission failed before the DB saw it — wrong cluster\u002Fworkgroup name, unreachable cluster, bad `DbUser`. Check `RS_TARGET`.\n- **`ResourceNotFoundException` (400)** — Statement ID unknown or > 24 h old.\n- **`BatchExecuteStatementException` (500)** — One statement in the batch failed; whole transaction rolled back. Check `SubStatements[].Error`.\n- **`DatabaseConnectionException` \u002F `QueryTimeoutException`** — A catalog call couldn't reach the database or timed out. Check the target is up; retry.\n- **`AccessDeniedException` (403)** — Credential needs `redshift-data:*` on the cluster\u002Fworkgroup ARN plus, depending on connection mode, `redshift:GetClusterCredentials` \u002F `redshift-serverless:GetCredentials` \u002F `secretsmanager:GetSecretValue`. Report which is missing.\n- **`InternalServerException` (500)** — `ExecuteStatement` is **not idempotent** unless you pass a `ClientToken` — check `ListStatements` before retrying a write.\n- **`Status: FAILED` on `DescribeStatement`** — SQL failed after submission. Read `.Error` for the SQL message.\n\nTwo gotchas:\n\n- **`ExecuteStatement` returning 200 ≠ the query succeeded.** SQL errors only surface later as\n  `Status: FAILED` on `DescribeStatement`. Always poll before fetching results.\n- **Cell values are typed one-key objects**, not bare values. `longValue` is a JSON number,\n  `isNull: true` is a distinct shape. A naive `.value` read returns nothing, and chaining jq `\u002F\u002F`\n  across the typed keys breaks on `false`\u002F`0`. Use `to_entries[0].value`.\n\n## Going deeper\n\n`references\u002Fapi.md` has the complete catalog — every action's request\u002Fresponse shape in PascalCase\nfor raw HTTP, the `SqlParameter` binding format, the `ColumnMetadata` fields, `SubStatementData` for\nbatches, session reuse (`SessionKeepAliveSeconds` \u002F `SessionId`), and the quota table. Read it when\nyou need an action not covered above or the exact raw-HTTP body shape.\n","In the Amazon Redshift Data API, every call is a `POST` to `https:\u002F\u002Fredshift-data.\u003Cregion>.amazonaws.com\u002F` with\n`Content-Type: application\u002Fx-amz-json-1.1` and `X-Amz-Target: RedshiftData.\u003CAction>` — there are no\nREST-style paths. The API is fully asynchronous: submit a statement, get back an `Id`, poll\n`DescribeStatement` until done, then page results with `GetStatementResult` —\n`scripts\u002Frs_query.sh` (operation 1) drives that loop for you. The same calls work against\nprovisioned clusters and Serverless; only the connection-target field differs.\n\n## Request setup\n\nAuthentication is handled by the runtime — requests to this API are signed with credentials\nconfigured for the workspace, so there is nothing to set up. Do not try to obtain AWS keys or sign\nrequests yourself. A persistent `AccessDeniedException` means the credential isn't configured for\nthis workspace — report that instead of debugging auth.\n\nTwo pieces of configuration are real and required:\n\n**1. Region** — it's part of the endpoint hostname:\n\n```bash\nexport AWS_DEFAULT_REGION=\"us-east-1\"        # the region your cluster \u002F workgroup is in\n```\n\n**2. Connection target** — which cluster\u002Fworkgroup and database the Data API connects to. Pick one\nand put the matching JSON fields in `RS_TARGET`; the recipes below merge it into each request body:\n\n- **Serverless** — pass `WorkgroupName`. The configured identity is mapped to a database user.\n  Simplest.\n- **Provisioned, temporary credentials** — pass `ClusterIdentifier` and `DbUser`. The Data API\n  resolves database credentials under the hood.\n- **Provisioned or Serverless, Secrets Manager** — pass `SecretArn` pointing to a secret that holds\n  the database login.\n\nSet whichever applies once:\n\n```bash\nexport RS_DATABASE=\"dev\"\n# Serverless:\nexport RS_TARGET='{\"WorkgroupName\": \"my-workgroup\"}'\n# — or provisioned + temp creds:\n# export RS_TARGET='{\"ClusterIdentifier\": \"my-cluster\", \"DbUser\": \"my_user\"}'\n# — or either + Secrets Manager:\n# export RS_TARGET='{\"ClusterIdentifier\": \"my-cluster\", \"SecretArn\": \"arn:aws:secretsmanager:us-east-1:123456789012:secret:rs-creds-AbCdEf\"}'\n```\n\n**The helper used below.** One function wraps the endpoint, the headers, and the action name. The\n`Authorization` header is a placeholder — the runtime replaces it with a real signature.\n\n```bash\nrsapi() {\n  local action=\"$1\"\n  curl -sS \"https:\u002F\u002Fredshift-data.${AWS_DEFAULT_REGION}.amazonaws.com\u002F\" \\\n    -H \"Content-Type: application\u002Fx-amz-json-1.1\" \\\n    -H \"X-Amz-Target: RedshiftData.${action}\" \\\n    -H \"Authorization: placeholder\" \\\n    -d \"${2:?rsapi needs a JSON body as the second argument}\"\n}\n```\n\n**Sanity check** — list databases. A `200` with a `Databases` array confirms the workspace is wired\nup and the connection target is right. An error names which layer failed.\n\n```bash\nrsapi ListDatabases \"$(jq -n --argjson t \"$RS_TARGET\" --arg db \"$RS_DATABASE\" \\\n  '$t + {Database: $db}')\" | jq .\n```\n\n## Core operations\n\nEvery action that connects to the database takes the same merged target body —\n`$t + {Database: $db, ...}`. Errors come back as `{\"__type\": \"\u003CException>\", \"message\": \"...\"}`\ninstead of the expected shape; on any call, an absent top-level field (`Id`, `Status`, `Records`, …)\nmeans you got the error envelope — print it and stop.\n\n### 1. Run a query (`scripts\u002Frs_query.sh`)\n\nRun SQL through the bundled script (path is relative to this skill's directory): it submits with\n`ExecuteStatement`, polls `DescribeStatement` to a terminal state, pages `GetStatementResult` on\n`NextToken`, and decodes the typed one-key cell objects.\n\n```bash\nscripts\u002Frs_query.sh \\\n  'SELECT event_name, COUNT(*) AS n FROM public.events\n   WHERE event_date >= :start GROUP BY 1 ORDER BY 2 DESC LIMIT 20' \\\n  --param start=2024-01-01 --name top-events\n```\n\n- SQL is one argument (or stdin). Instance specifics come from `AWS_DEFAULT_REGION` \u002F `RS_TARGET` \u002F\n  `RS_DATABASE` above; `--database` overrides the database.\n- `--param NAME=VALUE` (repeatable) binds `:NAME` placeholders — values are always strings; the\n  database casts them. `--name` sets `StatementName` so the query shows up in `ListStatements`.\n- `--max-rows N` caps fetched rows (default 10000, `0` = everything); `--json` emits one JSON object\n  per row instead of TSV with a header. Statement id, status, duration, and row counts go to stderr.\n- Exit codes: `0` success, `1` submit failed or SQL `FAILED`\u002F`ABORTED` (the API's own message on\n  stderr), `2` gave up waiting after `--max-wait` seconds (default 600) — the statement id is on\n  stderr; resume it with operation 2.\n\nIf the script errors, read it — it's plain `curl` + `jq` — and debug against `references\u002Fapi.md`.\nFor `BatchExecuteStatement` and sub-statement results, session reuse (`SessionKeepAliveSeconds` \u002F\n`SessionId`), `ResultFormat: CSV`, cancelling, or catalog browsing, use the actions below.\n\n### 2. Resume a statement by id (`DescribeStatement` → `GetStatementResult`)\n\nWhen the script exits 2 (timeout) or you have a statement id from elsewhere, poll and fetch\ndirectly:\n\n```bash\nrsapi DescribeStatement \"$(jq -n --arg id \"$ID\" '{Id: $id}')\" \\\n  | jq '{Status, Duration, ResultRows, HasResultSet, Error}'\nrsapi GetStatementResult \"$(jq -n --arg id \"$ID\" '{Id: $id}')\" \\\n  | jq -r '.Records[]? | [.[] | if .isNull then null else to_entries[0].value end] | @tsv'\n```\n\n- `Status` ∈ `SUBMITTED`, `PICKED`, `STARTED`, `FINISHED`, `FAILED`, `ABORTED`. Only `FINISHED`\n  with `HasResultSet: true` has rows; `FAILED` carries the SQL error in `.Error`. `Duration` is\n  **nanoseconds**.\n- Result cells are typed one-key objects (see the gotcha under Error handling); column names\u002Ftypes\n  are in `.ColumnMetadata` on the first page. Further pages follow `NextToken` — no page-size knob;\n  `DescribeStatement.ResultRows` is the total up front.\n\n### 3. Cancel a running statement (`CancelStatement`)\n\n```bash\nrsapi CancelStatement \"$(jq -n --arg id \"$ID\" '{Id: $id}')\" | jq .\n# {\"Status\": true} on success — best-effort, check DescribeStatement to confirm.\n```\n\n### 4. Run multiple statements in one call (`BatchExecuteStatement`)\n\nAll statements run in one transaction — all commit or all roll back.\n\n```bash\nrsapi BatchExecuteStatement \"$(jq -n --argjson t \"$RS_TARGET\" --arg db \"$RS_DATABASE\" '$t + {\n    Database: $db,\n    Sqls: [\"CREATE TEMP TABLE tmp AS SELECT 1 AS x\", \"SELECT * FROM tmp\"]\n  }')\" | jq '{Id}'\n```\n\n`DescribeStatement` on the parent `Id` returns a `SubStatements[]` array. Each sub-statement has its\nown `Id` (the parent ID with a `:1`, `:2`, … suffix), `Status`, and `HasResultSet` — fetch each\nsub-statement's results with its own `GetStatementResult` call.\n\n### 5. List recent statements (`ListStatements`)\n\n```bash\nrsapi ListStatements '{\"MaxResults\": 20, \"Status\": \"ALL\"}' \\\n  | jq '.Statements[] | {Id, StatementName, Status, QueryString: (.QueryString[0:80]), CreatedAt}'\n```\n\n`Status` filter: `SUBMITTED`, `PICKED`, `STARTED`, `FINISHED`, `FAILED`, `ABORTED`, `ALL` — **only\nfinished statements are listed if you omit it**. `MaxResults` 0–100. `RoleLevel` defaults to `true`\n(includes statements from anyone assuming the same IAM role); set `false` to see only this session's.\n\n### 6. Browse the catalog (`ListDatabases` \u002F `ListSchemas` \u002F `ListTables` \u002F `DescribeTable`)\n\nAll four take the merged target body. Patterns use SQL `LIKE` wildcards (`%`, `_`).\n\n- **`ListDatabases`** — `Databases[]` (strings)\n- **`ListSchemas`** — `SchemaPattern` (optional) — `Schemas[]` (strings)\n- **`ListTables`** — `SchemaPattern`, `TablePattern` — `Tables[] {schema, name, type}` — `type` ∈ `TABLE`\u002F`VIEW`\u002F`SYSTEM TABLE`\u002F`GLOBAL TEMPORARY`\u002F`LOCAL TEMPORARY`\u002F`ALIAS`\u002F`SYNONYM`\n- **`DescribeTable`** — `Schema`, `Table` — `ColumnList[] {name, typeName, nullable, length, precision}`\n\n```bash\nrsapi ListTables \"$(jq -n --argjson t \"$RS_TARGET\" --arg db \"$RS_DATABASE\" \\\n  '$t + {Database: $db, SchemaPattern: \"public\", TablePattern: \"ev%\"}')\" | jq '.Tables'\n```\n\nJSON field names are PascalCase (`WorkgroupName`, not `workgroup-name`). All four are paginated\n(`NextToken`). See `references\u002Fapi.md` for every action's body shape.\n\n## Pagination\n\n`GetStatementResult`, `ListStatements`, `ListDatabases`, `ListSchemas`, `ListTables`, and\n`DescribeTable` all use the same scheme: the response carries `NextToken` when there's more; pass it\nback as `NextToken` in the next request body. Stop when it's absent.\n\n## Rate limits\n\n- **Active statements** — up to 500 active (`SUBMITTED`\u002F`STARTED`) per cluster or workgroup. Excess\n  submits fail with `ActiveStatementsExceededException`.\n- **Result size** — 500 MB per statement (after gzip) and 64 KB per row. Larger results fail; add a\n  `LIMIT` or use `UNLOAD ... TO 's3:\u002F\u002F...'`.\n- **Result retention** — 24 hours; after that `GetStatementResult` returns\n  `ResourceNotFoundException`.\n- **Statement duration** — 24 hours max. **Query string** — 100 KB max.\n- **API rate** — fixed, non-adjustable TPS quotas per account\u002Fregion: `DescribeStatement` 100,\n  `ExecuteStatement` 30, `GetStatementResult` 20, `BatchExecuteStatement` 20, and only **3 TPS** for\n  `CancelStatement`, `ListStatements`, `ListDatabases`, `ListSchemas`, `ListTables`, `DescribeTable`.\n  Exceeding one returns `ThrottlingException` (HTTP 400) — back off and don't poll in a hot loop.\n\n## Error handling\n\nErrors return as `{\"__type\": \"\u003CException>\", \"message\": \"...\"}` (HTTP 400\u002F403\u002F500). The `__type`\nfield is the discriminator.\n\n- **`ValidationException` (400)** — Bad parameters. Common: passing both `ClusterIdentifier` and `WorkgroupName`, or neither; missing `Database`; wrong field casing.\n- **`ActiveStatementsExceededException` (400)** — Too many in flight. `ListStatements` `{\"Status\":\"STARTED\"}` shows what's running.\n- **`ActiveSessionsExceededException` (400)** — >500 open sessions. Stop passing `SessionKeepAliveSeconds` or wait for idle ones to expire.\n- **`ExecuteStatementException` (500)** — Submission failed before the DB saw it — wrong cluster\u002Fworkgroup name, unreachable cluster, bad `DbUser`. Check `RS_TARGET`.\n- **`ResourceNotFoundException` (400)** — Statement ID unknown or > 24 h old.\n- **`BatchExecuteStatementException` (500)** — One statement in the batch failed; whole transaction rolled back. Check `SubStatements[].Error`.\n- **`DatabaseConnectionException` \u002F `QueryTimeoutException`** — A catalog call couldn't reach the database or timed out. Check the target is up; retry.\n- **`AccessDeniedException` (403)** — Credential needs `redshift-data:*` on the cluster\u002Fworkgroup ARN plus, depending on connection mode, `redshift:GetClusterCredentials` \u002F `redshift-serverless:GetCredentials` \u002F `secretsmanager:GetSecretValue`. Report which is missing.\n- **`InternalServerException` (500)** — `ExecuteStatement` is **not idempotent** unless you pass a `ClientToken` — check `ListStatements` before retrying a write.\n- **`Status: FAILED` on `DescribeStatement`** — SQL failed after submission. Read `.Error` for the SQL message.\n\nTwo gotchas:\n\n- **`ExecuteStatement` returning 200 ≠ the query succeeded.** SQL errors only surface later as\n  `Status: FAILED` on `DescribeStatement`. Always poll before fetching results.\n- **Cell values are typed one-key objects**, not bare values. `longValue` is a JSON number,\n  `isNull: true` is a distinct shape. A naive `.value` read returns nothing, and chaining jq `\u002F\u002F`\n  across the typed keys breaks on `false`\u002F`0`. Use `to_entries[0].value`.\n\n## Going deeper\n\n`references\u002Fapi.md` has the complete catalog — every action's request\u002Fresponse shape in PascalCase\nfor raw HTTP, the `SqlParameter` binding format, the `ColumnMetadata` fields, `SubStatementData` for\nbatches, session reuse (`SessionKeepAliveSeconds` \u002F `SessionId`), and the quota table. Read it when\nyou need an action not covered above or the exact raw-HTTP body shape.\n",{"name":5,"description":7},"main","62177b0f31651c18aefb738bccb54168b8a5a982","plugins\u002Faws\u002Fskills\u002Fredshift-api","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins","https:\u002F\u002Fgithub.com\u002Fthimslugga","https:\u002F\u002Fadamkaminski.com","I am interested in Linux, macOS, Python, Golang, Rust and Networking.\r\n\r\nOpinions expressed are my own and may not be the views of my employer.","2026-11-11 02:10:30",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add thimslugga\u002Fagent-plugins --skill redshift-api",{"tool":38,"command":39},"bunx","bunx skills add thimslugga\u002Fagent-plugins --skill redshift-api",{"tool":41,"command":42},"pnpm","pnpm dlx skills add thimslugga\u002Fagent-plugins --skill redshift-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Faws\u002Fskills\u002Fredshift-api\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fapi.md","REFERENCE","参考文档",11063,"https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Faws\u002Fskills\u002Fredshift-api\u002Freferences\u002Fapi.md",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"scripts\u002Frs_query.sh","SCRIPT","脚本",8875,"https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Faws\u002Fskills\u002Fredshift-api\u002Fscripts\u002Frs_query.sh",[59,66,73,80,86,93],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7BSDA3CNHHP07666X3H90CB","shell-script-expert","Use when the user asks \"review this script\", \"write a bash script\", \"fix my shell script\", \"make this script safer\", \"why does this script fail\", \"convert this to a script\", or working with .sh\u002F.bash files, sh\u002Fbash syntax, shellcheck, cronjobs, and bash one-liners.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fshell-script-expert\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7BSD6STC24Q13N4J8E0T93X","prose-synthesize","Turn unstructured notes into a structured, actionable plan. Use when given brain dumps, stream-of-consciousness, or scattered thoughts needing order.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fprose-synthesize\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7BSD16KRRWFMM3EN1WPK8G3","prose-distill","Condense verbose text to its essence.  Use when asked to condense, tighten, shorten, reduce verbosity, or omit needless words while preserving substance.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fprose-distill\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7BSCYJWSP5VJK3822XRNXR2","mindcraft","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fmindcraft\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7BSCRQ1GCDCTPNZ3WA3R0JE","learn","Tutor for intellectual understanding: teach how or why something works rather than complete a task or provide an evaluative verdict.\nTrigger for explicit learning requests (teach, explain, ELI5, walkthroughs, quizzes, flashcards, definitions); terse concept prompts; confusion signals; prerequisite or sequencing questions; and conceptual questions about mechanisms, causes, or dynamics.\nDo not trigger for task completion (coding, writing, calculation, or translation), factual or news lookup, personal troubleshooting, resource recommendations, or opinion and interpretive verdicts.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Flearn\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7BSCNAY02WX6BGDW06Y60D9","deployment-readiness","Use to check deployment readiness of a host.","https:\u002F\u002Fgithub.com\u002Fthimslugga\u002Fagent-plugins\u002Fblob\u002Fmain\u002Fskills\u002Fdeployment-readiness\u002FSKILL.md",[],[]]