Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计提醒

quasarquasar 命令行

Agent Skill

quasar 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

242

周安装

10

GitHub Stars

1

下载量

79
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:quasar(quasar 命令行)
来源仓库:https://github.com/rohitdevsol/quasar-skill
仓库路径:skills/quasar
安装命令:
npx skills add https://github.com/rohitdevsol/quasar-skill --skill quasar
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/rohitdevsol/quasar-skill --skill quasar

简介

用于处理 GitHub 仓库和协作信息,支持 Issue 与 PR 管理。

  • 适合围绕代码变更和仓库状态进行整理与跟踪。quasar 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 可结合仓库 README 核验具体用法,提升协作效率。
  • 安装前建议确认 token 权限和仓库访问范围。
  • 适用于 Codex、Claude、Cursor 等主流 AI 宿主环境。

SKILL.md

Quasar — Zero-Copy Solana Program Framework

Quasar is a no_std Solana program framework. Accounts are pointer-cast directly from the SVM input buffer — no deserialization, no heap allocation, no copies. The syntax resembles Anchor but the types and patterns are completely different. Never use Anchor types.

Reference Files — Read Before Coding

Before writing code for any non-trivial feature, read the relevant reference file:

TopicWhen to read
references/accounts.mdAccount types, constraints, dynamic fields (String, Vec), sysvars, remaining accounts
references/tokens.mdquasar-spl, SPL token CPI, Token-2022, ATAs, mint/burn/approve
references/testing.mdQuasarSvm full API, test patterns, chaining, error matching
references/solana-model.mdSolana account model, PDAs, rent, CPI mechanics — read this when building anything new

If you're unsure which reference applies, read solana-model.md first, then the others.


Cargo.toml

[package]
name = "my_program"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[features]
alloc = []
client = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-spl  = { git = "https://github.com/blueshift-gg/quasar" }  # only if using SPL tokens

[dev-dependencies]
my_program-client = { path = "target/client/rust/my_program-client" }
quasar-svm        = { git = "https://github.com/blueshift-gg/quasar-svm" }
solana-address    = { version = "2.2.0", features = ["decode"] }
solana-keypair    = "3.1.2"
solana-pubkey     = { version = "4.1.0" }

Quasar.toml

[project]
name = "my_program"

[toolchain]
type = "solana"

[testing]
framework = "quasarsvm-rust"

lib.rs — Program Entry Point

#![cfg_attr(not(test), no_std)]   // ← always this, not just #![no_std]

use quasar_lang::prelude::*;
mod instructions;
use instructions::*;
mod state;   // #[account] types
mod event;   // #[event] types

declare_id!("YourBase58ProgramIdHere111111111111111111111");

#[program]
mod my_program {
    use super::*;

    // Ctx<T> — standard instruction
    #[instruction(discriminator = 0)]
    pub fn deposit(ctx: Ctx<Deposit>, amount: u64) -> Result<(), ProgramError> {
        ctx.accounts.deposit(amount)
    }

    // CtxWithRemaining<T> — when you need extra accounts at runtime
    #[instruction(discriminator = 1)]
    pub fn create(ctx: CtxWithRemaining<Create>, threshold: u8) -> Result<(), ProgramError> {
        ctx.accounts.create_multisig(threshold, &ctx.bumps, ctx.remaining_accounts())
    }

    // String<N> instruction arg — fixed-max-length string parameter
    #[instruction(discriminator = 2)]
    pub fn set_label(ctx: Ctx<SetLabel>, label: String<32>) -> Result<(), ProgramError> {
        ctx.accounts.update_label(label)
    }
}

#[cfg(test)]
mod tests;

Key rules:

  • #![cfg_attr(not(test), no_std)] — lets tests use std.
  • #[instruction(discriminator = N)] on every handler. Values must be unique.
  • Return type is always Result<(), ProgramError>.
  • Use Ctx<T> normally; CtxWithRemaining<T> only when you need extra runtime accounts.

Account Types (QUASAR — not Anchor)

Every accounts struct field is a reference with a 'info lifetime:

// Standard account reference types:
pub signer:         &'info mut Signer              // writable signer
pub reader:         &'info Signer                  // read-only signer
pub unchecked:      &'info mut UncheckedAccount    // unvalidated, writable
pub my_account:     &'info mut Account<MyStruct>   // typed, writable
pub readonly_acct:  &'info Account<MyStruct>       // typed, read-only

