Index of every page on this site: llms.txt
All skills
Run it yourself

Integrate and verify doppler-sol external hook programs for Initializer curve swaps and CPMM swaps/liquidity actions, including cosigner-hook expiry payloads, CPI return data, and remaining-account behavior.

Use this Skill: https://skilld.dev/gh/whetstoneresearch/doppler-skills/solana-hooks

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈55 tokens for metadata: the name and description. ≈672 when used: this file. ≈688 more on demand in 3 files.

Description uses 2.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈222 characters, or 2.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Consumer Source of Truth: Use SDK/IDL constants and deployed hook configuration for flags, account order, and return-data decoding.

Solana Hooks

When to use

  • You are integrating an external policy hook for a Solana Doppler launch or CPMM pool.
  • You need to reason about Initializer hook flags or CPMM hook flags.
  • You need to configure or debug cosigner hook gating.
  • A swap or liquidity operation fails due to CPI return data or missing remaining accounts.

Mental model

Hooks are Solana-native external programs invoked by CPI. They receive a serialized context and return policy decisions through Solana return data.

This is the closest Solana analog to EVM hook extensibility, but it is not a Uniswap v4 hook model.

Core workflow

  1. Confirm the hook program is allowlisted in the relevant on-chain config.
  2. Store the hook program id and flags on the launch or pool.
  3. Pass the hook program account and any hook-specific remaining accounts to the user instruction.
  4. Decode the hook context and return data when debugging.
  5. Verify whether the path fails open or fails closed for missing return data.

Quick facts

Surface Actions
Initializer curve swap hook before/after swap, plus create/migrate hook flags for configured flows
CPMM before/after swap, add liquidity, remove liquidity
Return data allow plus optional fee override fields depending on surface
Initializer missing return data tolerated as allow/no change
CPMM before-action missing return data error when hook is enabled
CPMM after-action missing return data tolerated
Cosigner hooks Empty payload keeps signature gating active until migration; 42-byte payload can expire by timestamp or slot

Failure modes

  • Hook program not allowlisted at configuration time.
  • Hook account omitted even though stored launch/pool config requires it.
  • Remaining accounts not forwarded in the order expected by the hook.
  • Treating an empty cosigner payload as an expired gate; it is the legacy signature-required mode.
  • Hashing the wrong cosigner remaining-account list; expiring cosigner launches commit to [namespace, cosigner_config, cosigner].
  • Assuming Initializer and CPMM missing-return-data behavior is identical.
  • Treating Initializer hook fee overrides as persistent configuration.

References

Related skills

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    This skill provides technical documentation and integration guides for Solana hook programs. It contains only informational markdown content with no executable scripts, external network requests, or sensitive data access.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: MEDIUM · 1 issue

Signed by skilld at 4f654fe. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 5 months ago
metadata
{
  "author": "doppler",
  "version": "1.0"
}

README badge

README badge for whetstoneresearch/doppler-skills/solana-hooks