pn-rust-scaffolding

pn-rust-scaffolding is a skill for Cursor from perniemann/pnCore. It costs 54 tokens per session (1,480 once invoked), scanned A, original, MIT.

A starting structure for Rust web APIs and route handlers using Axum or Actix-web. Rust is a programming language, while an API lets other programs communicate with your service.

In plain words
What is it for?
Use it to start a Rust API, add a route or domain handler, or organize several Rust packages in a Cargo workspace.
Why use it?
It gives a new Rust backend a consistent layout for routes, business logic, data models, configuration, and error handling.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to start a Rust API, add a route or domain handler, or organize several Rust packages in a Cargo workspace.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-rust-scaffolding
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add perniemann/pnCore --skill pn-rust-scaffolding
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pn-rust-scaffolding

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-rust-scaffolding/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-rust-scaffolding)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-rust-scaffolding"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-rust-scaffolding/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pn-rust-scaffolding

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-rust-scaffolding"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-rust-scaffolding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,480 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01480
Opus 5 $0.00027 $0.00740
Sonnet 5 $0.00011 $0.00296
Haiku 4.5 $0.00005 $0.00148

Measured 8d ago against content hash 46e1448ab557, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pn-rust-scaffolding scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/pn-core-mcp/content/skills/backend/pn-rust-scaffolding/SKILL.md · 203 lines

How it starts

The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rust backend scaffolding

When to use

  • Starting a new Rust API project with Axum or Actix-web.
  • Adding a new route module or domain handler.
  • Setting up a Cargo workspace for multiple crates.

Project structure

# Single binary — Axum
src/
  main.rs             # Entry point: build router, start server
  routes/
    mod.rs            # Collect and export all route modules
    users.rs          # User route handlers
    orders.rs
  services/
    mod.rs
    users.rs          # Business logic
  db/
    mod.rs
    pool.rs           # sqlx pool setup
  models/
    user.rs           # Serde/sqlx types
  errors.rs           # AppError enum + IntoResponse impl
  config.rs           # Typed config from environment

Cargo.toml
.env.example

For larger projects: Cargo workspace with separate crates (api, domain, infrastructure).

Axum scaffold

// src/errors.rs
use axum::{http::StatusCode, response::{IntoResponse, Response}, Json};
use serde_json::json;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum AppError {
    #[error("Not found")]
    NotFound,
    #[error("Forbidden")]
    Forbidden,
    #[error("Validation failed: {0}")]
    Validation(String),
    #[error("Database error: {0}")]
    Db(#[from] sqlx::Error),
    #[error("Internal error")]
    Internal,
}

impl IntoResponse for AppError {
    fn into_response(self) -> Response {
        let (status, code) = match &self {
            AppError::NotFound    => (StatusCode::NOT_FOUND, "NOT_FOUND"),
            AppError::Forbidden   => (StatusCode::FORBIDDEN, "FORBIDDEN"),
            AppError::Validation(_) => (StatusCode::UNPROCESSABLE_ENTITY, "VALIDATION_FAILED"),
            AppError::Db(_)       => (StatusCode::INTERNAL_SERVER_ERROR, "DB_ERROR"),
            AppError::Internal    => (StatusCode::INTERNAL_SERVER_ERROR, "INTERNAL_ERROR"),
        };
        let body = json!({ "error": { "code": code, "message": self.to_string() } });
        (status, Json(body)).into_response()
    }
}

Read the full file on GitHub · 203 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 203 lines · 54 tokens per session scan A 46e1448ab557

Subscribe to this mod's changes

pn-rust-scaffolding is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 5d ago), licensed MIT. It adds 54 tokens to every session and 1,480 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

chat-sdk

Build multi-platform chat bots with Chat SDK (chat npm package). Use when developers want to (1) Build a Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, or WhatsApp bot, (2) Use Chat SDK to handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, modals, files, or AI…

vercel-labs/open-agents · 191 tokens

azure-identity-ts

Authenticate to Azure services using Azure Identity library for JavaScript (@azure/identity). Use when configuring authentication with DefaultAzureCredential, managed identity, service principals, or interactive browser login.

microsoft/skills · 41 tokens

typescript

TypeScript coding conventions, best practices, and patterns for writing clean, maintainable code.

genkit-ai/genkit · 20 tokens

ax-rust-llm

Use when writing Rust code with axllm for using the generated Ax package, factory functions, package docs, examples, and API reference.

ax-llm/ax · 37 tokens

zod-validation-utilities

Creates reusable Zod v4 schemas, validates API payloads, forms, and configuration input, transforms and coerces data safely, and handles validation errors with strong type inference for TypeScript applications. Use when designing validation layers, parsing z.string(), z.object(), or z.email() schemas, or implementing…

giuseppe-trisciuoglio/developer-kit · 77 tokens

rust-engineer

Acquire expert Rust developer specialisation in rust systems programming, memory safety, and zero-cost abstractions. Masters ownership patterns, async programming, and performance optimisation for mission-critical applications.

sammcj/agentic-coding · 39 tokens