Gen Coding Specs

基于模板为当前工作空间生成完整技术编码规范,写入 docs/coding-specs/,供 gen-code 与其它技能消费。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 43 · 0 current installs · 0 all-time installs
byLiu Feng@lf951515851
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (generate project coding specs) match the instructions and included files: templates for 12 coding.*.md files exist and the SKILL.md/prompt describe reading those templates and writing docs/coding-specs/*.md. It does not request unrelated credentials, binaries, or config paths.
Instruction Scope
Runtime instructions are limited to scanning the workspace to infer tech stack, validating template presence, prompting on existing docs (per prompt.md), creating docs/coding-specs/ and writing the templated markdown files. It does not instruct reading unrelated secrets, external endpoints, or modifying other skill/system configs.
Install Mechanism
No install spec and no code to download or execute. This instruction-only skill carries low install risk; all required templates are included in the bundle.
Credentials
The skill requests no environment variables, credentials, or config paths. The workspace file reads (pom.xml, package.json, etc.) are appropriate for detecting the tech stack and are proportionate to the stated purpose.
Persistence & Privilege
always is false and the skill does not request elevated persistence. It only writes to docs/coding-specs/ (the spec enforces this) and does not modify other skills or system settings.
Assessment
This skill is instruction-only and coherent with its purpose. Before running: (1) back up any existing docs/coding-specs/ because the skill will write/overwrite files (the prompt.md describes a confirmation step when files exist); (2) ensure the templates/ directory is present alongside the skill (the generator reads templates relative to the skill directory); (3) review the generated Markdown before letting downstream skills (eg. gen-code) consume it. The skill will scan project files (pom.xml, package.json, source files) to detect tech stack — this is expected behavior for tailoring the specs, not a data-exfiltration step. If you have policies restricting automated writes or workspace scans, review those before enabling autonomous invocation.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk972bctea84q709tn2eqgxer0983tc4n

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

gen-coding-specs - 生成技术编码规范

技能 ID: gen-coding-specs
版本: 1.3.0

目标

为当前工作空间生成完整的编码规范文档(docs/coding-specs/coding.*.md),使 AI 与开发者对技术栈、接口、风格、测试等达成一致;gen-code 读取路径一致(见 skills/SKILLS-FILE-OUTPUT.md 第五节)。

模板来源(技能自备)

模板与本技能同目录维护,路径:

  • 本仓库skills/gen-coding-specs/templates/(与 SKILL.md 同级下的 templates/
  • 仅拷贝本技能到目标项目时:请保留 gen-coding-specs/templates/ 整目录,与 SKILL.md 一并拷贝;生成时从此目录读取,写入项目内 docs/coding-specs/

执行生成时,以 templates/ 为相对路径(相对于本技能目录)解析各 coding.*.md 源文件。

执行步骤

完整执行流程、12 分册定制规则、交叉一致性校验见 prompt.md

1. 分析工作空间

  • 技术栈:语言、框架、数据库、构建工具等
  • 项目结构:目录与模块划分
  • 业务领域:简要背景
  • 现有规范:是否已有 docs/coding-specs/ 内容

2. 创建规范目录

若不存在则创建(须先建目录再写文件):

mkdir -p docs/coding-specs

3. 生成规范文档

按模板生成并落盘到 docs/coding-specs/,文件名固定:

输出文件模板
coding.index.mdtemplates/coding.index.md
coding.api.mdtemplates/coding.api.md
coding.architecture.mdtemplates/coding.architecture.md
coding.data-models.mdtemplates/coding.data-models.md
coding.vue.mdtemplates/coding.vue.md
coding.coding-style.mdtemplates/coding.coding-style.md
coding.testing.mdtemplates/coding.testing.md
coding.security.mdtemplates/coding.security.md
coding.performance.mdtemplates/coding.performance.md
coding.documentation.mdtemplates/coding.documentation.md
coding.code-review.mdtemplates/coding.code-review.md
coding.version-control.mdtemplates/coding.version-control.md

4. 定制

按项目填充技术栈、示例与团队约定;保持各分册之间无冲突。

5. 验证

  • 索引 coding.index.md 可导航到各分册
  • 内容反映真实技术栈与约束
  • 格式正确、含必要示例

输出与衔接

  • 落盘:遵守 SKILLS-FILE-OUTPUT.md
  • 后续gen-code 等技能执行时须直接读取 docs/coding-specs/ 下对应 coding.*.md(见 coding.index.md 索引),无需单独「加载上下文」技能。
  • 规范随项目变更:可再次执行本技能覆盖生成,或直接编辑 docs/coding-specs/ 下 Markdown。

相关技能

前置技能

  • gen-design: 系统设计,提供技术栈和边界定义

后续技能

  • gen-code: 主要消费者,读取技术规范作为编码风格标准
    • 注意:若项目采用契约驱动开发,gen-code 优先读取 contract-gen 输出的 YAML 契约
    • 本技能生成的 Markdown 规范作为风格标准(命名规范、代码格式等)
  • contract-gen: 契约生成,生成机器可读的 YAML 契约
    • 本技能生成规范后,可执行 contract-gen 生成精确的结构定义
    • 契约应遵循本技能的规范(如 coding.api.md 的接口风格、coding.data-models.md 的命名规范)
  • review-code: 审查时对照本规范分册

技能分工

技能输出用途gen-code 读取优先级
gen-coding-specsdocs/coding-specs/*.md风格规范(命名、格式、代码风格)🟡 中(风格)
contract-gendocs/contracts/*.yaml精确结构定义(表名、字段、API 路径)🔴 高(优先)

建议流程

  • 标准流程gen-designgen-coding-specsgen-code
  • 契约驱动gen-designgen-coding-specscontract-gengen-code

全链路见 SKILL-VALUE-CHAIN.md


本技能替代原「command + instructions」安装方式;不再向 .cursor/commands 等目录安装命令文件。

Files

15 total
Select a file
Select a file to preview.

Comments

Loading comments…