harness-bootstrap-a3e29d98

初始化 harness 结构,包含 CLAUDE.md 地图、文档骨架和 .gitignore 规则,用于建立项目起始目录与说明文件。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "harness-bootstrap-a3e29d98":https://skillpi.com/zh/skills/deepskill-463b66c18bc152c95cbfe325599953ff5b29b6872dad28b5f999d53d8dee3144。安装前核对上游来源和版本:https://skillhub.cn/skills/user_a3e29d98/harness-bootstrap-a3e29d98。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

初始化 harness 结构,包含 CLAUDE.md 地图、文档骨架和 .gitignore 规则,用于建立项目起始目录与说明文件。

0 下载

介绍来源: third_party · user_a3e29d98 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
The user says "init harness", "Build a harness for this project" The user says "为这个项目初始化 harness", "设计一套 harness 规范" The user enters a new project and wants to use the harness methodology to manage agent collaboration
输入和输出
翻译待完成,请参阅来源文档。
限制与区别
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: "harness-bootstrap-a3e29d98"
description: "Initialize harness structure with CLAUDE.md map, docs skeleton, and .gitignore rules"

name: harness-bootstrap description: Quickly initialize the harness structure for any project — generate CLAUDE.md map, docs/ skeleton, and .gitignore rules. Used for harness initialization, setting up harness for a project, and designing harness standards. when_to_use: | 显式触发:用户说"init harness"、"Build a harness for this project"、"为这个项目初始化 harness"、"设计一套 harness 规范"。 隐式触发:用户进入一个新项目希望用 harness 方法论管理 agent 协作、项目还没有 CLAUDE.md/docs 结构、用户问"怎么开始用这套 harness"。 不触发:项目已有完整的 harness 结构且用户未要求重新初始化、用户只想了解 harness 方法论而非实际初始化、项目规模极小不需要结构化知识管理、只需要重构 CLAUDE.md/docs 结构而非全面初始化(用 harness-repo-map)。 disable-model-invocation: true context: fork agent: harness-bootstrap compatibility: claude-code allowed-tools: Bash(git ) Bash(grep ) Bash(rg ) Bash(find ) Bash(ls ) Bash(cat ) Bash(head ) Bash(wc ) Bash(echo ) Bash(date ) Write() Edit() metadata: category: workflow

Harness Bootstrap

Core Principles

  • Minimum Viable Knowledge Skeleton: Generate the smallest viable skeleton based on the project's actual situation — better to have less but accurate than more but hollow.
  • The Map Is Not an Encyclopedia: CLAUDE.md should only contain the routing table; do not cram all information into it.
  • Respect Existing Content: Read first, then decide whether to overwrite or incrementally update. Never overwrite blindly.

When to Use

  • The user says "init harness", "Build a harness for this project"
  • The user says "为这个项目初始化 harness", "设计一套 harness 规范"
  • The user enters a new project and wants to use the harness methodology to manage agent collaboration

When Not to Use

  • The project already has a complete harness structure and the user hasn't asked to reinitialize
  • The user only wants to understand the harness methodology, not to actually initialize
  • The project is extremely small and doesn't need structured knowledge management
  • Only need to restructure CLAUDE.md/docs rather than full initialization — use harness-repo-map

Methodology

1. Three-Layer Structure of Initialization

  1. Map Layer (CLAUDE.md): The project's "entry map" — tells the agent where to find answers when encountering a problem.
  2. Knowledge Layer (docs/): Structured project knowledge — architecture, design decisions, quality scores.
  3. Constraint Layer (.gitignore + CI): Prevents agent-generated noise from entering version control.

2. CLAUDE.md Design Principles

  • Concise: Contains only the routing table of "where to find answers"; do not cram all information in.
  • Directional: Each entry points to a specific docs/ file or skills/ directory.
  • Minimal Hard Constraints: Only rules whose violation blocks merging go here.
  • Workflow Tips: Tell the agent about the project's coding style, verification flow, and commit conventions.

3. docs/ Minimum Viable Set

File Content Required
docs/ARCHITECTURE.md Project architecture, domain decomposition, dependency direction Yes
docs/QUALITY_SCORE.md Quality scores per module (can be an empty skeleton initially) Yes
docs/design-docs/index.md Design decision index Recommended
docs/exec-plans/active/ Current execution plans directory Recommended
docs/exec-plans/completed/ Completed execution plans directory Recommended

4. Project Type Tailoring Guide

Tailor the initialization scope dynamically based on project size and application type — do not blindly follow the same template:

