Apply Hex security best practices for secrets and access control.

MITAuto-check passedBackend & APIs

Install Hex Security Basics

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill hex-security-basics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace hex-security-basics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/hex-security-basics .claude/skills/hex-security-basics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hex-security-basics
GitHub stars
2.8k
Token cost
~1.4k tokens
SKILL.md length
381 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Apply Hex security best practices for secrets and access control.

  • Works in 5 steps: Scope credentials by environment and… → Validate parameters, origin, size, and… → Verify webhook authenticity before… → …
  • Securing API keys
  • SKILL.md covers Overview, API Key Management, Webhook Signature Verification and Input Validation, plus 9 more sections
  • Needs HEX_RUN_TOKEN and HEX_READ_TOKEN

What it does

Hex Security Basics is an agent skill from jeremylongshore/tons-of-skills-marketplace. Apply Hex security best practices for secrets and access control. Use when securing API keys, implementing least privilege access, or auditing Hex security configuration. Trigger with phrases like "hex security", "hex secrets", "secure hex", "hex API key security".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Authorization and RBAC and Security review. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Securing API keys
  • Implementing least privilege access
  • Auditing Hex security configuration
  • With phrases like hex security

Example prompts

  • “hex security”
  • “hex secrets”
  • “secure hex”
  • “/hex-security-basics”

Requirements

  • A credential in HEX_RUN_TOKEN
  • A credential in HEX_READ_TOKEN
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Grep

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Scope credentials by environment and project, inject them from the secret manager, and deny unknown scope or destination.
  2. Validate parameters, origin, size, and allowed project before starting a run; quarantine failures with opaque correlation IDs.
  3. Verify webhook authenticity before parsing, reject stale/replayed events, and store only bounded redacted envelopes.
  4. Test least-privilege and denied access with sandbox projects after every authorization or client change.
  5. Revoke suspected credentials immediately, cancel affected runs if integrity is uncertain, and preserve only redacted incident evidence.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.hex.tech
    • owasp.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • HEX_RUN_TOKEN
    • HEX_READ_TOKEN
    • HEX_WEBHOOK_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Hex Security Basics loads about 1.4k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 381 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 381 words, ~1,435 tokens.

