anchor-cpis

Create Solana cross-program invocations with PDA signing and account validation.

1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/faremeter/flex --skill anchor-cpis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anchor-cpis
Source: https://github.com/faremeter/flex/tree/main/skills/anchor-cpis
Command: npx skills add https://github.com/faremeter/flex --skill anchor-cpis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cross-program invocations in Solana require careful handling of validation, signer extension, and privilege checks to avoid security risks when calling other programs.

Core Features & Use Cases

  • Safe Cross-Program Invocations (CPI) across Token, System, and custom programs
  • PDA signing, privilege extension, and program validation to prevent unauthorized access
  • Use Case: orchestrating complex inter-program workflows where multiple accounts and signers are involved

Quick Start

Instantiate a CPI context with the target program and accounts, then call the target instruction via the CPI module.

Frequently Asked Questions about anchor-cpis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle PDA signing in Solana cross-program invocations?

PDA signing in Solana cross-program invocations requires instantiating a CPI context with the target program and accounts, enforcing privilege extension and program validation to prevent unauthorized access during inter-program workflows.

What is the safest way to make CPI calls to Token and System programs in Anchor?

Safe CPI calls to Token and System programs in Anchor require strict validation, correct signer handling, and proper account constraints to mitigate security risks when orchestrating complex inter-program workflows.

How do I reload account state after a CPI call in Solana?

Reloading account state after a CPI call in Solana involves post-CPI account reloads to ensure up-to-date state, handling return data correctly and validating the updated accounts after the target instruction executes.

Why do my Solana CPI calls fail privilege checks when calling other programs?

Solana CPI calls fail privilege checks due to improper signer extension or missing program validation, requiring careful enforcement of safety checks and correct account constraints before invoking the target instruction.

Do I need Anchor to orchestrate complex inter-program workflows with multiple signers?

Orchestrating complex inter-program workflows with multiple signers requires strict validation and proper account constraints, using Anchor's CPI module to safely handle program validation and signer extension across programs.

What are the limitations of using CPIs for custom Solana program interactions?

Limitations of CPIs for custom Solana program interactions include strict validation requirements and the need for proper account constraints, requiring careful handling of return data and post-CPI state reloads to avoid security risks.