infisical-patterns

infisical-patterns is a skill for Claude Code, Codex from smicolon/ai-kit. It costs 54 tokens per session (2,108 once invoked), scanned A, original, MIT.

A set of Infisical conventions for naming secrets, organizing them into folders, binding a project to a workspace, and choosing authentication methods.

In plain words
What is it for?
Use it to configure .infisical.json, organize development and production secrets, choose UPPER_SNAKE_CASE names, and keep secret files out of Git.
Why use it?
It prevents environment settings from becoming inconsistent across services and makes it clearer which secrets each application can access.

Skill for Claude CodeCodex

Part of the infisical plugin — 3 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/smicolon/ai-kit/infisical-patterns
Any agent
npx skills add smicolon/ai-kit --skill infisical-patterns
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code, Codex.

Or install infisical, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for infisical-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/smicolon/ai-kit/infisical-patterns.svg)](https://agentmods.dev/skills/smicolon/ai-kit/infisical-patterns)
Your own site
<a href="https://agentmods.dev/skills/smicolon/ai-kit/infisical-patterns"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/infisical-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,108 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00054 $0.02108
Opus 5 $0.00027 $0.01054
Sonnet 5 $0.00011 $0.00422
Haiku 4.5 $0.00005 $0.00211

Measured today against content hash de910ea3dfad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

infisical-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packs/infisical/skills/infisical-patterns/SKILL.md · 297 lines

How it starts

The opening of the file, as written. The whole thing — 297 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Infisical Patterns

Core patterns for managing secrets with Infisical.

.infisical.json Convention

The .infisical.json file binds a project directory to an Infisical workspace:

{
  "workspaceId": "abc123-def456-ghi789",
  "defaultEnvironment": "dev",
  "gitBranchToEnvironmentMapping": null
}

Rules:

  • Commit .infisical.json to git (it contains no secrets, just workspace binding)
  • Do NOT commit .env, .env.local, or any file containing secret values

Secret Naming Convention

Use UPPER_SNAKE_CASE for all secret names:

# Correct
DATABASE_URL
REDIS_HOST
STRIPE_SECRET_KEY
AWS_ACCESS_KEY_ID

# Wrong
databaseUrl          # camelCase
redis-host           # kebab-case
stripe.secret.key    # dotted

Folder Organization

Organize secrets by consumer/service so each folder maps directly to an infisical run --path= invocation and machine identity scope.

Pattern A: By Consumer/Service (Recommended)

Best for multi-service projects. Each service gets exactly the secrets it needs via --path.

/ (root)                → Shared secrets (DATABASE_URL, REDIS_URL)
├── /backend            → Backend-only (JWT_SECRET, INTERNAL_API_KEY, SENTRY_DSN)
├── /frontend           → Frontend-only (NEXT_PUBLIC_API_URL, NEXT_PUBLIC_STRIPE_KEY)
├── /mobile             → Mobile-only (PUSH_NOTIFICATION_KEY, DEEP_LINK_SECRET)
└── /ci                 → CI/CD-only (DEPLOY_KEY, DOCKER_TOKEN, CODECOV_TOKEN)

Why this works:

  • infisical run --path=/backend injects root secrets + /backend secrets — exactly what backend needs
  • Machine identities scoped to /backend can't read /ci secrets
  • Maps to team ownership and deployment targets
# Backend gets shared + backend-only secrets
infisical run --env=production --path=/backend -- node server.js

# Frontend gets shared + frontend-only secrets
infisical run --env=production --path=/frontend -- npm run build

# CI gets shared + CI-only secrets
infisical run --env=production --path=/ci -- ./deploy.sh

# Set a secret in a service folder
infisical secrets set JWT_SECRET=supersecret --env=production --path=/backend

# List secrets for a specific service
infisical secrets --env=production --path=/backend

Read the full file on GitHub · 297 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +23 lines de910ea3dfad
  2. yesterday First seen · 274 lines · 54 tokens per session scan A 24afd7164b2f

Subscribe to this mod's changes

infisical-patterns is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 2,108 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.