thiserror-expert
Improve Rust Errors with thiserror
Rust error enums can become verbose and lose source context. This skill guides Claude, Codex, and Claude Code to create idiomatic thiserror types.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "thiserror-expert" from https://skillstore.io/skills/emillindfors-thiserror-expert.md and its manifest at https://skillstore.io/api/skills/emillindfors-thiserror-expert/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "thiserror-expert". A manual Display implementation for a small Rust error enum.
Expected outcome:
The skill recommends a concise thiserror derive, clearer variant messages, and removal of repetitive display boilerplate.
Using "thiserror-expert". An error variant that wraps an IO error without source metadata.
Expected outcome:
The skill explains that the underlying cause should be preserved, so callers can inspect the original IO failure.
Using "thiserror-expert". A layered service with database, domain, and application failures.
Expected outcome:
The skill proposes separate error enums for each layer and describes where automatic conversions should occur.
Security Audit
SafeThe static findings are false positives from Markdown backticks, Rust code fences, and Rust validation examples in SKILL.md. I found no prompt injection, command execution instructions, network access, filesystem writes, or data exfiltration intent.
Risk Factors
⚙️ External commands (48)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/emillindfors-thiserror-expert/audits/4?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/emillindfors-thiserror-expert?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/emillindfors-thiserror-expert?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/emillindfors-thiserror-expert/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/emillindfors-thiserror-expert.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA · BibTeX · CFF)
APA citation
EmilLindfors. (2026). thiserror-expert security audit report (audit version 4) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/emillindfors-thiserror-expert/audits/4BibTeX citation
@techreport{emillindfors-emillindfors-thiserror-expert-2026,
author = {EmilLindfors},
title = {thiserror-expert security audit report (audit version 4)},
institution = {Skillstore},
year = {2026},
number = {4},
url = {https://skillstore.io/skills/emillindfors-thiserror-expert/audits/4},
note = {Author version 1.0.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "thiserror-expert security audit report (audit version 4)"
version: "1.0.0"
type: report
authors:
- name: "EmilLindfors"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/emillindfors-thiserror-expert/audits/4"
identifiers:
- type: other
value: "skillstore:emillindfors-thiserror-expert:audit:4"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Refactor manual error implementations
Convert hand-written Display and Error implementations into concise thiserror enums.
Design library error APIs
Create stable public error types with clear messages and preserved source chains.
Review error propagation patterns
Check whether #[from], #[source], or transparent wrappers fit each error boundary.
Try These Prompts
Review my Rust error enum and suggest a thiserror version with clear messages and correct derives.
Check my error variants for missing source chains. Explain where #[from] or #[source] should be used.
Design thiserror enums for my domain, infrastructure, and application layers. Explain the conversion boundaries.
Audit my public Rust error API for thiserror usage, stable variant names, source preservation, and actionable messages.
Best Practices
- Use actionable error messages that include useful context without exposing secrets.
- Preserve underlying causes with #[from], #[source], or transparent wrappers when appropriate.
- Keep public library errors stable and avoid leaking private implementation details.
Avoid
- Using vague messages such as Error or Something went wrong.
- Wrapping dependency errors without preserving the source chain.
- Using #[from] when custom context must be added during construction.
Frequently Asked Questions
What does this skill help with?
Does it run cargo commands?
When should I use #[from]?
When should I use #[source]?
Can it help with library APIs?
Does it replace error handling design?
Developer Details
Author
EmilLindforsLicense
MIT
Author version
v1.0.0
Skillstore revision
r1
Ref
a06681402992ceae98ba04d54cfd4ab004862696
Maintenance freshness
7/18/2026
Usage
4 downloads · 192 views
File structure
📄 SKILL.md