SuperAPI AI Directory

sdd-checar-ambiente

General & other

View repository

Updated 10-16 01:14

About this skill

Check environment

Answer one question: is this environment ready to work with SDD here? In seconds, without changing anything, saying what to fix.

How to run

With bash available (macOS, Linux, or Git Bash on Windows), run the script that comes with this skill, from inside the project folder:

bash <pasta desta skill>/scripts/checar.sh

and reply with its output, exactly as it came — no sentence before, no sentence after, no comment on what was or was not checked, no translation. The script already does all the checks below and already prints the report in the right format; the format does not depend on you. (This skill's folder is the one containing this SKILL.md: .claude/skills/sdd-checar-ambiente/ or .agents/skills/sdd-checar-ambiente/, in the project or in the agent's global folder.)

Without bash (pure PowerShell), do the checks below by hand and reply in the same format as the script: blocks 🔴 Dado exposto, 🔴 Impede o trabalho and ⚠️ Vale arrumar only if they have items, and lastly the line ✅ Pronto: repo … (or ✅ Repo … when there is a problem). A check that passed or does not apply is not mentioned outside that line. End the ✅ line with this skill's identification: sdd-checar-ambiente v1.0.0 · out/2026 · versão atual: https://github.com/robertodiasduarte/sdd-starter/releases/latest (the script does this on its own, reading the version of this file).

Rules

  • Read-only. Do not install, do not configure, do not fix, do not create a file. Deliver the command; the user runs it, after seeing what they are authorizing. The only network output is an anonymous query to GitHub, of up to 3 seconds, to find out whether the repository is public; if it fails, say nothing about it.
  • Do not invent problems. Without a versioned .env.example do not complain about a missing .env Without package.json, do not talk about node_modules or npm. Without .env in the folder, do not talk about .gitignore. A public repository, on its own, is not a problem. A .pem with a public certificate is not a secret. A false alarm teaches you to ignore all the others.
  • Order by consequence, not by category. What blocks comes before what annoys.
  • Find out, do not ask. Everything below is found out by running commands.
  • Works in any shell. The commands for git are the same in bash, zsh, and PowerShell. To find out whether a program exists, use command -v <nome> in bash/zsh or Get-Command <nome> in PowerShell.

What to check, in this order

1. Where I am

  • git rev-parse --show-toplevel — is it a git repository? If not , that is the most important finding: say it on the first line (probably the terminal was opened in the wrong folder, or the project does not have git yet — git init).
  • Folder, current branch (git branch --show-current) and whether there are uncommitted changes (git status --short).

2. Available agents

  • claude --version and codex --version — record the version of each one that exists.
  • Which of them is running this skill right now.

3. Usable Git

  • git --version.
  • git config user.name and git config user.email. Without both, the first commit fails with a message that does not clearly say what to do. The command that fixes it: git config --global user.name "Seu Nome" and git config --global user.email "voce@exemplo.com".
  • git remote -v — is there a remote? What is its main branch (git remote show origin, line "HEAD branch")?

4. Work fronts (worktrees)

  • git worktree list — the 1st line is the main checkout, is not a front. Open fronts = the following lines. Only the main checkout ⇒ "no open fronts" (saying "1 open front" here describes a state that does not exist).
  • Orphan worktree: list entry marked prunable, or whose folder no longer exists (someone deleted the folder by hand). Command: git worktree prune.
  • Front already integrated still open: branch of a worktree that is not the main checkout nor the main branch itself and that is already contained in the main one (git branch --merged origin/<principal>) and that had its own commit (git reflog show <branch> has some entry commit). Branch contained in the main one without its own commit is a newly opened front, not integrated — do not suggest removing it. Command for the integrated one: git worktree remove <pasta> and then git branch -d <branch>.
  • If sdd/ambiente.md exists in the main checkout (the first line of git worktree list --porcelain), read it: it says the main branch and where the fronts are. An untracked sdd/ in the main checkout is that file — not a problem.

5. Project tools

  • package.json present and node_modules absent ⇒ missing npm install (without it the first command of the project fails with an error that looks like something else); composer.json without vendor/, same thing — both are 🔴. requirements.txt without a virtual environment in the folder is ⚠️: the dependencies may be installed outside it.
  • .env.example versioned and no .env ⇒ the local configuration is missing (copy the example and fill it in).
  • Editor in PATH: code, cursor or subl (in this order). No editor is not a problem — it does not go into 🔴 or ⚠️; if there is one, mention it in the ✅ summary.

