aif-implement

Enforce Rust coding standards for new crates, error handling, and async traits.

2|Updated May 26, 2025
One-click install
npx skills add https://github.com/vanyastaff/nebula --skill aif-implement-vanyastaff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aif-implement
Source: https://github.com/vanyastaff/nebula/tree/main/.ai-factory/skill-context/aif-implement
Command: npx skills add https://github.com/vanyastaff/nebula --skill aif-implement-vanyastaff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that all new code adheres to the project's established coding standards and best practices, preventing common errors and improving code maintainability.

Core Features & Use Cases

  • Standardized Error Handling: Enforces the use of thiserror with specific derive attributes and factory constructors.
  • Crate Structure: Provides a template for new Rust crates, including public modules and re-exports.
  • Linting Conventions: Mandates the use of #[expect(lint, reason = "...")] over #[allow(lint)].
  • Async Trait Usage: Guides the implementation of async methods, favoring RPITIT and specifying when async-trait is necessary.
  • Use Case: When developing a new Rust library, this Skill will automatically generate a lib.rs file that conforms to the project's structure and includes the correct error handling patterns.

Quick Start

Apply the aif-implement skill to enforce project coding standards for new Rust crates.

Frequently Asked Questions about aif-implement

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

FAQPage Schema
How do I enforce Rust coding standards for error handling in new crates?

Standardized Rust crate structure requires a `lib.rs` file with public modules and re-exports. Applying project standards automatically generates this template, ensuring new libraries conform to established architectural patterns immediately.

What is the best way to suppress lints in Rust without violating coding standards?

The best way to suppress lints in Rust without violating coding standards is to use `#[expect(lint, reason = "...")]` instead of `#[allow(lint)]`. This mandates explicit reasoning for lint suppressions within your project.

Does Rust async trait implementation require the async-trait crate?

Rust async trait implementation does not always require the `async-trait` crate. You should favor RPITIT (Return Position Impl Trait In Traits) for async methods, only specifying `async-trait` when necessary for your specific use case.

How do I structure a new Rust crate to comply with project best practices?

Structuring a new Rust crate to comply with best practices involves generating a standardized `lib.rs` file with public modules and re-exports. This enforces correct architectural patterns and error handling from the start.