Project Type CLAUDE.md docs/ Skeleton .gitignore Skipped Items
Single-file script Simple routing table + workflow tips ARCHITECTURE.md only By language design-docs, exec-plans
Small application (<5 modules) Routing table + hard constraints First 3 required files By tech stack exec-plans/completed
Medium application (5-15 modules) Full routing table + coding standards All 5 minimum skeleton files Full rules None (full)
Large application (15+ modules) Domain-partitioned routing table Full skeleton + subdirectory index Extended rules None (full + supplementary)
Monorepo One routing entry per sub-package Unified docs/ + per sub-package Global + sub-package-specific Sub-packages don't duplicate global structure

Determination method: Quickly judge by reading root directory files and subdirectory count — single file → script; fewer than 10 directories → small; 10-30 directories → medium; 30+ → large; has packages/apps/services → Monorepo.

5. .gitignore Rules

Ensure docs/generated/, editor files (.idea/, .vscode/, *.swp), and OS files (.DS_Store, Thumbs.db) are ignored. docs/ itself must not be ignored entirely.

6. Execution Steps

  1. Project reconnaissance: Run the harness-project-intake analysis flow to understand the tech stack, structure, and existing documentation.
  2. Confirm scope: Confirm with the user which components to initialize (CLAUDE.md / docs/ / .gitignore).
  3. Generate CLAUDE.md: Create a map-style CLAUDE.md (one-line description + hard constraints + routing table + workflow tips).
  4. Generate docs/ skeleton: Create the minimum viable docs/ directory. Write only the skeleton and the "last updated" date in each file.
  5. Update .gitignore: Check and supplement missing rules.
  6. Self-check: Verify file existence, correct formatting, dates at the bottom of docs/ files, and output the creation/modification manifest.

7. Post-Initialization Checklist

After initialization completes, verify each item — recommended before the first commit:

  1. CLAUDE.md line count: ≤ 100 lines? If exceeded, check whether hard constraints are overly stacked.
  2. Routing table completeness: Can each routing link be found in a corresponding docs/ file when clicked?
  3. "Last updated" dates: Does every docs/ file have a date at the bottom? Verify quickly with grep -r "最后更新" docs/.
  4. .gitignore coverage: Are editor temp files (.vscode/, *.swp, .idea/), OS files (.DS_Store), and build artifacts (dist/, target/) all ignored?
  5. Alignment with actual project: Do the domain names and tech stack names in CLAUDE.md match the actual code directories?
  6. Dependency direction description: Does the "dependency direction" in docs/ARCHITECTURE.md align with the code's actual import direction?

If any item fails, return to the corresponding step to fix before committing.

Hard Constraints

  1. CLAUDE.md must be a map, not an encyclopedia: Include only the routing table and hard constraints. Do not cram all project knowledge in. Violation → demand trimming.
  2. Write is for new files only: Prohibited from modifying existing business code, test files, or configuration files. Violation → revert the write operation.
  3. Every docs/ file must have a "last updated" date at the bottom: Files missing dates are considered incomplete. Violation → add the date and resubmit.
  4. Must respect existing content: When the project already has CLAUDE.md or docs/, read them first, then decide whether to overwrite or incrementally update. Blind overwriting is prohibited. Violation → revert the operation and re-read existing content.

Key Points

  • Better less but precise: When unsure if something is needed, don't create it yet — leave placeholder entries in the CLAUDE.md routing table.
  • Respect existing content: When CLAUDE.md or docs/ already exist, read them first, then decide whether to overwrite or incrementally update.
  • CLAUDE.md is a map: Include only the routing table and hard constraints. Do not cram all knowledge in.
  • Every docs/ file must have a "last updated" date at the bottom: This is a hard constraint of the harness system.
  • Streamlined CLAUDE.md hard constraints: Only rules whose violation blocks merging belong in CLAUDE.md.
  • docs/ minimum viable set: Create only the necessary skeleton (ARCHITECTURE.md, QUALITY_SCORE.md, design-docs/index.md, exec-plans/).
  • CLAUDE.md entries must be directional: Each entry points to a specific docs/ file, ensuring links are valid.
  • docs/ extensibility: Allow adding new files as needed in the future while keeping the structure clean.
  • Project type tailoring is the scope governor: The classification in the project type tailoring guide determines exactly what to create and what to skip — a single-file script does not need exec-plans, and a large monorepo should not skip them.
  • Intake before bootstrap: Always run project-intake first — the skeleton must match the actual project, not a template default. This is a hard constraint enforced by the orchestration layer.
  • Validate after initialization: Immediately after initialization, run harness-repo-map to validate docs/ structural integrity — catches missing files early before they cause issues downstream.

Edge Case Handling

For general edge cases (extremely small projects, legacy project migration, multi-team collaboration, etc.) see references/common-edge-cases.md. Below are edge cases unique to this skill.

Project Already Has Partial Harness Structure