// For accounts with dynamic fields (String/Vec), pass the lifetime through:
pub config:         Account<MultisigConfig<'info>>  // ← note: no & ref, lifetime threaded

// Programs:
pub system_program: &'info Program<s>              // system program
pub token_program:  &'info Program<Token>          // SPL token program

// Sysvars (read reference file for full usage):
pub rent:           &'info Sysvar<Rent>
pub clock:          &'info Sysvar<Clock>

Never write Account<'info, T>, Signer<'info>, Program<'info, T> — those are Anchor and will not compile.

Address access: .address() (never .key())


Accounts Struct — Constraints

#[derive(Accounts)]
pub struct Make<'info> {
    pub maker: &'info mut Signer,

    #[account(init, payer = maker, seeds = [b"escrow", maker], bump)]
    pub escrow: &'info mut Account<Escrow>,

    #[account(
        has_one = maker,          // escrow.maker == maker.address()
        has_one = maker_ata_b,    // escrow.maker_ata_b == maker_ata_b.address()
        constraint = escrow.receive > 0,
        close = maker,            // close and send rent to maker
        seeds = [b"escrow", maker],
        bump = escrow.bump        // reuse stored bump, saves CUs
    )]
    pub escrow_close: &'info mut Account<Escrow>,

    pub system_program: &'info Program<s>,
}

Full constraint table: mut, seeds, bump, bump = field.bump, init, init_if_needed, payer, space, address, has_one, constraint, close, token::mint, token::authority


On-Chain Account Types

// Fixed fields only:
#[account(discriminator = 1)]
pub struct Escrow {
    pub maker: Address,
    pub receive: u64,
    pub bump: u8,
}

// With dynamic fields — add a lifetime:
#[account(discriminator = 2)]
pub struct Profile<'a> {
    pub owner: Address,
    pub score: u64,
    pub name: String<'a, 32>,         // String<'lifetime, MAX_BYTES>
    pub tags: Vec<'a, Address, 10>,   // Vec<'lifetime, T, MAX_COUNT>
}

Set all fields at once with set_inner(...) — positional, generated by the macro:

self.escrow.set_inner(
    *self.maker.address(),
    receive,
    bumps.escrow,
);

For accounts with dynamic fields, set_inner also takes a payer and optional rent:

self.config.set_inner(
    *self.creator.address(),
    threshold,
    bumps.config,
    "",           // label (empty string)
    signers,      // &[Address]
    self.creator.to_account_view(),   // payer for realloc
    Some(&**self.rent),               // rent sysvar
);

Auto-generated field accessors: self.config.label(), self.config.signers(), self.config.threshold


Events

#[event(discriminator = 0)]     // discriminator always required
pub struct MakeEvent {
    pub escrow: Address,
    pub amount: u64,
}
emit!(MakeEvent { escrow: *self.escrow.address(), amount });

Errors

#[error_code]
pub enum MyError {
    #[msg("unauthorized")]
    Unauthorized,     // → ProgramError::Custom(3000)
    #[msg("bad input")]
    BadInput,         // → ProgramError::Custom(3001)
}
require!(amount > 0, MyError::BadInput);
require_eq!(a, b, MyError::Unauthorized);
require_keys_eq!(self.escrow.maker, *self.maker.address(), MyError::Unauthorized);

System Program CPI

// Signer pays:
self.system_program.transfer(self.signer, self.vault, amount).invoke()?;

// PDA pays (uses stored bump seeds):
let seeds = bumps.vault_seeds();
self.system_program.transfer(self.vault, self.recipient, amount).invoke_signed(&seeds)?;

// Direct lamport manipulation (program-owned accounts, no CPI):
let vault  = self.vault.to_account_view();
let signer = self.signer.to_account_view();
set_lamports(vault, vault.lamports() - amount);
set_lamports(signer, signer.lamports() + amount);

CLI

quasar init <n>               # scaffold new project
quasar build                     # compile + generate client crate
quasar build --watch             # watch mode
quasar test                      # cargo test (build first)
quasar deploy                    # deploy per Quasar.toml
quasar new instruction <n>    # scaffold instruction file
quasar idl                       # IDL only
quasar clean                     # clean artifacts

Always run quasar build before quasar test — tests include_bytes! the compiled .so.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.33%
按下载量换算26

Claude

31.16%
按下载量换算25

Cursor

18.3%
按下载量换算14

Gemini CLI

9.1%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills