agentCLAWHUBUnverified

Kinema's TDD Injector (CLAUDE.md generator)

一次性注入器,为目标仓库生成定制版 CLAUDE.md 记忆文件,植入 kinema 的 TDD 方法论(三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理)。适用场景:用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定... Skill: Kinema's TDD Injector (CLAUDE.md generator) Owner: leeshunee Summary: 一次性注入器,为目标仓库生成定制版 CLAUDE.md 记忆文件,植入 kinema 的 TDD 方法论(三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理)。适用场景:用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定... Tags: latest:1.4.1 Version history: v1.4.1 | 2026-07-16T07:42:19.607Z | user 新增 Codex / AGENTS.md 双端注入目标:render.py --target claude|codex,共享模板与升级规则;参数化指令文件名与 AI co-author;UTF-8 BOM 兼容

OpenClaw

Rank

62

Safety

84

Downloads

1.1k

Updated

Oct 11, 2026

Version

1.4.1

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 11, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 11, 2026
Adoption signal
1.1K downloadsadoption · observed Oct 11, 2026
Latest release
1.4.1release · observed Jul 16, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s1782xm9gtwjg6m1vnxsad9zc583qs9v:kinema-tdd-injector
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/snapshot"

Documentation

CLAWHUB

143,799 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: kinema-tdd-injector
displayName: "Kinema's TDD Injector (CLAUDE.md generator)"
version: 1.4.1
description: |
  一次性注入器,为目标仓库生成定制版 CLAUDE.md 记忆文件,植入 kinema 的 TDD 方法论(三阶测试体系、分层 conftest、网络/IO 边界、命名规则、覆盖率门槛、fixture 治理)。适用场景:用户想在新仓库初始化 TDD 规范、把测试标准注入/导入到另一个仓库、或在正式开发前确立测试约定。每个仓库只运行一次——这**不是**开发期间的常驻助手。当用户说出诸如 "把测试规范注入到这个仓库" / "init tdd standard here" / "set up testing methodology" / "import kinema's test rules" 之类的话时,请主动提及本 skill。如果检测到仓库已被注入过,进入升级模式而非拒绝。
---

# Kinema TDD 方法论注入器

- **Author**: [LeeShunEE](https://github.com/LeeShunEE)
- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)
- **GitHub**: https://github.com/KinemaClawWorkspace/kinema-tdd-injector

## ⚠️ Before First Use | 首次使用必读

**首次使用此 skill 前,必须先读取 [references/ONBOARDING.md](references/ONBOARDING.md) 完成环境配置。**

- **首次配置** → 读取 references/ONBOARDING.md 完成全部步骤
- **环境不可用**(jinja2 未安装、模板加载失败)→ 读取 references/ONBOARDING.md Troubleshooting 排查修复
- **配置完成后** → 直接使用下方工作流

一次性生成器,为目标仓库写入一份定制的 `CLAUDE.md`。**每个仓库仅运行一次**(升级除外),**不是**开发期间的助手。

## 渲染机制

本 skill 使用 **Jinja2 模板**渲染:

```
kinema-tdd-injector/
├── SKILL.md              ← 你正在读
├── assets/
│   └── claude_md.j2      ← 单一模板(含全部条件分支)
└── scripts/
    └── render.py         ← 渲染脚本(jinja2 依赖)
```

**渲染流程**:收集用户回答 → 构造 params dict → 调 `render.py` 输出到目标仓库根目录的临时文件 `<repo>/.kinema-claude.draft.md` → 与既有 `CLAUDE.md` 比对 → 决定写入策略 → 清理临时文件。

**临时文件位置**:始终在目标仓库根目录,命名 `.kinema-claude.draft.md`(以 `.` 开头便于 .gitignore 屏蔽)。流程结束后必须删除。

---

## 产出范围

CLAUDE.md 会包含以下章节(依据用户回答动态裁剪):

