secrets
Skill0 starsChanged 4 days agoMITView on GitHub
How API keys are handled in a shipped app, the three allowed patterns and the places a key must never appear. Use when adding anything that needs a key, token or password, or when a secret check fails.
- Reads credentials
14 other projects use a version of this.
Adopted by
Most recently taken up by
- e-reitbauer/habitstheir own version, first seen Nov 8, 2026
- avhn/secrettheir own version, first seen Nov 8, 2026
- cooneycw/claude-power-packtheir own version, first seen Nov 7, 2026
- bks-lab/open-bridgetheir own version, first seen Oct 30, 2026
- schroneko/skillstheir own version, first seen Oct 29, 2026
- phnx-labs/agi-clitheir own version, first seen Oct 26, 2026
Used with
Projects with it also use ship.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- BuilderIO/agent-native★ 7.6ksame name
- nitinjain999/platform-skills★ 71same name
- phnx-labs/agi-cli★ 26same name
- cooneycw/claude-power-pack★ 21same name
- ulpi-io/browse★ 15same name
- bks-lab/open-bridge★ 13same name
- avhn/secret★ 9same name
- emre-guler/websec★ 2same name
- e-reitbauer/habits★ 1same name
- phnx-labs/.agents★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- actionsSkill
- adding-a-featureSkill
- agent-workflowSkill
- app-contextSkill
- approval-and-safetySkill
- backend-proxySkill
- background-workSkill
- build-an-appSkill
- capture-learningsSkill
- clean-architectureSkill
- customizing-the-assistantSkill
- delegate-to-agentSkill
- edit-boundariesSkill
- i18n-and-rtlSkill
- model-providersSkill
- performanceSkill
- permissions-and-platformSkill
- read-the-docsSkill
- reliable-mutationsSkill
- routingSkill
- state-managementSkill
- storing-dataSkill
- testingSkill
- ui-designSkill
- upgrade-the-frameworkSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Don't load this for choosing a model server.
- Distinctive: line 12
No key in source, assets, tests or anything sent to the model.
- Very specific: line 34
If the lint or check fires on a test string that only looks like a key, change the string.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secrets
Don't load this for choosing a model server; see model-providers.
Rule
No key in source, assets, tests or anything sent to the model. A shipped app uses one of three patterns:
- On the device or local network: a model that needs no key (Ollama, LM Studio).
- Your own proxy: a server holds the key; the app only knows the proxy's address (
backend-proxy). - A key the person types: saved in secure storage, one per preset, never on web.
Enforced by the no_secret_literals lint (app source, run by dart analyze --fatal-infos) and the doctor's bundled-secrets check (assets listed in pubspec.yaml, and the Dart source under packages/).
Why
An app bundle can be unpacked, so a key inside it is public. A key in model input can be repeated back by the model, stored in a thread, or logged.
How
- The key's only home is
SecretStore(lib/domain/repositories/secret_store.dart), implemented bySecureSecretStoreinlib/data/repositories/secure_secret_store.dart(Keychain, Keystore and desktop equivalents). It keeps one key per preset (getApiKey(presetId)), so a key typed for one server is never sent to another. Tests uselib/data/repositories/in_memory_secret_store.dart. - The key is written by the
set_api_keyaction inlib/domain/actions/settings_actions.dart, which is not an agent tool (agentTool => false): the assistant cannot read or set it. set_assistant_providerrefuses anhttp://address to a host outside the local network when the preset takes a key (keyUseis notnone);http://is only for local hosts (isLocalHostinlib/domain/entities/assistant_settings.dart). Usehttps://for everything else.- The settings form (
lib/presentation/settings/assistant_settings_section.dart) hides the key field on web and when the preset takes no key (KeyUse.none), usesobscureText, and shows only "key saved", never the value. - The lint and the doctor match the shapes in
secret_patterns.dart(core and lints each keep a copy):sk-, Google, GitHub, Slack, AWS, Stripe, Groq, Hugging Face and xAI keys, JWTs,Bearertokens and private-key headers. - The registry redacts key-shaped text from action output; do not rely on it, just never return a key.
- The macOS keychain note in
SecureSecretStore(login keychain, because debug builds are unsigned) is deliberate; leave it. - Build-time values (
--dart-define) are compiled into the app, so they are not a hiding place. - If the lint or check fires on a test string that only looks like a key, change the string. Use
// ignore: flutter_agentify_lints/no_secret_literalsonly with a reason; the doctor's ratchet counts ignores and the number may only go down.
Anti-patterns
- A
.envfile, or a key, inassets/(the doctor fails on both). - A key in a prompt, a screen summary (
lib/ai/screen_contexts.dart), a receipt or a log line. - Storing the key in shared preferences instead of
SecretStore. - Adding a web field for the key "just for testing".
Verification
dart analyze --fatal-infosfor the lint;dart run flutter_agentify_core:doctor --only bundled-secretsfor assets.test/actions/set_api_key_test.dartcovers the action.tool/check.shruns both (seeverify).
Related skills
backend-proxy— pattern 2 in detailmodel-providers— which presets need a keyapproval-and-safety— what the assistant may not do
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.

