sage-codebase

Guide Rust development in the sage-protocol/sage monorepo with CI-enforced standards.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/sage-protocol/sage-pi-adapter --skill sage-codebase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sage-codebase
Source: https://github.com/sage-protocol/sage-pi-adapter/tree/main/.claude/skills/sage-codebase
Command: npx skills add https://github.com/sage-protocol/sage-pi-adapter --skill sage-codebase

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to the Sage Protocol's Rust codebase, ensuring adherence to architectural patterns, coding conventions, and build/lint requirements, thereby streamlining development and maintaining code quality.

Core Features & Use Cases

  • Codebase Navigation: Understand the workspace layout and internal crate aliasing.
  • Build & Lint Enforcement: Learn the mandatory commands for formatting and linting, enforced by CI.
  • Coding Standards: Follow strict rules for line width, edition, MSRV, tabs, imports, and field initialization.
  • Error Handling: Implement the dual-layer pattern using thiserror and anyhow.
  • Async Runtime & Serialization: Understand Tokio usage, async traits, and serialization best practices for IPC.
  • Protocol & Architecture: Grasp MCP protocol details, daemon architecture, and Iced GUI patterns.
  • Testing & Configuration: Learn testing strategies and configuration management.

Quick Start

Load this skill at session start for any Rust development task in the sage-protocol/sage repository.

Frequently Asked Questions about sage-codebase

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

FAQPage Schema
How is the Sage Protocol Rust codebase organized for workspace layout and crate aliasing?

The Sage Protocol Rust codebase uses a structured workspace layout with internal crate aliasing to separate concerns. This organization streamlines navigation and development across the monorepo.

How do I enforce build and linting standards for Sage Protocol Rust development?

To enforce build and linting standards for Rust development, run the mandatory formatting and linting commands specified by the Sage Protocol. These commands are strictly enforced by the CI pipeline.

What error handling pattern does the Sage Protocol use for Rust?

The Sage Protocol uses a dual-layer error handling pattern in Rust, combining `thiserror` for library-level errors and `anyhow` for application-level errors. This approach ensures robust and structured error management.

How does asynchronous programming work in the Sage Protocol Rust daemon?

Asynchronous programming in the Sage Protocol Rust daemon utilizes the Tokio runtime and async traits. This setup supports efficient concurrent operations and manages IPC serialization effectively.

Does the Sage Protocol Rust codebase support Iced GUI development patterns?

Yes, the Sage Protocol Rust codebase supports Iced GUI development patterns. It provides specific architectural guidance for building interfaces within the daemon-centric monorepo structure.

What testing methodologies are required for Sage Protocol Rust crates?

Required testing methodologies for Sage Protocol Rust crates include standard Rust testing strategies and configuration management practices. These ensure code quality and adherence to CI-enforced standards.