1. 核心原则(三阶 / 两阶矩阵)
2. 测试路径三层命名规则 + 拆分规则 + 数据目录
3. Agent 自动行为规范
4. 网络边界规则
5. 依赖声明(A/B/C 三种模式之一)
6. Conftest / Fixture 治理
7. 覆盖率门槛 + 强制点(A/B/C/D 四种之一)
8. 各阶段测试编写规范(含前端 testenv Playwright e2e 子节)
9. 快速参考命令
10. Commit message(A/B/C 三种之一)
11. 前端包管理器(如有前端)
12. Python 编码规范(可选,由 Q12 控制;与前后端解耦)——含配置唯一入口规则(§.2.1,由 Q15 决定配置来源示例)

---

## 何时拒绝 / 何时进入升级模式

**拒绝条件**:仓库主要源码包含 **非 Python 且非 TS/JS 的语言**(顶层包里有 Go / Rust / Java / C++ 等)。零散脚本或 `.md` 文件不算。告知用户:"本规范目前只覆盖 Python + TS/JS,检测到 X 语言,无法生成。"

**升级模式**:目标仓库现有 `CLAUDE.md` 已包含 `<!-- kinema-tdd-injector: injected -->` 标记。这种情况**不拒绝**,进入升级模式:
1. 告知用户检测到既有注入,问是否要升级。读取头部 `injector-version:` 标识符并与本 SKILL.md 当前 `version` 比对;若旧版本低于当前,进入升级模式时告知版本差异(如"检测到 v1.3.0,当前 v1.4.0,建议升级")。无该标识符(更早产物)按未知旧版处理。
2. 同意后,从既有 CLAUDE.md 中**反解**上次的回答(覆盖率阈值、依赖模式、commit 风格、强制点、包管理器、自动触发设置、testenv 本地运行许可、配置来源),作为问卷默认值。
3. 用户回车即沿用旧值,输入新值即覆盖。
4. 反解失败的字段回退到出厂默认。

---

## 工作流

### 步骤 1 —— 确认目标仓库与语言栈

请用户确认**目标仓库根目录**(默认:当前工作目录)。扫描:

- 顶层文件和目录
- 最多 3 层深度内的所有 `pyproject.toml`、`package.json`、`Cargo.toml`、`go.mod`、`pom.xml`、`build.gradle`、`*.csproj`

若发现 `Cargo.toml` / `go.mod` / `pom.xml` / `build.gradle` / `*.csproj`,立即拒绝。

### 步骤 2 —— 发现顶层包

**不要**默认 `backend/` + `frontend/`。通过文件标志发现:

- 含 `pyproject.toml` → Python 包
- 含 `package.json`(且有 `tsconfig.json` 或 `.ts` / `.tsx` 文件) → TS/JS 包
- 仅 `package.json` 无 TS → 纯 JS 包

探测源码根:
- Python:读 `pyproject.toml` 的包配置

README.md

# Kinema TDD Injector

一次性 TDD 方法论注入器,同时支持 Claude Code、Codex 与 OpenClaw:

- Claude Code 生成或升级根级 `CLAUDE.md`
- Codex 生成或升级根级 `AGENTS.md`
- 两端共享同一套问卷、Jinja2 模板、冲突合并和升级反解规则

## 核心特性

> 对话式问卷 → 平台化渲染 → 与既有持久指令智能融合 → 开箱即用的 TDD 规范

### 三阶测试体系

| 阶段 | 跑什么 | 何时跑 |
|------|--------|--------|
| **unit** | 单文件纯函数 / 类 | 每次保存 |
| **dev-integration** | 跨模块真实依赖(数据库 / 文件系统) | 提交前 |
| **testenv-integration** | 后端 API e2e + 前端 Playwright GUI e2e | 按问卷配置自动或手动执行 |

此外包含分层 conftest、fixture 治理、网络/IO 边界、覆盖率门槛、Commit message 规范和可选
Python 编码规范。