Download SKILL.mdSave it as .claude/skills/hex-security-basics/SKILL.md (or your agent's skills folder).
name
hex-security-basics
description
Apply Hex security best practices for secrets and access control. Use when securing API keys, implementing least privilege access, or auditing Hex security configuration. Trigger with phrases like "hex security", "hex secrets", "secure hex", "hex API key security".
allowed-tools
Read, Write, Grep
compatibility
Designed for Claude Code
version
1.6.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, hex, data, analytics

Hex Security Basics

Overview

Hex is a collaborative data analytics platform where notebooks query production databases, generate visualizations, and share results across teams. Security concerns center on API token management (read vs run scopes), protecting database connection credentials embedded in Hex projects, and ensuring query results containing sensitive business data are not leaked through logs or exports. A compromised run-scope token can trigger arbitrary queries against connected databases.

API Key Management

typescript
function createHexClient(scope: "read" | "run"): { token: string; baseUrl: string } {
  const envVar = scope === "run" ? "HEX_RUN_TOKEN" : "HEX_READ_TOKEN";
  const token = process.env[envVar];
  if (!token) {
    throw new Error(`Missing ${envVar} — store in secrets manager, never in code`);
  }
  // Run tokens can trigger queries — use read tokens for monitoring
  console.log(`Hex client initialized with ${scope} scope (token suffix: ${token.slice(-4)})`);
  return { token, baseUrl: "https://app.hex.tech/api/v1" };
}

Webhook Signature Verification

typescript
import crypto from "crypto";
import { Request, Response, NextFunction } from "express";

function verifyHexWebhook(req: Request, res: Response, next: NextFunction): void {
  const signature = req.headers["x-hex-signature"] as string;
  const secret = process.env.HEX_WEBHOOK_SECRET!;
  const expected = crypto.createHmac("sha256", secret).update(req.body).digest("hex");
  if (!signature || !crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) {
    res.status(401).send("Invalid signature");
    return;
  }
  next();
}

Input Validation

typescript
import { z } from "zod";

const HexRunRequestSchema = z.object({
  project_id: z.string().uuid(),
  input_params: z.record(z.string(), z.unknown()).optional(),
  notify_on_completion: z.boolean().default(false),
  update_cache: z.boolean().default(false),
});

function validateHexRunRequest(data: unknown) {
  return HexRunRequestSchema.parse(data);
}

Data Protection

typescript
const HEX_SENSITIVE_FIELDS = ["db_connection_string", "query_results", "api_token", "input_params", "export_url"];

function redactHexLog(record: Record<string, unknown>): Record<string, unknown> {
  const redacted = { ...record };
  for (const field of HEX_SENSITIVE_FIELDS) {
    if (field in redacted) redacted[field] = "[REDACTED]";
  }
  return redacted;
}

Security Checklist

  • API tokens stored in secrets vault, never in code
  • Read-only tokens for monitoring, run tokens for orchestration only
  • Token expiration set to 90 days maximum
  • Separate tokens per environment (dev/staging/prod)
  • Pre-commit hook blocks hex_token_* patterns
  • Database connection credentials managed in Hex workspace settings
  • Query result exports reviewed for sensitive data before sharing
  • Notebook sharing permissions audited per team

Error Handling

VulnerabilityRiskMitigation
Leaked run-scope tokenArbitrary queries against production databasesSecrets vault + least-privilege scoping
Database credentials in notebooksConnection strings exposed to all collaboratorsHex workspace-managed connections
Query results in logsSensitive business data leakedField-level redaction pipeline
Overly broad notebook sharingConfidential analytics visible to wrong teamsPer-notebook permission scoping
No token expirationIndefinite access from compromised token90-day expiration policy

Prerequisites

  • A threat model naming token custodians, project/data owners, untrusted parameters, incident owner, and approved secret manager.
  • Low-privilege sandbox credentials and a project that contains no production-sensitive fixtures for verification.
  • Rotation, revocation, project-disable, and cancellation runbooks with tested rollback.
Show full SKILL.md (139 more words)Show less

Instructions

  1. Scope credentials by environment and project, inject them from the secret manager, and deny unknown scope or destination.
  2. Validate parameters, origin, size, and allowed project before starting a run; quarantine failures with opaque correlation IDs.
  3. Verify webhook authenticity before parsing, reject stale/replayed events, and store only bounded redacted envelopes.
  4. Test least-privilege and denied access with sandbox projects after every authorization or client change.
  5. Revoke suspected credentials immediately, cancel affected runs if integrity is uncertain, and preserve only redacted incident evidence.

Output

Return a security receipt with environment, project scope, secret-reference version, validation/authorization outcomes, rotation/revocation state, correlation ID, and rollback action. Never include tokens, SQL, output, or raw events.

Examples

env=staging; project=proj-sandbox-12; secret_ref=runner-v12; parameter_validation=pass; access=least-privilege; rollback=run-cancelled is an auditable control result.

Resources

Next Steps

See hex-prod-checklist.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/hex-security-basics of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Hex Security Basics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hex Security Basics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hex Security Basics this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.4kAutomated safety check: PassMIT
Sec Checkwaynesutton/markdown-site627—~753Automated safety check: PassMIT
Security Hardeningchmonitor/chmonitor300—~440Automated safety check: PassGPL-3.0
Django Access Reviewgetsentry/skills1k3 repos~2.6kAutomated safety check: NotesApache-2.0
Cb Security HardeningBlkLeg/CircuitBreaker201—~2.1kAutomated safety check: PassMIT
Gke Workload Securitygoogle/skills21k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Sec Check

    waynesutton/markdown-site

    Security review checklist for Convex functions, auth logic, public queries, admin routes, webhooks, uploads, and AI-generated code.

    627 GitHub stars~753 tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed
  • Security Hardening

    chmonitor/chmonitor

    RBAC configuration, row policies, quotas, network security, audit logging, and access control best practices.

    300 GitHub stars~440 tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Django Access Review

    getsentry/skills

    Official

    Django access control and IDOR security review. An agent skill from getsentry/skills.

    1k GitHub starsUsed in 3 repos~2.6k tokens
    Backend & APIsAuto-check: notes
  • Cb Security Hardening

    BlkLeg/CircuitBreaker

    Enforces Circuit Breaker security hardening conventions across backend, frontend, Docker, and nginx.

    201 GitHub stars~2.1k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Official

    Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces.

    21k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Implementing Conditional Access Policies Azure Ad

    mukul975/Anthropic-Cybersecurity-Skills

    Configures Microsoft Entra ID (Azure AD) Conditional Access policies for zero trust access control, covering signal-based policy design, device compliance requirements, risk-based authentication…

    34k GitHub stars~689 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Hex Security Basics

What does Hex Security Basics do?

Apply Hex security best practices for secrets and access control. Hex Security Basics is an agent skill from jeremylongshore/tons-of-skills-marketplace. Apply Hex security best practices for secrets and access control.

When should I use Hex Security Basics?

Hex Security Basics fits situations like: securing API keys; implementing least privilege access; auditing Hex security configuration; with phrases like hex security.

How do I install Hex Security Basics in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill hex-security-basics -a claude-code`. Or copy the skill folder (skills/.curated/hex-security-basics in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/hex-security-basics in your project. Claude Code loads it when a task matches its description.

How do I install Hex Security Basics in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill hex-security-basics -a codex`. Or copy the skill folder (skills/.curated/hex-security-basics in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/hex-security-basics in your project. Codex loads it when a task matches its description.

Can I use Hex Security Basics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill hex-security-basics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hex-security-basics, .gemini/skills/hex-security-basics, .github/skills/hex-security-basics and .opencode/skills/hex-security-basics in your project.

What does Hex Security Basics need to run?

Going by SKILL.md and its folder, Hex Security Basics needs credentials named HEX_RUN_TOKEN, HEX_READ_TOKEN and HEX_WEBHOOK_SECRET. Our summary lists: A credential in HEX_RUN_TOKEN; A credential in HEX_READ_TOKEN. Its frontmatter pre-approves these tools: Read, Write, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Hex Security Basics access the network?

SKILL.md names 2 domains. As links in the text: learn.hex.tech and owasp.org. This is read from the text; nothing was executed.

Is Hex Security Basics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hex Security Basics use?

Hex Security Basics is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hex Security Basics use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hex Security Basics?

Skills that share tags, products or a category with Hex Security Basics: Sec Check (waynesutton/markdown-site, 627 stars), Security Hardening (chmonitor/chmonitor, 300 stars), Django Access Review (getsentry/skills, 1k stars) and Cb Security Hardening (BlkLeg/CircuitBreaker, 201 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hex Security Basics?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.