new-subcommand SKILL.md skillA

new-subcommand from minleev5/devkeel is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add minleev5/devkeel/new-subcommand@v1.0.0

Pins v1.0.0 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
minleev5/devkeel
Path
.harness/skills/new-subcommand/SKILL.md
Versions recorded
1
Latest version
v1.0.0, committed Sep 22, 2026
Size
1,730 bytes
Repository stars
6
License
MIT

为 DevKeel CLI 新增子命令的标准开发流程.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# 子命令实现

## 何时使用

为 DevKeel CLI 新增一个子命令时(如 `harness <new-cmd>`)。

## 流程

### Step 1: 注册命令

在 `src/index.ts` 中添加:

```typescript
import { runNewCmd } from './commands/new-cmd.js'

program
  .command('new-cmd')
  .description('中文功能描述')
  .option('--flag', '选项说明')
  .action((opts) => runNewCmd(opts))
```

### Step 2: 实现命令层

创建 `src/commands/new-cmd.ts`:

```typescript
import * as p from '@clack/prompts'
import { someLogic } from '../lib/new-cmd.js'

export async function runNewCmd(opts?: { flag?: boolean }): Promise<void> {
  p.intro('harness new-cmd')
  // 交互 + 调用 lib
  p.outro('完成')
}
```

命令层只做:读参数 → 交互 → 调用 lib → 输出结果。

### Step 3: 实现逻辑层

创建 `src/lib/new-cmd.ts`:

- 纯函数,不引入 `@clack/prompts`
- 文件操作前 `fs.existsSync` 守卫
- 返回 plain object 或 null,不 throw

### Step 4: 编写测试

创建 `tests/new-cmd.test.ts`:

- 临时目录隔离(`fs.mkdtempSync`)
- 真实文件系统验证
- 覆盖正常路径 + 缺失输入 + 幂等性

### Step 5: 验证

```bash
pnpm lint && pnpm test && pnpm build
node bin/devkeel.js new-cmd --help
```

## Checklist

- [ ] `src/index.ts` 注册命令
- [ ] `src/commands/new-cmd.ts` 交互层
- [ ] `src/lib/new-cmd.ts` 逻辑层(如有复杂逻辑)
- [ ] `tests/new-cmd.test.ts` 测试
- [ ] `pnpm lint` + `pnpm test` 通过

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add minleev5/devkeel/new-subcommand@sha256:83b813cff1129487

The line at the top of this page pins the label v1.0.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_pyte2pgzblfkabeq.svg)](https://markdownregistry.com/a/art_pyte2pgzblfkabeq)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Sep 22, 2026.

versioncommittedcommitsizeaudit
v1.0.0 latest2026-09-22 123429c 1,730 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (1730 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

minleev5/devkeel · 6 stars · license MIT · pushed 2026-10-26 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_pyte2pgzblfkabeq
GET https://markdownregistry.com/api/v1/resolve?ref=minleev5/devkeel/new-subcommand
GET https://markdownregistry.com/api/v1/blob/83b813cff1129487f45b2b7f5e5804ca81130939d47403d9a6186713b8d088ce

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from minleev5/devkeel

brainstorming SKILL.md skill
minleev5/devkeel · .harness/skills/brainstorming/SKILL.md · 探索、比较、挑战或补全开发方案;按 Lite/Full 深度进行单题访谈,并在用户同意持久化后维护 OpenSpec Living brainstorm。
v9.1.1 · audit A · 6 stars
changelog SKILL.md skill
minleev5/devkeel · .harness/skills/changelog/SKILL.md · Use when 编辑 changelog、发布 CLI 或模板版本、或判断某项用户可见变更是否需要进入版本记录。
v3.0.0 · audit A · 6 stars
commit SKILL.md skill
minleev5/devkeel · .harness/skills/commit/SKILL.md · 用户明确选择 commit、push 或 MR/PR 后使用的原子交付流程。任务完成或归档本身不触发;在授权范围内完成交付目标及其必要动作。
v1.2.4 · audit A · 6 stars
doc-maintenance SKILL.md skill
minleev5/devkeel · .harness/skills/doc-maintenance/SKILL.md · CLI 文档维护与一致性检查流程
v1.2.0 · audit A · 6 stars
domain-init SKILL.md skill
minleev5/devkeel · .harness/skills/domain-init/SKILL.md · 对项目进行全盘扫描,识别领域类型和技术栈,通过多 subAgent 并行扫描多维度, 生成项目知识 docs 与专属 rules、skills 和 agents。使用「自动 baseline + 交互式增强」…
v2.1.0 · audit A · 6 stars
health-check SKILL.md skill
minleev5/devkeel · .harness/skills/health-check/SKILL.md · 一键检查项目代码健康度指标
v1.0.0 · audit A · 6 stars
instruction-maintenance SKILL.md skill
minleev5/devkeel · .harness/skills/instruction-maintenance/SKILL.md · 精简并校验 AGENTS.md、OpenSpec schema/instruction、OPSX commands、SKILL.md、prompt 与 artifact 模板。用于审查当前 diff…
v1.0.0 · audit A · 6 stars
jira-defect-orchestrator SKILL.md skill
minleev5/devkeel · .harness/skills/jira-defect-orchestrator/SKILL.md · 独立编排 Jira 缺陷的取证、修复、验证、回填与 MR 交付,按决策风险确认。适用于用户提供 Jira URL 或 issue key,要求结合运行日志、配置、只读业务数据和代码证据处理生产或测试环境缺陷;普通无 Jira…
v1.3.2 · audit A · 6 stars
openspec-apply-change SKILL.md skill
minleev5/devkeel · .harness/skills/openspec-apply-change/SKILL.md · 按 OpenSpec 动态 apply instruction 实施 change tasks,并处理 DevKeel 收尾门禁。
v3.2 · audit A · 6 stars
openspec-archive-change SKILL.md skill
minleev5/devkeel · .harness/skills/openspec-archive-change/SKILL.md · 检查完成状态、评估 spec sync,并按 schema 收尾门禁归档 OpenSpec change。
v3.3 · audit A · 6 stars
openspec-bulk-archive-change SKILL.md skill
minleev5/devkeel · .harness/skills/openspec-bulk-archive-change/SKILL.md · 批量检查 spec 冲突,并按 schema 门禁归档用户明确选择的多个 OpenSpec changes。
v2.2 · audit A · 6 stars
openspec-continue-change SKILL.md skill
minleev5/devkeel · .harness/skills/openspec-continue-change/SKILL.md · 继续 OpenSpec change;Draft 时继续单题访谈,Confirmed 后每次最多投影一个 planning artifact。
v2.2 · audit A · 6 stars

Every file in minleev5/devkeel

Browse by kind, by grade A, or by owner.