bk-implement-rust

Generates idiomatic Rust code with spec traceability markers from implementation plans and validates via cargo check, clippy, and tests.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/dikini/knot --skill bk-implement-rust
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bk-implement-rust
Source: https://github.com/dikini/knot/tree/main/.agents/skills/bk-implement-rust
Command: npx skills add https://github.com/dikini/knot --skill bk-implement-rust

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the generation of idiomatic Rust code, complete with tests and traceability markers, directly from implementation plans and specifications.

Core Features & Use Cases

  • Code Generation: Writes Rust modules, types, traits, and functions following best practices.
  • Traceability: Integrates spec compliance markers (SPEC-FR-N, CONCERN-ID, etc.) for auditability.
  • Testing: Generates unit and integration tests based on acceptance criteria.
  • Use Case: When tasked with implementing a new feature defined in a bk-plan document, this Skill can generate the initial Rust codebase, ensuring it adheres to specifications and includes necessary tests.

Quick Start

Implement task CA-003 from the cache implementation plan, ensuring TTL support and eviction.

Frequently Asked Questions about bk-implement-rust

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

FAQPage Schema
How do I generate idiomatic Rust code from an implementation plan?

To generate idiomatic Rust code from an implementation plan, use a tool that automates module, type, trait, and function creation with spec traceability markers. This ensures your generated codebase follows Rust best practices and includes necessary unit and integration tests based on acceptance criteria.

What is spec traceability in Rust code generation?

Spec traceability in Rust code generation integrates compliance markers like SPEC-FR-N and CONCERN-ID directly into your source code. This mechanism ensures auditability by linking generated modules, types, and functions back to your original implementation specifications and acceptance criteria.

Does generated Rust code include error handling and async patterns?

Generated Rust code includes error handling and async patterns by utilizing derive macros and libraries like thiserror or anyhow. It writes functions following Rust best practices, ensuring robust error management and asynchronous execution directly within the generated modules.

Can I run cargo check and clippy validation on generated Rust code?

You can run cargo check and clippy validation on generated Rust code because the generation process includes built-in validation steps. The workflow executes cargo check, runs clippy for linting, and performs test execution to verify that the idiomatic Rust output meets quality standards.

How do I create Rust unit and integration tests from acceptance criteria?

You can create Rust unit and integration tests from acceptance criteria by using an automated code generation workflow. The process analyzes your implementation plan and outputs test suites alongside your modules and types, ensuring your codebase validates the required behaviors and spec compliance.