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.
npx agentmods add commands/the-17/agentsecrets/logingit clone --depth 1 https://github.com/The-17/agentsecretsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00639 |
| Opus 5 | $0.00000 | $0.00319 |
| Sonnet 5 | $0.00000 | $0.00128 |
| Haiku 4.5 | $0.00000 | $0.00064 |
Grade A, and why
login 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agentsecrets login
Authenticate to an existing AgentSecrets account.
Usage
agentsecrets login
Description
login re-authenticates on a machine where you already have an account. Unlike init, it skips project setup — it only restores your session and decrypts your workspace keys.
Use login when:
- Your session expired and you're prompted to authenticate
- You're setting up AgentSecrets on a second machine
- You logged out and want to log back in
What Happens
Login is more than a JWT exchange. Because secrets are encrypted with workspace keys that are themselves encrypted with your private key, login involves a full cryptographic key unwrapping sequence:
1. Credential submission
Prompts for email and password. Sends them to the auth.login API endpoint.
2. Server response
The server returns:
access_tokenandrefresh_token(JWTs)encrypted_private_key— your private key, encrypted with an Argon2id-derived key from your passwordkey_salt— the Argon2id salt used to derive the keyencrypted_workspace_keys— one encrypted workspace key per workspace you belong to
3. Private key decryption
The CLI uses your password to derive a symmetric key with Argon2id:
password + key_salt → (Argon2id) → derived_key
derived_key → (AES-256-GCM decrypt) → private_key
4. Workspace key decryption
For each workspace:
private_key → (NaCl SealedBox open) → workspace_key
5. Caching
- Private key → OS keychain (encrypted by OS)
- Workspace keys (decrypted in memory) →
~/.agentsecrets/config.json - JWT tokens →
~/.agentsecrets/config.json
Your password is used only during this step and then discarded. It is never stored anywhere.
Automatic Token Refresh
You rarely need to call login manually. AgentSecrets attaches an EnsureAuth middleware to every command. Before each command runs, it checks the JWT expiry:
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.
- 2d ago First seen · 85 lines · 0 tokens per session scan A 44b859ca3d83
login is a command published in the GitHub repository The-17/agentsecrets (172 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 639 tokens. 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-08-30.
Other commands, from other repositories
nyxid-connect
Connect a catalog service through NyxID without placing its credential in the agent context.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.