twelve-factor

twelve-factor is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 16 tokens per session (704 once invoked), scanned A, original, MIT.

A set of guidelines for building cloud-based software services. It covers how to manage code, dependencies, configuration, databases, processes, and deployment.

In plain words
What is it for?
Use it when building or moving web applications and services to platforms such as containers, Kubernetes, or serverless systems.
Why use it?
It provides consistent practices that make applications easier to deploy, scale, and run across cloud environments.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building or moving web applications and services to platforms such as containers, Kubernetes, or serverless systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/g1joshi/agent-skills/twelve-factor
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.

Any agent
npx skills add G1Joshi/Agent-Skills --skill twelve-factor
Clone the repo
git clone --depth 1 https://github.com/G1Joshi/Agent-Skills

Made for: Claude Code, Codex.

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 twelve-factor

README.md
[![agentmods](https://agentmods.dev/badge/skills/g1joshi/agent-skills/twelve-factor/github.svg)](https://agentmods.dev/skills/g1joshi/agent-skills/twelve-factor)
Your own site
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/twelve-factor"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/twelve-factor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for twelve-factor

Your own site · 80×15
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/twelve-factor"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/twelve-factor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 704 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00016 $0.00704
Opus 5 $0.00008 $0.00352
Sonnet 5 $0.00003 $0.00141
Haiku 4.5 $0.00002 $0.00070

Measured 8d ago against content hash dc675b0f0a28, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

twelve-factor 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 8d ago.

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.

skills/architecture/twelve-factor/SKILL.md · 72 lines

How it starts

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

Twelve-Factor App

The Twelve-Factor App methodology is a set of best practices for building software-as-a-service apps. In 2025, it remains the gold standard for Cloud Native microservices and containerized applications.

When to Use

  • ALWAYS, for any web application or service destined for the cloud (Kubernetes, PaaS, Serverless).
  • Migrating legacy apps to the cloud (Replatforming).

The Twelve Factors (2025 Context)

  1. Codebase: One codebase tracked in revision control (Git), many deploys.
  2. Dependencies: Explicitly declare and isolate dependencies (Docker, package.json). No system-wide installs.
  3. Config: Store config in the environment (Env Vars, Secrets Manager). Never in code.
  4. Backing Services: Treat backing services (DB, Queue, Cache) as attached resources (URL/Credentials).
  5. Build, Release, Run: Strictly separate build and run stages. CI/CD pipelines are mandatory.
  6. Processes: Execute the app as one or more stateless processes. State goes to backing services (Redis/DB).
  7. Port Binding: Export services via port binding (e.g., app.listen(8080)). No reliance on server injection (Tomcat).
  8. Concurrency: Scale out via the process model (Replicas in K8s).
  9. Disposability: Maximize robustness with fast startup and graceful shutdown (SIGTERM handling).
  10. Dev/Prod Parity: Keep development, staging, and production as similar as possible (Docker helps here).
  11. Logs: Treat logs as event streams. Do not write to files; write to stdout/stderr.
  12. Admin Processes: Run admin/management tasks as one-off processes (e.g., DB migrations) in the same environment.

Quick Start (Dockerized App)

# Dockerfile embodies dependencies, port binding, and build/run separation
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json .
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
# Dependencies
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
# Config via Env
ENV PORT=8080
# Port Binding
EXPOSE 8080
# Disposability (Process 1)
CMD ["node", "dist/main.js"]

Read the full file on GitHub · 72 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. 8d ago First seen · 72 lines · 16 tokens per session scan A dc675b0f0a28

Subscribe to this mod's changes

twelve-factor is a skill published in the GitHub repository G1Joshi/Agent-Skills (12 stars, last pushed 7mo ago), licensed MIT. It adds 16 tokens to every session and 704 once invoked, about $0.0001 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.