用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/laicluse/agent-fieldkit --skill instructions命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when corrective work, migrations, living docs, or temporary diagnostic tests leave superseded residue, or before handoff.
Use when corrective work, migrations, living docs, or temporary diagnostic tests leave superseded residue, or before handoff.
Reference for git-discipline commit bodies, trailers, hook denials, examples, and escape hatches.
正在显示 SKILL.md
| name | instructions |
| user-invocable | false |
| description | Internal drydry audit for instruction files that create duplicate workflows or hide reusable helpers. |
| allowed-tools | ["Agent","Read","Grep","Glob","Bash(rg *)","Bash(grep *)","Bash(find *)","Bash(ls *)"] |
| effort | high |
The instruction-file audit pass behind the drydry pipeline. The premise: agent instructions sit a layer above the code; they can themselves cause DRY violations downstream. Two failure modes:
before_action :authorize!" without naming one as primary. Agents pick one or the other, projects accumulate both, and the code drifts. The instructions ARE the source of the duplication.current_workspace helper, a notify_owner helper, a with_tenant wrapper. The instruction files never name them. Agents in fresh sessions do not know they exist; they generate new code that solves the same problem with different shape. The silence is the duplication-enabler.Not user-invocable.
Caller supplies through args:
instruction_paths: comma-separated list of instruction-file paths to audit. Mandatory. Typically AGENTS.md, CLAUDE.md, plus any sub-directory instruction files the project ships.project_root: the project root, used to grep for helper symbols the instructions might be ignoring.helper_directories: optional hint at where the project's helpers live (lib/, app/helpers/, app/services/, src/utils/, Sources/Helpers/). When absent, the skill infers common locations.Return a markdown section the orchestrator folds into the audit artefact. The schema mirrors the rest of the audit pipeline (pattern_id-keyed findings) so the orchestrator's fold-in step does not special-case this skill:
## Instruction-file duplication
### Pattern: two-prescribed-paths
- Finding 1
- instruction_file: `<path>:<line>-<line>`
- paths_prescribed: ["<path A description>", "<path B description>"]
- drift_hypothesis: <one sentence: what bad thing happens when half the codebase uses A and half uses B>
- convergence_proposal: <one sentence: name one as primary, mark the other as legacy or remove>
- verifier_command: <runnable >
### Pattern: silent-helper
- Finding 2
- helper_path:
helpersilence:
driftproposal:
verifier
Findings without a verifier_command are dropped.
Read each path in instruction_paths. Build an in-memory index of what the file prescribes: behavioral rules, workflow patterns, named tools, named scripts, named helpers.
The two failure modes are orthogonal: pattern two-prescribed-paths reads only the instruction files, pattern silent-helper reads the helper directories. Run both independent reviews in parallel when the host supports that; otherwise run them sequentially and record that limitation in the method notes. Neither depends on the other's output.
two-prescribed-pathsUse this brief for the first review:
You audit an agent instruction file for duplicated prescriptions.
File: <path>
Content: <full file content>
Tasks:
1. Walk the file section by section. For each behavioral rule, ask:
does another rule somewhere in this file (or in a different
instruction file in scope) prescribe a different path for the same job?
2. "Same job" examples: two ways to authorise, two ways to commit,
two ways to run tests, two ways to format dates, two ways to log
errors, two ways to authenticate.
3. For each duplication, name both paths, write a drift hypothesis
(what bad thing happens when the codebase splits between A and B),
propose a convergence direction (which path wins).
4. Provide a verifier_command: a grep over the codebase that shows
both paths in use.
Drop duplications where one is explicitly named as primary and the
other as a legacy fallback. Drop duplications where the two paths
serve genuinely different domains. Be specific.
silent-helperIdentify project helpers:
helper_directories (or default locations) for files containing public functions, modules, or symbols(helper_path:line, symbol_name, purpose)Use this brief for the second review:
You audit an agent instruction file for missing pointers to existing helpers.
Instruction-file content: <full content>
Project helpers: <list of tuples>
Tasks:
1. For each project helper, ask: does the instruction file anywhere mention it,
point at it, or describe the convention that would lead an agent
to discover it?
2. When the instruction file is silent on a helper that an agent would plausibly
re-implement, flag it. "Plausibly re-implement" means: the helper
covers a common cross-cutting concern (auth, tenancy, formatting,
notification, logging, query-shaping).
3. For each silent helper, write a drift hypothesis (agents will
reinvent this in fresh sessions, producing parallel implementations
that drift on edge cases) and a convergence_proposal (which
instruction-file section should mention it).
4. Provide a verifier_command: a grep over the codebase showing the
helper's call-sites (high call-site count means high re-invention
risk).
Drop helpers that are clearly private (underscore-prefixed, in
internal/ paths). Drop helpers whose purpose is too narrow to matter
(single-use formatters, one-off migration scripts).
Combine the two review reports into the output markdown under ## Pattern: two-prescribed-paths and ## Pattern: silent-helper. Apply caps if either pattern produced more than 10 findings; keep the highest-impact (broadest call-site count for silent-helper, broadest behavioural surface for two-prescribed-paths).
Hand back the assembled markdown to the caller. Do not write to disk; the orchestrator's audit artefact is the canonical home.
with_tenant wrapper because nothing in the instruction files points at it" is.two-prescribed-paths without silent-helper, or vice versa, or both. Always run both audits when this skill is dispatched in audit mode.instruction_paths, but its convergence proposals for those files are listed as "operator considers" rather than "edit here". User-level config is operator-personal; the audit informs, it does not prescribe.