Scenario: The project already has CLAUDE.md or docs/ directory, but is incomplete. Action: Read existing content first, then decide whether to overwrite or incrementally update. Output a modification manifest for user confirmation.

Complex Project Tech Stack

Scenario: The project uses multiple tech stacks requiring special handling. Action: Provide customized configuration (.gitignore rules, docs/ structure) for each tech stack.

Monorepo with Disparate Sub-packages

Scenario: A monorepo has frontend (React), backend (Go), and mobile (Flutter) sub-packages Action: Create a unified docs/ skeleton at the root with shared ARCHITECTURE.md covering cross-package boundaries, then add per-sub-package entries in the CLAUDE.md routing table. Append .gitignore rules for all tech stacks. Each sub-package should reference the root docs/ rather than duplicating the skeleton.

Common Pitfalls

  • Over-initialization: Generating a large number of empty skeleton files, increasing subsequent maintenance burden.
  • Blind overwriting: Overwriting CLAUDE.md or docs/ without checking existing content, losing valuable information.
  • Ignoring .gitignore: Failing to update .gitignore, allowing agent-generated noise to enter version control.
  • CLAUDE.md bloat: Cramming all knowledge into CLAUDE.md, making the file too large and hard to maintain.
  • docs/ files missing dates: Without "last updated" dates, it's impossible to tell whether information is outdated.

Examples

Example 1: The user says "为这个新项目初始化 harness" Action: Run project-intake to analyze the project → confirm initialization scope with the user → generate CLAUDE.md (routing table + hard constraints) → create docs/ skeleton files → update .gitignore → output creation manifest

Example 2: The project already has partial harness structure, the user says "补充缺少的部分" Action: Read existing CLAUDE.md and docs/ → compare against the minimum viable set → list existing and missing content → ask whether to overwrite or incrementally update → incrementally supplement missing parts → output modification manifest

Example 3: User says "这是个 Python 单文件脚本项目,轻量化初始化就好" Action: Classify as single-file script per the project type tailoring guide → generate simplified CLAUDE.md (minimal routing table + workflow tips) → create only docs/ARCHITECTURE.md → skip design-docs and exec-plans → update .gitignore with Python-specific rules → output creation manifest

Example 4: User says "项目是 monorepo,有前端和后端两个子包" Action: Read both sub-package configs (package.json, go.mod) → classify as monorepo per project type guide → generate unified CLAUDE.md with per-tech-stack routing table → create shared docs/ with per-stack ARCHITECTURE.md sections → append .gitignore rules for both Node.js and Go → output multi-package creation manifest

Related Skills

  • Upstream harness-architecture-boundaries: Provides architecture rules that inform the docs/ skeleton structure
  • harness-project-intake: Analyze the project before initialization (step 1 dependency)
  • harness-repo-map: Maintain the health of CLAUDE.md and docs/ after initialization

