360 Secure SkillHub
360 安全技能中心

code-craft

该 Skill 以工程约定指导代码设计:先让类型、linter、效果和证明承担不变量,再把无法证明的部分交给测试;覆盖非法状态、边界解析、依赖与资源生命周期、可恢复错误、前置条件证明、抽象取舍和架构文档。它按需读取语言参考,并复用仓库既有约定。

分类:开发
jssblck
热度 0.00
最近更新 2026-10-21 02:47:00

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jssblck/agents/code-craft
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
code-craft
description
Apply Jess's engineering conventions to invariants, boundary typing, state, effects, proofs, error handling, and abstraction decisions.
user-invocable
true
argument-hint
[rust|typescript|go|python] [target]

Code craft

Prove what the types can, then test only what they cannot. Every invariant has one owner: the strongest rung of the proof ladder that can actually prove it. In order: types and linters, effects, proofs, database constraints, unit tests, integration tests, end-to-end tests.

Use the repository's current instructions and established conventions. Apply these defaults where the requested change needs a design decision; they do not authorize unrelated restructuring or new tooling.

Read the reference for the decision in scope:

Decision Reference
Decide which rung owns an invariant Proof ladder
Represent states, workflows, and domain identities Illegal states
Decode external input into useful types Parse, don't validate
Type dependencies, failures, and resource lifetimes Effects
Model recoverable errors and required gates Errors as values
Guard a sensitive precondition Proof parameters
Choose an abstraction or investigate performance Simplicity
Maintain module boundaries and their documentation Architecture docs

Read a language reference only when its idioms, concurrency, or tooling details matter: TypeScript, Rust, Go, or Python.

For new TypeScript code and the full project template, Jess's stack is Effect, Effect Schema or Zod, xstate, and gdp-ts. For new Rust servers it is tokio, axum, snafu, aerosol, and sqlx. In an existing repository, use its equivalents; adding any of these is an architecture change to ask about first.

Use database-craft for schemas, constraints, queries, and jobs, and testing-craft for the test rungs. Repository setup belongs to project-bootstrap when that setup is requested. Follow the project's required verification; reviews do not automatically require a full test suite.

Adapted from leonardomso/rust-skills (MIT), Matklad's Rust100k series, Alexis King's writing on parsing and type safety, and Matt Noonan's Ghosts of Departed Proofs.