wdk-review-module
Skill3 starsChanged 29 days agoApache-2.0View on GitHub
Pre-review a WDK wallet or protocol module against the contribution guide, checking every rule and checklist item and reporting pass, fail, not run, or n/a. Use before requesting a WDK source review.
- Reads credentials
- Installs packages
In this repository5 other files it gives its agents.
- code-of-conductSkill
- wdk-review-dtsSkill
- wdk-review-jsdocsSkill
- wdk-review-testsSkill
- wdkSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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
- Distinctive: line 28
M4. Never lose a transaction: After a submission, every result and error path keeps the transaction identifier and partial-execution …
- Very specific: line 50
M15. Dependencies: Every entry in dependencies is used by src/, types/, index.js, or bare.js.
- Distinctive: line 64
M20. Disposal: If the module holds extra state, tests dispose through both the account and the manager and assert the state is gone.
- Very specific: line 65
M21. Companion skills: Run wdk-review-jsdocs, wdk-review-dts, and wdk-review-tests.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
WDK Module Pre-Review
Review the module at the provided path (or the current project if none given) against the contribution guide. Read the guide first. If this skill and the guide disagree, the guide wins.
Give every item one result, with its evidence (the command and outcome, or the file and line):
- pass: you ran the command or read the code, and it holds.
- fail: it does not hold. Give the smallest fix.
- not run: you could not check it. Say what is missing.
- n/a: it does not apply to this module.
A claim in a README is not evidence that the code does it. Do not use real funds, real keys, or paid APIs unless the user says so. End with the count of each result, then the list of failures.
Rules
All modules
- M1. Run on Bare.
exports["."].barepoints to an entry that exists and loadsbare-node-runtime. - M2. Resolve one copy of
@tetherto/wdk-wallet.package.jsondeclares a version range, not an exact version. - M3. Keep failures distinct. Invalid input, unsupported operations, missing configuration, and provider failures throw. They never become an empty or successful result, whether by
catch, early return, or empty stub. WDK errors are reused where one fits, custom errors extendWdkError, and each thrown error has@throws. - M4. Never lose a transaction. After a submission, every result and error path keeps the transaction identifier and partial-execution details. A failed submission is distinct from an unknown broadcast outcome.
- M5. Add, don't redefine. The module extends the base class for its type in the latest
@tetherto/wdk-walletrelease and implements every required method. Each override keeps the meaning and return shape of its method there. - M6. Export what callers need.
wdk-review-dtsTD3 and TD4 hold. Thrown errors meet TD5, or their import path is documented. - M7. Leave secrets and logs to the host.
grep -rnE "console\.[a-z]+\(" src index.js bare.jsfinds nothing. Provider requests and telemetry are disclosed in the README.
Protocol modules
- M8. Sign with the host's account. Signing and submission go only through the account given to the constructor. There is no seed or private key input, and no second signer. Chain module types are used where they specialize the base ones.
- M9. Report status honestly. An unrecognized status in a valid response maps to
pendingfor swidge and SDA, orin_progressfor fiat. Invalid identifiers, missing records, and failed requests throw. - M10. Honor fee caps. Exceeding a fee cap the interface defines, such as
swapMaxFee, throwsMaximumFeeExceededError.
Wallet modules
- M11. Override both account factories. A variant that changes the account class overrides
getAccount()andgetAccountByPath(). - M12. Clear their own state. Extra keys or sessions are cleared in
dispose(), aftersuper.dispose().
Checklist
Package
- M13. Name.
namematches what the CLI generates:wdk-wallet-<chain>[-<variant>],wdk-protocol-<swap|bridge|lending>-<name>-<chain>, orwdk-protocol-<fiat|swidge|sda>-<name>.npm view <name> maintainersreturns 404, or list the maintainers for the user to confirm. - M14. Lint and types.
npm run lintpasses, andtypes/matches the code (wdk-review-jsdocsR23). Do not runbuild:types(TD1). - M15. Dependencies. Every entry in
dependenciesis used bysrc/,types/,index.js, orbare.js. Nothing they import is only indevDependencies. M16. Packed install. Pass when the install succeeds and
npm lsshows one version:DIR="$(mktemp -d)" TARBALL="$DIR/$(npm pack --silent --pack-destination "$DIR")" (cd "$DIR" && npm init -y >/dev/null && npm install "$TARBALL" @tetherto/wdk && npm ls @tetherto/wdk-wallet)
Behavior
- M17. Tests.
npm testpasses,grep -rnE "(test|it)\.todo" testsfinds nothing, and every@throwsinsrc/has a test. - M18. Main flow. A test runs the main flow through
@tetherto/wdkand a real wallet package, with no mocks or sender stubs, on a fork at a known block, or live if the provider can't run on a fork. Give the block height, or the network and transaction hash, for the review request. - M19. Bare runtime. The same flow runs from the packed Bare entry with
bare <file>, not throughnpm test, or the README documents an approved waiver. A test that only imports the entry does not count. - M20. Disposal. If the module holds extra state, tests dispose through both the account and the manager and assert the state is gone.
- M21. Companion skills. Run
wdk-review-jsdocs,wdk-review-dts, andwdk-review-tests. Report their violation counts.
Documentation
- M22. README. It has install steps, a runnable example, configuration, supported chains and operations, errors with caller actions, fees, known limitations, supported WDK versions, migration steps for breaking changes, and support and security contacts. List what is missing.
- M23. Caveats. Bundler, Bare, credential, and real-funds caveats sit next to the run commands, not only in example comments.
- M24. Credentials. The repository holds no real credentials.
.env.examplelists everyprocess.envvariable that tests and examples read. - M25. Example assets. Examples use Tether assets or neutral placeholders.
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.

