anchor-expert-2026
Expert Anchor smart contract development for Solana (January 2026). Use when (1) Writing or auditing Solana programs, (2) Implementing security patterns, (3) Defining account structures and constraints, (4) Building CPI interactions, (5) Testing with Mollusk/LiteSVM, (6) Deploying programs, or any Anchor/Solana program development questions.
Best use case
anchor-expert-2026 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Expert Anchor smart contract development for Solana (January 2026). Use when (1) Writing or auditing Solana programs, (2) Implementing security patterns, (3) Defining account structures and constraints, (4) Building CPI interactions, (5) Testing with Mollusk/LiteSVM, (6) Deploying programs, or any Anchor/Solana program development questions.
Teams using anchor-expert-2026 should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/anchor-expert-2026/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How anchor-expert-2026 Compares
| Feature / Agent | anchor-expert-2026 | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Expert Anchor smart contract development for Solana (January 2026). Use when (1) Writing or auditing Solana programs, (2) Implementing security patterns, (3) Defining account structures and constraints, (4) Building CPI interactions, (5) Testing with Mollusk/LiteSVM, (6) Deploying programs, or any Anchor/Solana program development questions.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Anchor Expert Guide - January 2026
## What is Anchor?
Anchor is a framework for Solana smart contract development that provides:
- **Security by default** - Automatic checks for common vulnerabilities
- **Simplified account management** - Declarative account validation
- **IDL generation** - Automatic TypeScript client generation
- **Testing framework** - Integrated testing with TypeScript
- **CLI tooling** - Build, deploy, test, upgrade programs
**Current Version**: 0.32.1
**Solana Version**: 1.18+ (compatible with 2.x)
## When to Use This Skill
- Writing Rust smart contracts for Solana
- Implementing secure account validation
- Building cross-program invocations (CPI)
- Testing programs with Mollusk or LiteSVM
- Deploying and upgrading programs
- Generating TypeScript clients
## Quick Reference
See `.claude/rules/programs.md` for comprehensive patterns and security checklist.
## Core Patterns
### Program Structure
```rust
use anchor_lang::prelude::*;
declare_id!("YourProgramId11111111111111111111111111111");
#[program]
pub mod my_program {
use super::*;
pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
// Implementation
Ok(())
}
}
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(init, payer = user, space = 8 + MyAccount::INIT_SPACE)]
pub my_account: Account<'info, MyAccount>,
#[account(mut)]
pub user: Signer<'info>,
pub system_program: Program<'info, System>,
}
#[account]
#[derive(InitSpace)]
pub struct MyAccount {
pub data: u64,
}
```
### Critical Security Rules
1. **ALWAYS verify account ownership**: Use `Account<'info, T>` not `AccountInfo`
2. **ALWAYS use checked arithmetic**: `.checked_add()`, `.checked_mul()`, etc.
3. **ALWAYS validate signers**: Use `Signer<'info>` for authorities
4. **ALWAYS store PDA bumps**: Store bump seeds in account data
5. **NEVER use init_if_needed without validation**: Reinitialization attacks
### Account Constraints
```rust
// Initialize new account
#[account(init, payer = user, space = 8 + SIZE)]
// PDA with seeds
#[account(seeds = [b"my-seed", user.key().as_ref()], bump)]
// Verify field matches
#[account(has_one = authority)]
// Custom constraint
#[account(constraint = amount > 0 @ ErrorCode::InvalidAmount)]
// Close account
#[account(close = authority)]
```
## Testing
### Mollusk (Fast Unit Tests)
```rust
use mollusk::Mollusk;
#[test]
fn test_initialize() {
let program_id = Pubkey::new_unique();
let mut mollusk = Mollusk::new(&program_id, "target/deploy/my_program");
// Test execution...
}
```
### Anchor Tests (Integration)
```bash
anchor test # Run all tests
anchor test --skip-local-validator # Skip starting validator
```
## Deployment
```bash
# Build
anchor build
# Deploy to devnet
anchor deploy
# Upgrade existing program
anchor upgrade target/deploy/program.so --program-id <ID>
# Verify
solana program show <PROGRAM_ID>
```
## Additional Resources
- Full patterns: `.claude/rules/programs.md`
- Anchor Docs: https://anchor-lang.com/docs
- Security Audit: https://github.com/coral-xyz/sealevel-attacksRelated Skills
appsec-expert
Elite Application Security engineer specializing in secure SDLC, OWASP Top 10 2025, SAST/DAST/SCA integration, threat modeling (STRIDE), and vulnerability remediation. Expert in security testing, cryptography, authentication patterns, and DevSecOps automation. Use when securing applications, implementing security controls, or conducting security assessments.
agent-qa-expert
Expert QA engineer specializing in comprehensive quality assurance, test strategy, and quality metrics. Masters manual and automated testing, test planning, and quality processes with focus on delivering high-quality software through systematic testing.
AI Integration Expert
Work with Leavn AI features - UnifiedAIService, on-device models, devotional generation, novelization, kids mode, image generation with Stable Diffusion
ai-engineer-expert
Expert-level AI implementation, deployment, LLM integration, and production AI systems
ai-architect-expert
Expert-level AI system design, MLOps, architecture patterns, and AI infrastructure
application-expert
UseCase 설계, Transaction 경계 관리, CQRS 적용. @Transactional 내 외부 API 호출 금지. /kb-application 명령 시 자동 활성화.
html-tailwind-css-and-javascript-expert-rule
Sets the AI to act as an expert in HTML, Tailwind CSS, and vanilla JavaScript, focusing on clarity and readability for all HTML, JS, and CSS files.
frontend-trends-2026
Collection of 2026 Frontend Design Formulas (Liquid Glass, Bento, Neo-Brutalism, Eco-Dark).
aria-expert
Expert knowledge of WAI-ARIA (Accessible Rich Internet Applications). Use when users ask about ARIA roles, states, properties, accessible name computation, ARIA attributes (aria-label, aria-labelledby, aria-describedby, etc.), widget roles, landmark roles, live regions, ARIA best practices, or how to implement accessible interactive components. Also use for questions about ARIA specifications, API mappings (core-aam, html-aam), digital publishing ARIA (dpub-aria), graphics ARIA, or any ARIA implementation questions.
angular-expert
Angular framework expert including components, services, RxJS, templates, and testing
service-mesh-expert
Expert service mesh architect specializing in Istio, Linkerd, and cloud-native networking patterns. Masters traffic management, security policies, observability integration, and multi-cluster mesh con
playwright-expert
Use when writing E2E tests with Playwright, setting up test infrastructure, or debugging flaky browser tests. Invoke for browser automation, E2E tests, Page Object Model, test flakiness, visual testing, CI/CD pipeline optimization.