## 安装

### Claude Code

```text
/plugin marketplace add https://github.com/KinemaClawWorkspace/kinema-skills-marketplace
/plugin install kinema-tdd-injector@kinema-skills-marketplace
```

### Codex

```bash
codex plugin marketplace add KinemaClawWorkspace/kinema-skills-marketplace
codex plugin add kinema-tdd-injector@kinema-skills-marketplace
```

安装或更新后开启一个新会话,让客户端加载新的 skill。

### OpenClaw

```bash
openclaw skills install kinema-tdd-injector
```

## 触发方式

```text
把测试规范注入到这个仓库
init tdd standard here
set up testing methodology
import kinema's test rules
升级已有的 Kinema TDD 规范
```

首次使用需读取 [references/ONBOARDING.md](references/ONBOARDING.md)。

## 双端实现

共享渲染器通过 target 选择输出平台:

```bash
uv run --with jinja2 python scripts/render.py --target claude --params params.json --out CLAUDE.md
uv run --with jinja2 python scripts/render.py --target codex --params params.json --out AGENTS.md
```

`--target` 默认为 `claude`,因此现有 Claude/OpenClaw 调用保持兼容。

## 文件结构

```text
kinema-tdd-injector/
├── .claude-plugin/plugin.json       # Claude Code 清单
├── .codex-plugin/plugin.json        # Codex 清单
├── skills/kinema-tdd-injector/      # Codex skill 适配层
├── SKILL.md                          # Claude/OpenClaw 完整工作流
├── assets/claude_md.j2               # 双端共享模板
├── scripts/render.py                 # --target claude|codex
├── evals/evals.json
└── references/ONBOARDING.md
```

## 作者