6. Client data and secrets (the office computer has client data and an A1 certificate)

  • Already saved in git (git ls-files): .env or .env.* (except .env.example and .env.sample), .pfx, .p12, and .pem that contains PRIVATE KEY (git grep --cached -l "PRIVATE KEY" -- '*.pem'). Each one is 🔴 Exposed data, with the command git rm --cached "<arquivo>" && echo "<arquivo>" >> .gitignore and the measure that actually protects: change the passwords (.env), revoke the certificate with the certificate authority and issue another one (.pfx/.p12), generate a new key (.pem). Removing it from git does not erase it from the history — say that.
  • Public repository: if the origin is GitHub's, check https://api.github.com/repos/<dono>/<repo> without logging in (200 = public; private responds 404), or gh repo view --json visibility. Public only appears in the summary ✅ ("repo x (public on GitHub)"); with data exposed, the item says the file is already on the internet.
  • .env outside .gitignore: exists .env in the folder, is not tracked, and git check-ignore -q .env fails ⇒ ⚠️, echo ".env" >> .gitignore.
  • npm without ignore-scripts: there is package.json, npm exists and npm config get ignore-scripts is not true ⇒ ⚠️, npm config set ignore-scripts true, warning that a package that depends on an install script comes back with npm rebuild <pacote> --ignore-scripts=false.

For an alarm that blocks the next commit with client data, the skill is sdd-higiene-dado (installs with OK); this one only diagnoses.

How to report

Do not deliver a long report: whoever runs this wants to be unblocked, not to read. Four blocks, in this order, omitting the empty ones:

  1. 🔴 Data exposed — password, certificate, or private key already saved in git. Each item with the command and the measure that protects it (change password, revoke certificate).
  2. 🔴 Blocks the work — not a git repository, git without an identity, missing dependencies. Each item with the exact command that solves it, ready to copy.
  3. ⚠️ Worth fixing — .env outside .gitignore, npm without ignore-scripts (these first), orphan worktree, integrated front still open, .env missing.
  4. ✅ One-line summary, ending with the identification of this skill — e.g.: ✅ Pronto: repo meu-app, branch main, 2 frentes abertas, Claude Code 2.1 · sdd-checar-ambiente v1.0.0 · out/2026 · versão atual: https://github.com/robertodiasduarte/sdd-starter/releases/latest

If everything is fine, the entire response is exactly the ✅ line — no sentence before or after: no "All clean", no list of what was checked, no offer of help. A healthy environment does not deserve a paragraph; whoever wants detail asks.

Examples

Healthy:

✅ Pronto: repo meu-app, branch main, nenhuma frente aberta, Claude Code 2.1 · sdd-checar-ambiente v1.0.0 · out/2026 · versão atual: https://github.com/robertodiasduarte/sdd-starter/releases/latest

With the A1 certificate saved in the git of a public repository:

🔴 Dado exposto
- O certificado digital certificados/empresa.pfx está salvo no git. Este repositório é público: o arquivo já está na internet.
  git rm --cached "certificados/empresa.pfx" && echo "certificados/empresa.pfx" >> .gitignore
  Depois, revogue o certificado com a autoridade certificadora e emita outro.

✅ Repo meu-app (público no GitHub), branch main, nenhuma frente aberta, Claude Code 2.1 · sdd-checar-ambiente v1.0.0 · out/2026 · versão atual: https://github.com/robertodiasduarte/sdd-starter/releases/latest

With two problems:

🔴 Impede o trabalho
- O git não tem e-mail configurado — o primeiro commit vai falhar.
  git config --global user.email "voce@exemplo.com"

⚠️ Vale arrumar
- A frente ../meu-app-frentes/relatorio-mensal já foi integrada na main e continua aberta.
  git worktree remove ../meu-app-frentes/relatorio-mensal
  git branch -d relatorio-mensal

✅ Repo meu-app, branch main, 1 frente aberta, Claude Code 2.1 · sdd-checar-ambiente v1.0.0 · out/2026 · versão atual: https://github.com/robertodiasduarte/sdd-starter/releases/latest

Part of SDD Starter by RDD — https://github.com/robertodiasduarte/sdd-starter