03-custom-skills/examples/onepassword-integrate/SKILL.md
Audit or install maximum-depth 1Password integration in the current project — fetches fresh 1Password developer docs first, detects existing integration, and either reviews/improves it or greenfield-installs (Service Account secret resolution + site-compat autocomplete/well-known). Stack-aware (Laravel, Node/Next, Python, Ruby/Rails, Go). Use when the user says "integrate 1Password", "make this site 1Password-friendly", "audit our 1P integration", or invokes /onepassword-integrate.
npx skillsauth add escapeboy/ai-prompts onepassword-integrateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Note on
references/: the stack-specific recipes referenced at the bottom are companion files you author per stack (the progressive-disclosure layout from guide.md). The detection and audit phases below are complete without them.
Bring any project to maximum-depth 1Password integration in two layers:
op://vault/item/field. No more secrets in .env files, CI variables, or code./.well-known/change-password URL.autocomplete="current-password" is free; not adding it silently breaks autofill. Always ship the full set.op (or the SDK). Tokens in .env files committed by accident are a recurring incident pattern.Pull the current state of the developer platform via web search/fetch. Always include the current year in the queries.
Required reads — capture these into working memory before doing anything else:
| Surface | Why |
|---|---|
| https://developer.1password.com/ | Top-level entry; what's new highlighted here. |
| https://developer.1password.com/docs/sdks/ | SDK matrix (Go / JS / Python). PHP is not on this list — fall back to CLI. |
| https://developer.1password.com/docs/service-accounts/ | Token format, vault scope, rate limits, rotation rules. |
| https://developer.1password.com/docs/cli/ | op v2 CLI commands (read, inject, run, vault list, item get). |
| https://developer.1password.com/docs/sdks/load-secrets | op://vault/item/field reference grammar. |
| https://developer.1password.com/docs/connect/ | Connect Server self-hosted REST option. |
| https://developer.1password.com/docs/web/compatible-website-design/ | Authoritative site-compat reference. |
| https://developer.1password.com/docs/security/ | What to never log, what to never store. |
| https://releases.1password.com/developers/sdks/ | Recent SDK changes (often answers "is X supported yet?"). |
Also pull these standards:
/.well-known/change-password: https://w3c.github.io/webappsec-change-password-url/Document any deltas vs. training data the user should know about.
Run these scans against the current project. Treat any positive hit as "integration exists, audit don't replace".
Run in this order, stop at the first match:
| Marker file present | Stack |
|---|---|
| composer.json containing laravel/framework | Laravel / PHP |
| composer.json (other PHP) | PHP generic (CLI shell-out) |
| package.json containing next | Next.js |
| package.json containing nuxt or vite | Node SPA |
| package.json (other Node) | Node generic |
| pyproject.toml or requirements.txt | Python |
| Gemfile | Ruby / Rails |
| go.mod | Go |
| any Dockerfile* only | Container generic (CLI only) |
If multiple match (monorepo), pick the closest to the user's current working directory.
Grep the project (skip vendor/, node_modules/, .git/, dist/, build/) for any of:
1password|onepassword|1Password|OnePassword
op://
OP_SERVICE_ACCOUNT_TOKEN
OP_CONNECT_HOST|OP_CONNECT_TOKEN
@1password/sdk|onepassword-sdk|github.com/1Password/onepassword-sdk-go
.well-known/change-password
For each hit, classify:
op run --env-file or similar.Find all login / register / reset-password / forgot-password / password-update / 2FA-challenge forms — look in:
resources/views/auth/*, Livewire profile componentsapp/login/**, app/register/**, app/(auth)/**, pages/login.*, etc.app/views/sessions/, app/views/registrations/, app/views/passwords/, Devise overrides.*login*, *register*, *password* with <input type="password">.For each, check:
| Field | Required attribute | Common mistakes |
|---|---|---|
| Email/username on login | autocomplete="username" | autocomplete="email" works but is weaker; missing entirely is worst. |
| Password on login | autocomplete="current-password" | Missing → autofill unreliable. |
| Email/username on register | autocomplete="username" | Should NOT be email here — the field is the future login id. |
| Name on register | autocomplete="name" | Often missing. |
| Both passwords on register | autocomplete="new-password" | Without it, 1Password won't offer to generate a strong password. |
| Both passwords on password-update | autocomplete="current-password" (old) and autocomplete="new-password" (new ×2) | Plus a hidden <input autocomplete="username" hidden> companion so password managers know which credential to update. |
| 2FA TOTP code | autocomplete="one-time-code" + inputmode="numeric" | Missing breaks iOS SMS autofill. |
| 2FA recovery code | autocomplete="off" | Recovery codes are NOT one-time codes per spec — wrong hint causes SMS autofill on the wrong field. |
| Third-party API key inputs (BYOK forms) | autocomplete="off" + data-1p-ignore="true" | Without these, 1P tries to save the form itself as a 1P entry. |
Check whether these endpoints exist and respond correctly:
| Endpoint | Spec | Required behavior |
|---|---|---|
| GET /.well-known/change-password | W3C | 2xx or 3xx; redirect target should be the change-password UI. |
| GET /.well-known/passkey-endpoints (optional) | W3C draft | JSON document advertising passkey origins. |
| Password fields on signup | WHATWG | Should declare passwordrules attribute matching server policy. |
After Phase 2, classify the project:
| State | Action | |---|---| | Greenfield — no markers found anywhere. | Full install, stack-specific (§3a). | | Partial backend — driver/resolver exists but is broken or shallow. | Audit + improve backend (§3b). | | Partial frontend — some autocomplete attrs but not all, or missing well-known. | Frontend hygiene patch (§3c). | | Mature — both backend and frontend are correct. | Report A-grade and exit. Suggest only nice-to-haves (passkey login, PRF E2E). |
For the detected stack, implement:
^ops_.{28,}$.op read --no-newline (or using the SDK) with the token in env (never argv).op version with checksum.op:// references resolved at launch.op CLI to assert: token in env not argv, malformed reference rejected, exit-code-1 surfaces stderr.For each step, write the change or open a sub-task. Run the test suite afterwards. Never declare done without all green tests + a working op vault list smoke test in the target environment.
For each existing surface, check the safety invariants:
OP_SERVICE_ACCOUNT_TOKEN env). ps-leak is real.ops_ AND length >= 32..., no shell metas ($, `, ;, &, |, <, >, (), whitespace).rtrim($val, "\r\n")) — --no-newline flag is best-effort across op versions.op CLI pinned to a specific version (with SHA256 ideally) in the runtime image.op calls from web request handlers — only from queue workers / async contexts (web has tighter timeouts and loses output buffering).op:// reference tokens themselves CAN be logged (they're not secrets) — useful for audit trails.1password-credentials.json mounted read-only.For each violation, propose a minimal-diff fix and ship it. Do not rewrite the whole driver if only one invariant is broken.
Always-safe patches (apply unconditionally — none of them break working autofill):
autocomplete="username" + autocomplete="current-password".autocomplete="name", autocomplete="username", autocomplete="new-password" ×2.autocomplete="username" + autocomplete="new-password" ×2.<input type="text" name="username" autocomplete="username" value="{{ user.email }}" hidden aria-hidden="true" tabindex="-1"> companion.autocomplete="one-time-code" + inputmode="numeric".autocomplete="off" (NOT one-time-code)./.well-known/change-password route → 302 to the actual password-change UI, exempt from auth middleware (so password managers can probe without logging in).passwordrules attribute on signup password fields (match server policy).autocomplete="off" data-1p-ignore="true".Always add a regression test (one per stack) asserting autocomplete="..." strings appear in rendered output.
Produce a single-paragraph summary plus a checklist of what was found/changed per layer (backend / frontend / tests / outstanding manual steps).
Always finish with one of:
op vault list inside the prod container with a real token to smoke-test."autocomplete="off" on password fields is almost always wrong (1Password ignores it anyway, but breaks browser autofill).development
Optimize PNG and JPEG images locally using pngquant and mozjpeg/jpegtran — TinyPNG-level compression without API keys.
development
Merges all feature branches into develop, syncs master/main with develop, commits any uncommitted changes, and deletes all feature branches (local and remote). Handles git submodules automatically. Use when you want to clean up branches and leave only develop and master/main in sync.
testing
Three-phase autonomous bug fix — investigate all occurrences, fix with full coverage, validate with regression test. Prevents partial fixes (the
development
This skill should be used when performing legal and regulatory compliance audits on software projects. It covers GDPR, CCPA/CPRA, ePrivacy Directive, HIPAA, PCI DSS, SOC 2, and WCAG 2.2 accessibility. The skill generates a full compliance package: audit report with severity ratings, automatic code fixes, legal document templates (Privacy Policy, Cookie Policy, DPA, DPIA), and data flow diagrams. This skill should be triggered when the user asks to check compliance, audit privacy, generate legal documents, review data handling, or ensure regulatory readiness for any project type (web, mobile, API, desktop).