跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 grounding-before-coding

Grounding Before Coding

启动任何非部落更改、 调查错误、 或在不熟悉的代码中工作时使用 - 在写出第一行之前 。 也用于纯调查, 尚未计划更改 -\ “ dig into this\ ” ,\“ 猜出为什么 ” , “ 有时导出为空 ” , 部署后断断续续的错误 。 编码地一学科:映射出真实的代码和数据,引用证据,从不猜测惯例. 当一个变化或结论即将从信仰而不是从树上建立时使用,即使在时间压力下也使用.

25115 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

启动任何非部落更改、 调查错误、 或在不熟悉的代码中工作时使用 - 在写出第一行之前 。 也用于纯调查, 尚未计划更改 -\ “ dig into this\ ” ,\“ 猜出为什么 ” , “ 有时导出为空 ” , 部署后断断续续的错误 。 编码地一学科:映射出真实的代码和数据,引用证据,从不猜测惯例. 当一个变化或结论即将从信仰而不是从树上建立时使用,即使在时间压力下也使用.

何时用

启动任何非三角变化, 调查一个错误, 或在不熟悉的代码中工作 - 在第一行写入之前 。 还用于纯调查, 尚未计划更改 -\ “ dig into this\ ” ,\“ 猜出为什么 ” ,\“ 有时导出是空的 ” , 断断续续的错误

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Grounding before coding、Overview、The discipline、Limits of grounding、Common mistakes。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Use when starting any non-trivial change, investigating a bug, or working in unfamiliar code - before the first line is written. Also use for pure investigation with no change planned yet - \"dig into this\", \"figure out why\", \"sometimes the export is empty\", intermittent errors after a deploy. Encodes the ground-first discipline: map the real code and data, quote evidence, never guess conventions. Use whenever a change or a conclusion is about to be built from belief instead of from the tree, even under time pressure.

Grounding before codingOverviewThe disciplineLimits of groundingCommon mistakes

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
grounding-before-coding
description
Use when starting any non-trivial change, investigating a bug, or working in unfamiliar code - before the first line is written. Also use for pure investigation with no change planned yet - \"dig into this\", \"figure out why\", \"sometimes the export is empty\", intermittent errors after a deploy. Encodes the ground-first discipline: map the real code and data, quote evidence, never guess conventions. Use whenever a change or a conclusion is about to be built from belief instead of from the tree, even under time pressure.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「grounding-before-coding」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-fbaefb1c08b59b14-Grounding-Before-Coding.html
请存为 .cursor/skills/grounding-before-coding/SKILL.md 或 .claude/skills/grounding-before-coding/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/riekelt/principal-engineer' --list

npx skills add 'https://github.com/riekelt/principal-engineer' --skill 'grounding-before-coding'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: grounding-before-coding description: "Use when starting any non-trivial change, investigating a bug, or working in unfamiliar code - before the first line is written. Also use for pure investigation with no change planned yet - \"dig into this\", \"figure out why\", \"sometimes the export is empty\", intermittent errors after a deploy. Encodes the ground-first discipline: map the real code and data, quote evidence, never guess conventions. Use whenever a change or a conclusion is about to be built from belief instead of from the tree, even under time pressure." --- # Grounding before coding **REQUIRED BACKGROUND:** the `principal-engineering` skill. ## Overview Before writing a spec, a fix, or a first line: map the real code and data. Quote `file:line` and run the query behind every number you rely on. ## The discipline 1. **Read the implementations, not the names.** A method called `validate` that does not validate is the default assumption. Verify what a thing does before building on what it is called. 2. **Quote your evidence.** Every load-bearing claim in your plan gets a `file:line`, an exact query result, or a command output. When you cannot back a claim, say so out loud instead of assuming it. 3. **Never guess conventions.** How this repo names things, wires dependencies, handles errors, or runs tests is discoverable in minutes. 4. **Trust code, not status.** A document's or ticket's self-reported state is not evidence of execution state; adjudicate with the code and the history (`git log -S `, grep the tree) before building on it. 5. **Reproduce before fixing.** For bugs: see the failure happen before changing anything. 6. **Fix where the callers converge.** A bug report names one symptom on one path; before editing, find every route into the code you are about to touch. When the defect lives in something shared, the guard belongs in the shared place: it is the smaller diff AND the fix that covers the sibling paths the ticket never mentioned. Patching only the reported path repairs the report, not the bug. 7. **Map the invariants a change must not break.** The output of grounding is a map: the touchpoints, the current behavior (quoted), and those invariants. Tests named after old bugs, guards with explanatory comments, and constants encoding hard-won thresholds mark earlier incidents. ## Limits of grounding - Not reading everything: map what the change touches plus one ring around it, at the depth the risk demands. - Not a substitute for asking: when the code cannot answer an intent question (why is this threshold 7?), the history or the owner can. An unanswerable question becomes a named assumption, never a silent one. - Not re-grounding what this session already established: ground once, cite it after. ## Common mistakes - Theorizing from the framework's documentation about what the project's code does. The project forked, wrapped, or misused the framework; the tree tells you which. - Grounding the happy path only. The invariants live in the error paths and the edge-case guards. - Trusting a prior session's summary of the code over the code. Open the files the summary names before building on it. - Skipping grounding because the task "looks like" a previous one. The signal that pattern-matches a known case may have a different cause; check that the evidence supports this case.

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…