categorise-vault-strategy
Skill834 starsChanged 3 days agoMITView on GitHub
Categorise a DeFi vault's investment strategy from its address, link, name, and published strategy context. Use when adding or reviewing StrategyTag classifications for VaultBase adapters or native perpetual DEX vault exports, including their maintained tags.py mappings.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-curatorSkill
- add-stablecoinSkill
- add-vault-abi-methodsSkill
- add-vault-noteSkill
- add-vault-protocolSkill
- check-stablecoinsSkill
- check-top-list-vaultsSkill
- check-vault-onchainSkill
- clean-up-for-prSkill
- document-curator-incidentSkill
- extract-project-logoSkill
- extract-test-setSkill
- extract-vault-protocol-logoSkill
- find-new-curatorsSkill
- fix-sphinx-docsSkill
- get-block-numberSkill
- Identify vault protocolSkill
- maintain-curatorsSkill
- make-releaseSkill
- monthly-vault-reportSkill
- more-vaultsSkill
- post-process-logoSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Treat ApeX, Hyperliquid, GRVT, Hibachi, and Lighter as native perpetual DEX integrations, not VaultBase adapters.
- Very specific: line 32
Add discretionary_trading when product-specific evidence shows that a person or investment team chooses, approves or rebalances investments.
- Very specific: line 48
Prefer the most specific tag and include a relevant parent tag where it conveys useful search or reporting context.
- Very specific: line 51
Do not infer a tag merely from a token symbol, protocol name, or generic yield marketing.
- Distinctive: line 58
Create or update the protocol tag mapping.
- Very specific: line 86
Keep every EVM address key lowercase and scope every entry to an individual vault.
- Very specific: line 135
Add or update focused no-RPC coverage.
- Distinctive: line 141
Add a numbered migration for the persisted strategy tags.
- Very specific: line 143
Read the migration documentation.
- Distinctive: line 154
Keep metadata writes out of authoring.
- Distinctive: line 156
When a PR is requested, add a Run after merge comment following the migration guide.
- Distinctive: line 164
Before the review handoff, run clean-up-for-pr on the completed change.
- Distinctive: line 169
When reporting a completed categorisation, output one entry per vault with:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Categorise vault strategy
Assign evidence-based strategy tags to a known vault. Keep the maintained address-to-tag mapping next to its vault protocol adapter.
Workflow
Identify the vault and its adapter.
- Resolve the chain and lowercase contract address from the supplied link, address, or name. Do not classify a same-address deployment on a different chain without confirming it is the same product.
- For an ERC-4626 adapter, locate
eth_defi/erc_4626/vault_protocol/{slug}/vault.pyand read its description,short_description, nearby address overlays, and protocol metadata. Use the vault's official documentation or announcement to corroborate material claims. - Treat ApeX, Hyperliquid, GRVT, Hibachi, and Lighter as native perpetual DEX
integrations, not
VaultBaseadapters. Their vaults are materialised byeth_defi/{slug}/vault_data_export.pywith either an address, a platform vault ID, or a synthetic address.
Select tags from
eth_defi.vault.strategy_tag.StrategyTag.- Assign every supported tag that the documented strategy warrants; tags are additive and are not mutually exclusive.
- Add
discretionary_tradingwhen product-specific evidence shows that a person or investment team chooses, approves or rebalances investments. This includes curator-selected lending markets, yield farms, underlying vaults and credit deals, even when the return comes from interest or fees rather than trading prices. Retain the supported income-mechanism tags. - Identify who makes investment decisions separately from who executes them.
Human selection with automated execution or allocation can warrant both
discretionary_tradingandalgorithmic_trading, when each is supported. A curator name, admin role, multisig, permissioned deposits or the word “managed” alone does not establish discretion. Fully rules-driven allocation without evidence of human investment choices does not receive the discretionary tag. Routine settlement or reward claiming alone does not establish algorithmic trading either. - Record the evidence of human decisions for the exact product in its tag comment. Do not propagate one discretionary product's tags to every vault of the same curator, including fixed-universe and automated products.
- Prefer the most specific tag and include a relevant parent tag where it
conveys useful search or reporting context. For example, an RWA lending
vault normally receives both
rwaandrwa_lending. - Do not infer a tag merely from a token symbol, protocol name, or generic
yield marketing. When the strategy is not documented well enough, leave
the address out of the mapping:
get_strategy_tags()then returnsNone, meaning the information is missing. Useunknownonly when a researched classification explicitly establishes that the strategy is unknown.
Create or update the protocol tag mapping.
For a
VaultBaseadapter, useeth_defi/erc_4626/vault_protocol/{slug}/tags.pywith plain lowercase string keys. Do not wrap table literals in verboseHexAddress(...)constructors:"""Maintained strategy classifications for {Protocol} vaults.""" from eth_defi.vault.strategy_tag import StrategyTag STRATEGY_TAGS: dict[str, set[StrategyTag]] = { #: Vault: Example RWA lending vault. #: Added: 2026-08-17. #: Decision material: The issuer describes this product as lending #: against real-world assets. #: Sources: #: - https://issuer.example/vaults/example "0x...": {StrategyTag.rwa, StrategyTag.rwa_lending}, }Where the protocol has
CHAIN_STRATEGY_TAGS(including Lagoon and Morpho), use its(chain_id, lowercase_address)keys for deployment-specific evidence. Pass the chain ID through both the adapter and persisted-tag resolver; do not let an unrelated same-address deployment inherit the classification.Keep every EVM address key lowercase and scope every entry to an individual vault.
lookup_strategy_tags()normalises the adapter'sHexAddressinput before looking up the string key. Put a Sphinx line-comment block immediately above every address-specific entry. It must include the vault name, the UTC date the tagging entry was added, and the decision material used to assign the tags. Include every page URL consulted during the decision directly in the comment; cite repository files by their path. Do not add an entry where the source material does not support the selected tags. Do not use a bundled or historical research snapshot as the sole evidence for a current address classification; verify the current metadata row or a current official protocol source before adding the entry.Aave, Euler, and Morpho adapters automatically add the generic
StrategyTag.lendingtag to every vault. TheirSTRATEGY_TAGSmappings are additive and should contain only additional address-specific classifications.For a native perpetual DEX, use
eth_defi/{slug}/tags.pywith string keys, because ApeX, GRVT vault IDs and Hibachi/Lighter synthetic addresses are not EVM addresses. Its resolver normally combines the maintained address-specific tags withStrategyTag.perpetual_futures. If the source description explicitly identifies a product as a non-perpetual RWA or fund product, omit that default for the address by adding its lowercase identifier to the protocol'sNON_PERPETUAL_VAULTSset and documenting the exception in the entry comments; do not infer perpetual-futures exposure from the platform name alone.Wire the classification into the correct data path.
For a
VaultBaseadapter, ensure the corresponding vault class reads the mapping:from eth_defi.erc_4626.vault_protocol.{slug}.tags import STRATEGY_TAGS from eth_defi.vault.strategy_tag import StrategyTag, lookup_strategy_tags def get_strategy_tags(self) -> set[StrategyTag] | None: """Return maintained strategy tags for this vault.""" return lookup_strategy_tags(STRATEGY_TAGS, self.vault_address)Return a copy so callers cannot mutate the maintained mapping. Preserve
Nonefor an address with no mapping entry.For a native perpetual DEX, import the resolver in its
vault_data_export.pymodule and save its return value in the syntheticVaultRowas_strategy_tags. Do not add a fictional vault class or useHexAddressfor a non-EVM identifier.- Add or update focused no-RPC coverage. For a
VaultBaseadapter, check the known address returns the exact tag set and an unmapped address returnsNone. For a native perpetual DEX, check both the defaultperpetual_futurestag and an address-specific tag added by its mapping. Format modified Python files and run the focused test. Add a numbered migration for the persisted strategy tags.
- Read the migration documentation.
Standalone repair scripts are legacy format and must not be used for
this task. The retired
migrate-vault-strategy-tags.pycommand is not a production entry point. - Allocate a new
migration/scripts/NNN-name.pyfor this tag change, even if initial migration 008 has already run. Successful numbered scripts are immutable and skipped; never reuse 008 as an ongoing refresh command. - Reuse
collect_strategy_tag_updates()frometh_defi/vault_protocols/repairs/strategy_tags.pyagainstcontext.metadata(), stage only_strategy_tags, report counts and callcontext.commit_metadata(). Do not acquire locks in the helper. - Keep metadata writes out of authoring; use isolated snapshots for preview and tests when authorised. Do not apply to production while categorising.
- When a PR is requested, add a Run after merge comment following the migration guide. Stop the daemon and competing writers before both preview and apply, use the direct Compose command for the full pending batch (the host launcher is optional), then restart the same inspected image for cleaning, exports and uploads.
- Read the migration documentation.
Standalone repair scripts are legacy format and must not be used for
this task. The retired
Chat output
Before the review handoff, run clean-up-for-pr on the completed change. When categorisation is part of a larger onboarding task, let that task run cleanup once after its remaining implementation is complete.
When reporting a completed categorisation, output one entry per vault with:
- Vault name
- Vault address
- Tags added
- Link to the production migration comment when a pull request was opened.
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.

