blocks-captcha
Skill42 starsChanged 12 days agoMITView on GitHub
Configure the login captcha of a SELISE Blocks project through the blocks CLI ('captcha list/get/save/enable/disable/delete'): register a reCAPTCHA or hCaptcha site key and secret, switch it on or off, see which configuration blocks-iam actually enforces at login, and retire one. CLI-only, project-scoped; the captcha secret is stored server-side and never shown. Use for 'enable captcha on login', 'change the recaptcha keys', 'why is captcha not showing', 'turn captcha off'.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bootstrap/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- blocks-bootstrapSkill
- blocks-data-gateway-configurationSkill
- blocks-data-gateway-crudSkill
- blocks-data-storageSkill
- blocks-frontend-local-httpsSkill
- blocks-functionsSkill
- blocks-iam-access-controlSkill
- blocks-iam-accountSkill
- blocks-iam-mfaSkill
- blocks-iam-organizationsSkill
- blocks-iam-sso-oidc-configurationSkill
- blocks-iam-sso-oidc-implementationSkill
- blocks-iam-usersSkill
- blocks-localization-configurationSkill
- blocks-localization-implementationSkill
- blocks-mailSkill
- blocks-notificationSkill
- blocks-notifierSkill
- blocks-proxySkill
- blocks-release-deploymentSkill
- blocks-secretsSkill
- blocksSkill
- blocks-storage-configurationSkill
- blocks-workflowSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
When invoking a project-scoped blocks command, either use the resolved account's saved selection or pass --project <tenantId> for that one …
- Distinctive: line 50
Update the site key only:
- Very specific: line 81
Enabled is not the same as enforced: Only the first enabled record in id order gates login.
- Very specific: line 82
The secret cannot be read back: If the user has lost the provider secret, they set a new one with captcha save <id> --captcha-secret <new>.
- Very specific: line 83
Login behaviour: When a captcha is enforced and the client sends none, blocks-iam answers the token request with captcha_required and the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When invoking a project-scoped blocks command, either use the resolved account's saved selection or pass --project <tenantId> for that one command without changing saved state. --project applies to CLI commands only, never SDK calls.
Blocks Captcha — login captcha configuration
A captcha configuration tells blocks-iam whether to demand a captcha on password login, with which provider (recaptcha, hcaptcha, or the built-in bcaptcha), which site key the login page renders, and which generator (EasyCaptchaGenerator or HardCaptchaGenerator). The provider secret is stored server-side; reads return a secretId reference only, never the value, and nothing in the CLI reveals it.
CLI-only, no SDK path. Prerequisite: a project is selected (blocks use <tenantId>); every command runs on an impersonated project token. If login/project state is unknown, run the blocks-bootstrap skill first.
Which configuration is live
A project may hold several configurations, and more than one may be enabled. blocks-iam enforces exactly one: the first enabled record in id order. Every captcha list, enable and disable output therefore carries activeForLogin — read that field, never assume the record you just enabled is the enforced one.
blocks captcha list --json
# {"activeForLogin": "<id or null>", "configs": [{"id", "isEnable", "provider", "captchaKey", "captchaGenerator", "secretId"}], "totalCount": n}
blocks captcha get <id> --jsonactiveForLogin: null means login never asks for a captcha.
Command map
| Command | Notes |
blocks captcha list | All configurations plus activeForLogin. Read-only. |
blocks captcha get <id> | One configuration; secretId reference, never the secret. Read-only. |
blocks captcha save [<id>] --provider p [--captcha-key k] [--captcha-secret s] [--generator g] --enable|--enable=false | Omit <id> to create, pass it to update. An update reads the stored record and merges, so --captcha-secret alone rotates the secret without disabling the configuration or blanking its site key; --provider is only required on create. Mutating. |
blocks captcha enable <id> / blocks captcha disable <id> | Flip only isEnable; nothing else changes. Mutating. |
blocks captcha delete <id> | Removes the record and retires its stored secret. Mutating. |
Creating and updating
blocks captcha save --provider recaptcha --captcha-key <siteKey> --captcha-secret <secret> \
--generator EasyCaptchaGenerator --enable --dry-run --json
blocks captcha save --provider recaptcha --captcha-key <siteKey> --captcha-secret <secret> \
--generator EasyCaptchaGenerator --enable --yes --json- Creating requires
--enableor--enable=false. The server stores an omitted flag as disabled, which would silently create a configuration login never uses; the CLI refuses (captcha_enable_required) until you say which you want. --provideris validated against what blocks-iam can verify:recaptcha,hcaptcha,bcaptcha. The portal offers the first two.--captcha-secretsemantics differ between create and update. On create it stores the secret. On update (an<id>is passed) it replaces the stored secret. Omitted or empty, the stored secret is left untouched — so an update that only changes the site key does not need the secret again.- The secret is redacted in
--dry-runoutput ("captchaSecret": "***") and is never echoed back by any command. Pass it from a variable rather than typing it into a prompt or transcript.
Update the site key only:
blocks captcha save <id> --provider recaptcha --captcha-key <newSiteKey> --yes --jsonSwitching on and off
blocks captcha enable <id> --dry-run --json # shows activeForLoginAfter before touching anything
blocks captcha enable <id> --yes --json
blocks captcha disable <id> --yes --jsonenable/disable read the record and re-save it with only isEnable changed and no secret, so keys and the stored secret are untouched. If another enabled record sorts first, the output's note (also printed to stderr) says so — disable that one to make yours live. A record already in the requested state reports upToDate: true and sends nothing.
Deleting
blocks captcha delete <id> --dry-run --json # shows whether the record is currently enabled
blocks captcha delete <id> --yes --jsonThe server retires the stored secret, then removes the configuration. Deleting the enforced configuration stops requiring a captcha at login — the confirmation says so. The configuration cannot be restored; re-create it with save.
--dry-run before --yes — always
save, enable, disable and delete follow the standard blocks mutation discipline: --dry-run prints the plan without calling the API; --yes skips the confirmation. Omitting both drops into an interactive prompt that hangs in a non-interactive run.
Gotchas
- Enabled is not the same as enforced. Only the first enabled record in id order gates login. Always check
activeForLogin. - The secret cannot be read back. If the user has lost the provider secret, they set a new one with
captcha save <id> --captcha-secret <new>; nothing in the CLI reveals the stored one. - Login behaviour. When a captcha is enforced and the client sends none, blocks-iam answers the token request with
captcha_requiredand the site key; an invalid answer iscaptcha_invalid. Those are login-flow responses, not CLI errors. - Impersonated project token only. A project must be selected first (
blocks use <tenantId>).
Example trigger prompts
- "Enable reCAPTCHA on login with these keys." →
captcha save --provider recaptcha --captcha-key ... --captcha-secret ... --enable(dry-run first). - "Turn captcha off for now." →
captcha listto findactiveForLogin, thencaptcha disable <id>. - "Why does login not show a captcha?" →
captcha list --jsonand checkactiveForLogin(null, or a record whose keys are wrong). - "Rotate the hCaptcha secret." →
captcha save <id> --provider hcaptcha --captcha-secret <new>. - "What is the current captcha secret?" → not available from the CLI; set a new one if it is lost.
- "Remove the old captcha config." →
captcha delete <id>(dry-run first).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

