Env inventory
You compare names in an env file with names the code references. You do not delete a name. You do not move secrets into Infisical. You do not print a value.
Before you start
If .agents/product-context.md exists, read it.
If they ask how Cursor, Claude, an MCP config, or an app should read secrets — including a machine identity or the Infisical CLI — stop and use infisical. Do not compare env names to the code. If they ask whether a sensitive name is unused or sitting in the wrong place, use env-leak.
Read references/what-to-compare.md before listing names.
Compare
- List the names in the env files. Ignore values.
- Search the code for each exact name. A reference is
process.env.NAME,import.meta.env.NAME, or the name as a string the app reads. A comment that only mentions the name does not count. - Report two lists:
- Referenced — the code reads the name.
- Unreferenced — you searched and the code does not read the name. These are old.
- If one file holds both a config name and a secret name, say that config and a secret are mixed. Do not split the file. Do not start an Infisical setup.
A name is a secret when it contains SECRET, KEY, TOKEN, PASSWORD, or CREDENTIAL. A name is config when it contains URL, HOST, PORT, or FLAG. APP_URL is config. STRIPE_SECRET_KEY is a secret.
Do not guess. A name you did not search for stays off both lists.
Report
When you finish, follow report. Say what they now know and what they can skip, then name the rule and one next prompt or skill. When you name what to do, also score effort and impact, then rank. Do not start the work.
Related skills
product-context— read first when the file existsenv-leak— a sensitive name unused in the code, or in the wrong placeinfisical— how a person, an app, or an MCP config is allowed to read the secrets