feat(hardware): add onekey-hardware skill for device lifecycle + auth login --hardware#4
feat(hardware): add onekey-hardware skill for device lifecycle + auth login --hardware#4wabicai wants to merge 1 commit into
Conversation
… login --hardware
Adds a fifth skill covering hardware device management (search, verify,
firmware, pin, passphrase, settings) and the new `onekey auth login
--hardware` path. Once the user is logged in, the signer is wired off
the session file, so normal balance/transfer/swap commands keep working
without any hardware flag.
Updates:
- skills/onekey-hardware/{SKILL.md,references/common.md}
- AGENTS.md, CLAUDE.md, README.md skill tables
- .claude-plugin/{marketplace,plugin}.json bumped to 0.3.0
- .cursor-plugin/plugin.json bumped to 0.3.0
- .opencode/opencode.json adds the new SKILL.md
- .codex/, .opencode/, .openclaw/ INSTALL.md skill tables
Note: .github/workflows/validate.yml should also be updated to check
the new hardware skill files. That change needs a token with workflow
scope, so it is intentionally left out of this PR.
Deletes the last in-repo skill (apps/cli/skills/hardware/) now that onekey-hardware is published in https://github.com/OneKeyHQ/onekey-wallet-skills via OneKeyHQ/onekey-wallet-skills#4. Updates the root CLAUDE.md CLI section to reflect: - Skills are installed via /plugin install onekey-wallet-skills - After 'onekey auth login --hardware', normal wallet commands run against the device automatically; no --hardware flag on balance/transfer/swap.
There was a problem hiding this comment.
Devin Review found 2 potential issues.
⚠️ 1 issue in files not directly in the diff
⚠️ CONTRIBUTING.md still says "four copies" for references/common.md sync rule (CONTRIBUTING.md:17-18)
The PR adds a fifth references/common.md (in skills/onekey-hardware/) but does not update CONTRIBUTING.md:17 which still reads "Keep all four copies in sync when editing shared policy." This is now inaccurate — there are five copies. Future contributors following CONTRIBUTING.md may not realize the hardware skill's common.md also needs to stay in sync, causing policy drift.
View 3 additional findings in Devin Review.
| --- | ||
| name: onekey-hardware | ||
| description: "Use when the user asks about their OneKey hardware device: connecting, verifying authenticity, checking firmware, locking, changing PIN, toggling passphrase protection, renaming the device, logging in with hardware, signing with hardware, or 硬件钱包, 连接设备, 固件, 修改PIN, 锁定设备, 隐藏钱包, 设备签名. Do NOT use for App Bot Wallet login — that is the default path in onekey-wallet." | ||
| license: Apache-2.0 | ||
| metadata: | ||
| author: OneKey | ||
| version: 0.2.0 | ||
| homepage: https://onekey.so | ||
| --- |
There was a problem hiding this comment.
🔴 CI validation workflow not updated to include new onekey-hardware skill
The PR adds the onekey-hardware skill but does not update .github/workflows/validate.yml to validate the new skill's files. The workflow at .github/workflows/validate.yml:20-39 hardcodes the list of skill files to check for existence and frontmatter presence, but omits skills/onekey-hardware/SKILL.md and skills/onekey-hardware/references/common.md. This means CI will not catch if the new skill files are accidentally deleted, emptied, or have their frontmatter corrupted. Per CONTRIBUTING.md:21-23, the CI is supposed to perform "shell checks for skill/frontmatter presence", and this PR introduces a gap in that coverage.
Prompt for agents
The `.github/workflows/validate.yml` file needs to be updated to include the new onekey-hardware skill files. In the `validate-skills` job, there are two `for file in` loops:
1. The first loop (around lines 20-30) checks that skill files exist and are non-empty. Add `skills/onekey-hardware/SKILL.md` and `skills/onekey-hardware/references/common.md` to that list.
2. The second loop (around lines 32-39) checks YAML frontmatter presence (grep for `---` and `name:` in the first 5 lines). Add `skills/onekey-hardware/SKILL.md` to that list.
This ensures CI validates the new hardware skill the same way it validates the existing four skills.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
onekey-hardwarecovering OneKey device lifecycle (onekey device search|lock|verify|firmware|change-pin|toggle-passphrase|settings) and the newonekey auth login --hardwarepath from app-monorepo.--hardware, the CLI signer is wired off the session file, so normalonekey balance,onekey transfer,onekey swap …keep working without any extra flag — the skill is explicit about that so agents do not invent a--hardwareflag on wallet commands.references/common.mdis a copy of the shared wallet ruleset; the skill's own SKILL.md adds hardware-specific safety rules (never ask for passphrase in chat, pinentry / on-device only, decline firmware/factory-reset via CLI).Changes
skills/onekey-hardware/SKILL.md+references/common.md(new skill).AGENTS.md,CLAUDE.md,README.md— skill tables updated from four to five skills..claude-plugin/marketplace.json,.claude-plugin/plugin.json,.cursor-plugin/plugin.json— versions bumped to0.3.0, descriptions + keywords extended..opencode/opencode.json— adds the newSKILL.mdpath..codex/INSTALL.md,.opencode/INSTALL.md,.openclaw/INSTALL.md— skill tables updated.Companion PR
Paired with the app-monorepo branch that restores
onekey auth login --hardwareon top of x's auth refactor (feat/cli-hardware-skill). The skill needs the CLI side merged before theonekey-hardwarecommands are reachable.Follow-up (not in this PR)
.github/workflows/validate.ymlshould also list the new hardware skill files in its existence/frontmatter checks. That edit requires a token withworkflowscope, so a maintainer with scope needs to land it in a separate tiny PR.Test plan
python3 -m json.toolon every*.jsonmanifest (local)./plugin install onekey-wallet-skillsin Claude Code once merged and verify the hardware skill appears.