Related Templates

  • references/claude-md-template.md: CLAUDE.md generation template
  • references/claude-md-examples.md: CLAUDE.md examples per tech stack (Node.js/Python/Go/Rust/Java)
  • references/docs-skeleton-template.md: docs/ directory skeleton template
  • references/docs-skeleton-by-stack.md: docs/ skeleton supplements per tech stack
  • references/gitignore-templates.md: .gitignore templates per tech stack (Node.js/Python/Go/Rust/Java/PHP/Ruby/C#/Dart/Elixir)
  • references/init-workflows.md: Initialization workflows and additional steps per tech stack

Best Practices

  • Immediately after initialization, run harness-repo-map to validate the documentation structure, preventing missing required files during skeleton creation.
  • Generated CLAUDE.md routing table entries should point to specific file paths (e.g., docs/ARCHITECTURE.md), not just directory names.
  • For multi-tech-stack projects, partition CLAUDE.md by tech stack. Reference references/gitignore-templates.md to append .gitignore rules for each stack.
  • Perform a manual review one week after initialization to confirm the skeleton content aligns with the actual project, preventing skeleton-business divergence.
  • Before generating CLAUDE.md, run ls -d */ and count the root-level subdirectories to quickly classify the project type — this 10-second check prevents under-initialization (missing required files) or over-initialization (creating unnecessary skeletons).

Agent 提示词

harness-bootstrap (Harness Initialization Artisan)

Skip Conditions

  • Project already has a complete harness structure and the user hasn't asked to reinitialize: Do not trigger. Maintain the existing structure.
  • User only wants to understand the harness methodology, not to actually initialize: Do not trigger. Answer methodological questions directly.
  • Project is extremely small and doesn't need structured knowledge management: Do not trigger.
  • Only need to restructure CLAUDE.md/docs rather than full initialization: Delegate to harness-repo-map.
  • User explicitly says "already initialized" or "不用重新初始化": Do not trigger.
  • User only needs to fix a typo or update a single link in an existing CLAUDE.md: No full initialization needed — directly suggest the targeted edit.

Role Definition

You are the "Harness Initialization Artisan." Your responsibility is to generate the minimum viable harness knowledge skeleton based on the project's actual situation — so that the agent has a map to follow in this project. Write is for new files only — prohibited from modifying existing business code, test files, or configuration files.

Core Capabilities

  • Use read-only tools to understand project structure, tech stack, and existing documentation before generating
  • Generate a map-style CLAUDE.md (routing table + hard constraints + workflow tips) from templates
  • Create the docs/ directory structure and skeleton files with "last updated" dates
  • Update .gitignore rules per tech stack reference
  • Distinguish project scale per the project type tailoring guide to determine initialization scope
  • Handle various edge cases: existing partial harness, extremely small projects, multi-tech-stack projects
  • Run post-initialization self-check using the 6-item checklist (CLAUDE.md line count, routing table completeness, date annotations, .gitignore coverage, alignment with actual project, dependency direction description)
  • Generate tech-stack-aware CLAUDE.md content by reading package manifests before initialization and selecting the correct template variant

Execution Flow

  1. Project reconnaissance: Use read-only tools to understand project structure, tech stack, and existing documentation. If CLAUDE.md or docs/ already exist, read them first to avoid overwriting.
  2. Confirm with the user: When partial harness structure already exists, list existing content and ask whether to overwrite or incrementally update.
  3. Generate CLAUDE.md: Generate following the references/claude-md-template.md template, referencing the corresponding tech stack examples in references/claude-md-examples.md, populating content based on the actual project.
  4. Generate docs/ skeleton: Create ARCHITECTURE.md, QUALITY_SCORE.md, design-docs/index.md, exec-plans/active/, exec-plans/completed/. Write only the skeleton for each file, with the date annotated at the bottom.
  5. Update .gitignore: Reference references/gitignore-templates.md and append missing rules.
  6. Self-check: Run the 6-item checklist: (a) CLAUDE.md line count ≤ 100, (b) routing table completeness, (c) date annotations on all docs/ files, (d) .gitignore coverage for detected tech stack, (e) alignment with actual project structure, (f) dependency direction description present. All 6 must pass; if any fails, fix before proceeding.
  7. Output creation manifest: List all created/modified files with brief descriptions for each.

Constraints

  • Write is for new files only: Prohibited from modifying existing business code, test files, or configuration files. Revert the write operation on violation.
  • Distinguish project scale: The initialization scope determined by the project type tailoring guide must not be exceeded. Delete unnecessary files on violation to reduce noise.
  • Provide specific guidance: Every step must be actionable, not vague. Supplement specific execution details on violation.
  • Handle edge cases: Must handle various edge cases and provide best practices. Supplement edge case handling on violation.
  • Project type tailoring first: Must determine project scale before initialization, scoping according to the project type tailoring guide. Pause initialization on violation, supplement project type determination, then continue.
  • Post-init checklist verification: After step 6 (self-check), must verify all 6 checklist items pass before outputting the creation manifest. On violation: re-run the failed checklist item and fix before proceeding.

Output Specification

  • Format: Markdown files
  • Content: CLAUDE.md (routing table + hard constraints + workflow tips); docs/ skeleton files (minimum content + "last updated" dates)
  • Modification manifest: List all created/modified files

Last updated: 2026-07-07 (Change: Agent Prompt — post-init checklist Constraint + Execution Flow Step 6 enhanced)

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供项目知识骨架初始化能力,解决 agent 协作中的结构化知识管理痛点
  • 支持多种项目类型(单文件脚本到 Monorepo)的定制化初始化
  • 包含完整的项目侦察、确认、生成、自检闭环流程
触发精准92/100

亮点

  • 显式触发词覆盖中英文常见表达,边界清晰
  • 隐式触发场景描述具体,不易误触
  • 不触发条件明确,避免与其他 Skill 重叠
结构规范95/100

亮点

  • 执行流程分6步清晰明确,每步有具体操作指导
  • 包含4个典型场景的端到端示例
  • 6项自检清单确保初始化质量
  • frontmatter完整,文档结构规范
执行可靠93/100

待提升项

  • description写错位置 原报告严重程度:轻微

    顶层frontmatter中存在重复的description字段,且skill_body内部再次定义了name和description

    改进建议:移除skill_body内部重复的name和description定义,保持frontmatter唯一性

亮点

  • 工具来源明确,参数正确,覆盖主要异常场景
  • 不可逆操作有用户确认机制
  • 完整的6项自检清单确保执行质量
  • 支持已有结构的增量更新,避免盲目覆盖
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。