- **Author**: [LeeShunEE](https://github.com/LeeShunEE)
- **Organization**: [KinemaClawWorkspace](https://github.com/KinemaClawWorkspace)

## 许可证

[GNU General Public License v3.0](LICENSE)

_meta.json

{
  "ownerId": "kn7cjsf9pc9x1tmreq1dahs90s83p9y0",
  "slug": "kinema-tdd-injector",
  "version": "1.4.1",
  "publishedAt": 1784187739607
}

references/ONBOARDING.md

# Kinema TDD Injector Onboarding

> 本文档指导 AI Agent 完成 Claude Code 与 Codex 共用渲染环境的首次检查。

## Prerequisites | 前置条件

- `uv` 包管理器
- 目标仓库为 Python 或 TypeScript/JavaScript 项目

## Step 1: 检测 Jinja2

```bash
uv run --with jinja2 python -c "import jinja2; print(jinja2.__version__)"
```

无需手动安装 jinja2,`uv run --with` 会自动处理依赖。

## Step 2: 验证共享模板

确认插件根目录存在 `assets/claude_md.j2`。该文件是 Claude/Codex 共用模板,渲染器会按
`--target` 注入平台名称、指令文件名和 co-author 身份。

```bash
uv run --with jinja2 python -c "
from jinja2 import FileSystemLoader, Environment
env = Environment(loader=FileSystemLoader('<plugin_root>/assets'))
template = env.get_template('claude_md.j2')
print('template loaded:', template.name)
"
```

## Step 3: 验证渲染器

```bash
uv run --with jinja2 python <plugin_root>/scripts/render.py --help
```

渲染目标:

```bash
# Claude Code(默认 target,显式写出便于审计)
uv run --with jinja2 python <plugin_root>/scripts/render.py \
  --target claude \
  --params <repo>/.kinema-params.tmp.json \
  --out <repo>/.kinema-claude.draft.md

# Codex
uv run --with jinja2 python <plugin_root>/scripts/render.py \
  --target codex \
  --params <repo>/.kinema-params.tmp.json \
  --out <repo>/.kinema-agents.draft.md
```

参数 JSON 支持 UTF-8 与带 BOM 的 UTF-8;最终输出统一为无 BOM UTF-8。

## Step 4: 目标仓库语言检测

使用本 skill 时,Agent 会自动扫描目标仓库:

- 含 `pyproject.toml` → Python 包
- 含 `package.json` + `tsconfig.json` → TypeScript 包
- 含 `package.json` 无 TS → JavaScript 包

若发现 `Cargo.toml` / `go.mod` / `pom.xml` → **拒绝执行**(规范仅支持 Python + TS/JS)。

## Troubleshooting | 故障排除

| 错误 | 原因 | 解决方案 |
|------|------|----------|
| `ModuleNotFoundError: No module named 'jinja2'` | uv 未正确调用 | 确认使用 `uv run --with jinja2` |
| `TemplateNotFound: claude_md.j2` | 模板路径错误 | 从插件根目录定位 `assets/`,不要从 Codex skill 子目录猜测路径 |
| `JSONDecodeError` | 参数文件不是有效 JSON | 确认文件为 UTF-8/UTF-8 BOM 且没有尾随逗号 |
| `SyntaxError` in render.py | Python 版本过低 | 升级 Python 或通过 `uv python install` 管理 |
| 目标仓库含 Go/Rust | 规范不支持 | 告知用户本规范仅支持 Python + TS/JS |

skill-card.md

## Description:

Generates or upgrades persistent repository instructions that encode Kinema's TDD methodology for Python and TypeScript/JavaScript projects.

This skill is ready for commercial/non-commercial use.

## Publisher:

[leeshunee](https://clawhub.ai/user/leeshunee)

### License/Terms of Use:

GNU General Public License v3.0

## Use Case:

Developers and engineering teams use this skill to initialize or upgrade repository-level TDD guidance before implementation work. It produces tailored agent instruction files for supported Python and TypeScript/JavaScript repositories.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill writes persistent repository agent instructions that can influence future agent behavior.

Mitigation: Confirm the exact target file and review the generated diff before accepting changes.

Risk: The skill can write application configuration code when a custom configuration source is requested.

Mitigation: Avoid the custom config.py path unless you explicitly want application code changed.

Risk: The renderer depends on Jinja2 at execution time.

Mitigation: Use a pinned or locked Jinja2 environment when running the renderer.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/leeshunee/skills/kinema-tdd-injector)
- [README](artifact/README.md)
- [Kinema TDD Injector Onboarding](artifact/references/ONBOARDING.md)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown instruction file content with supporting shell commands and configuration guidance]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Writes persistent repository agent instructions after target detection, questionnaire input, rendering, and diff review.]

## Skill Version(s):

1.4.1 (source: SKILL.md frontmatter and server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 2d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/leeshunee/skills/kinema-tdd-injector",
      "sourceUrl": "https://clawhub.ai/leeshunee/skills/kinema-tdd-injector",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T08:33:22.796Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T08:33:22.796Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.1K downloads",
      "href": "https://clawhub.ai/leeshunee/kinema-tdd-injector",
      "sourceUrl": "https://clawhub.ai/leeshunee/kinema-tdd-injector",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T08:33:22.796Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.4.1",
      "href": "https://clawhub.ai/leeshunee/kinema-tdd-injector",
      "sourceUrl": "https://clawhub.ai/leeshunee/kinema-tdd-injector",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-07-16T07:42:19.607Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-leeshunee-kinema-tdd-injector/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.4.1",
      "description": "新增 Codex / AGENTS.md 双端注入目标:render.py --target claude|codex,共享模板与升级规则;参数化指令文件名与 AI co-author;UTF-8 BOM 兼容。",
      "href": "https://clawhub.ai/leeshunee/kinema-tdd-injector",
      "sourceUrl": "https://clawhub.ai/leeshunee/kinema-tdd-injector",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-07-16T07:42:19.607Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to Kinema's TDD Injector (CLAUDE.md generator) and adjacent AI workflows.