Agent Skills › shinpr/claude-code-workflows › llm-friendly-context

llm-friendly-context

GitHub

提供LLM友好型上下文规范,指导如何编写清晰、可执行的提示词和交接文档。通过明确输入输出、成功标准和决策点,减少歧义,确保下游消费者或AI能准确执行任务,提升协作效率与结果稳定性。

skills/llm-friendly-context/SKILL.md shinpr/claude-code-workflows

Trigger Scenarios

编写或修改面向LLM的提示词 创建或优化工作交接文档 生成规划工件或报告

Install

npx skills add shinpr/claude-code-workflows --skill llm-friendly-context -g -y
More Options

Use without installing

npx skills use shinpr/claude-code-workflows@llm-friendly-context

指定 Agent (Claude Code)

npx skills add shinpr/claude-code-workflows --skill llm-friendly-context -a claude-code -g -y

安装 repo 全部 skill

npx skills add shinpr/claude-code-workflows --all -g -y

预览 repo 内 skill

npx skills add shinpr/claude-code-workflows --list

SKILL.md

Frontmatter
{
    "name": "llm-friendly-context",
    "description": "Clarifies inputs, outputs, success criteria, decisions, and unresolved conditions so downstream consumers can execute without guessing. Use when writing or revising LLM-facing prompts, handoffs, planning artifacts, reviews, reports, or generated instructions."
}

LLM-Friendly Context

The goal is stable downstream execution: the next consumer should know what to read, what to do, what counts as success, and which unresolved decisions can change the result.

Core Rules

  1. Use positive, executable instructions

    • State what the next consumer should do.
    • Convert quality policies into positive criteria.
    • Keep a prohibition only when it protects an irreversible boundary or shipped contract. Name the protected condition and the allowed action.
    • Example: "Preserve existing public API behavior across the documented compatibility cases."
  2. Make vague instructions concrete

    • Clarify wording when plausible interpretations would change the outcome, scope, authority or proof. Supply purpose, evidence and selection criteria for reversible choices; reserve exact selections for actual consumer contracts and user-owned decisions.
    • Terms that often need clarification when they leave a decision to the next consumer: appropriate, proper, related, existing behavior, optional, as needed, if needed, per convention, unresolved alternatives, TBD, placeholder.
  3. Specify output shape

    • Use the sections, fields, table columns, JSON keys, or checklist items the consumer uses.
    • For handoffs, include only produced artifact paths and status fields that control the next transition.
  4. Provide the smallest sufficient context

    • Sufficient means sufficient for the assigned action, not complete background: every item you include is consumed by that action or by the result it must produce.
    • Include the purpose, source artifacts, hard constraints, accepted decisions, and unresolved conditions that action consumes.
    • Prefer concrete file paths and section hints over broad module names.
    • Follow references while they can change an in-scope decision, action, or verification result.
  5. Decompose complex work into verifiable steps

    • Expose real dependencies and their completion evidence. Let independent reversible work follow the route suited to the task.
    • Each step needs a checkpoint: what evidence proves it is complete.
  6. Permit uncertainty explicitly

    • Resolve missing operational detail from referenced artifacts and repository evidence before treating it as unresolved.
    • Record remaining uncertainty with its effect, required input, and decision owner. Make reversible repository-local choices when governing evidence resolves them.
  7. Keep constraints proportionate

    • Add only constraints that reduce ambiguity or preserve a real requirement.
    • Keep simple downstream tasks lightweight when the target action, context, and success criteria are already clear.
    • Interpret minimal as the least downstream complexity that fully solves the problem. An explicit user diff limit is a constraint; otherwise necessary corrections are not bounded by a line count.

Rewrite Patterns

Use these rewrites before treating a prompt, handoff, or artifact as complete.

Ambiguous form Rewrite as
optional used as an unresolved choice Required, omitted, or required only under a named condition
Alternatives whose choice changes a protected outcome The governing constraint or unresolved owner decision; for reversible choices, purpose, evidence and selection criteria
as needed / if needed The triggering condition and required action
per convention The file, function, test, or documented convention to follow
related files Specific paths, globs, or search hints
existing behavior The observable behavior, source file, test, API response, or UI state to preserve
placeholder Exact temporary value/behavior, allowed dependencies, and verification expectation
TBD used as a placeholder for required information A blocking unresolved item with owner, required input, and decision effect
appropriate / proper A measurable criterion or checklist

Handoff Checklist

Before sending a prompt or artifact to another consumer, verify:

  • The target action is explicit.
  • Required input paths, source artifacts, and decision-relevant facts are named.
  • Every included context item is consumed by the target action or its required result.
  • Accepted decisions and constraints use one canonical wording.
  • Output format or expected status fields are specified.
  • Success criteria are observable.
  • Outcome-relevant ambiguities are resolved or assigned to their decision owner; harmless execution flexibility remains.
  • Each instruction states the allowed action; each retained prohibition names the protected condition and allowed alternative.
  • The next consumer can complete its scope from the supplied purpose, sources, criteria, and evidence, or return the exact unresolved decision and owner.

Generated Artifact Checklist

Before writing or finalizing a generated document:

  • Each requirement, claim, task, test skeleton, or review finding has enough source context to trace why it exists.
  • Every executable instruction names the target, action, and expected result.
  • Verification steps say what to run or observe and what result proves success.
  • Each instruction states the allowed action; each retained prohibition names the protected condition and allowed alternative.
  • If an artifact is derived from another artifact, copied decisions stay consistent in wording and meaning.
  • If downstream work is blocked by missing information, the artifact records the missing input, decision owner, and effect.

Version History

  • eba53e4 Current 2026-11-02 13:40

    简化工作流契约,恢复机械式交接和审查触发的探测模板,更新规则以增强指令的具体性和可执行性。

  • d479be0 2026-09-22 04:08

    明确需求所有权归属用户,并增加消费端测试规则以验证交接充分性。

  • 416af89 2026-08-12 16:41

    重构以对齐证据驱动的模型自主性工作流,完善边界定义并保留提示词意图,强调正向指令与具体化描述。

  • 0d96a63 2026-08-05 22:07

    重构设计决策部分,强调基于证据收敛决策,提升上下文的一致性和可靠性。

  • d439b50 2026-07-31 02:55

    新增约束适度原则以简化轻量任务;细化模糊术语重写模式(如optional、as needed等);增加不确定性显式声明与升级机制;优化参考引用指引。

  • 66e3b29 2026-07-05 12:01

Same Skill Collection

dev-skills/skills/ai-development-guide/SKILL.md
dev-skills/skills/coding-principles/SKILL.md
dev-skills/skills/documentation-criteria/SKILL.md
dev-skills/skills/external-resource-context/SKILL.md
dev-skills/skills/frontend-ai-guide/SKILL.md
dev-skills/skills/implementation-approach/SKILL.md
dev-skills/skills/integration-e2e-testing/SKILL.md
dev-skills/skills/llm-friendly-context/SKILL.md
dev-skills/skills/requirement-convergence/SKILL.md
dev-skills/skills/test-implement/SKILL.md
dev-skills/skills/testing-principles/SKILL.md
dev-skills/skills/typescript-rules/SKILL.md
dev-workflows-frontend/skills/ai-development-guide/SKILL.md
dev-workflows-frontend/skills/coding-principles/SKILL.md
dev-workflows-frontend/skills/documentation-criteria/SKILL.md
dev-workflows-frontend/skills/external-resource-context/SKILL.md
dev-workflows-frontend/skills/frontend-ai-guide/SKILL.md
dev-workflows-frontend/skills/implementation-approach/SKILL.md
dev-workflows-frontend/skills/integration-e2e-testing/SKILL.md
dev-workflows-frontend/skills/llm-friendly-context/SKILL.md
dev-workflows-frontend/skills/recipe-diagnose/SKILL.md
dev-workflows-frontend/skills/recipe-front-adjust/SKILL.md
dev-workflows-frontend/skills/recipe-front-build/SKILL.md
dev-workflows-frontend/skills/recipe-front-design/SKILL.md
dev-workflows-frontend/skills/recipe-front-plan/SKILL.md
dev-workflows-frontend/skills/recipe-front-review/SKILL.md
dev-workflows-frontend/skills/recipe-quality-profile/SKILL.md
dev-workflows-frontend/skills/recipe-task/SKILL.md
dev-workflows-frontend/skills/recipe-update-doc/SKILL.md
dev-workflows-frontend/skills/requirement-convergence/SKILL.md
dev-workflows-frontend/skills/subagents-orchestration-guide/SKILL.md
dev-workflows-frontend/skills/task-analyzer/SKILL.md
dev-workflows-frontend/skills/test-implement/SKILL.md
dev-workflows-frontend/skills/testing-principles/SKILL.md
dev-workflows-frontend/skills/typescript-rules/SKILL.md
dev-workflows-fullstack/skills/ai-development-guide/SKILL.md
dev-workflows-fullstack/skills/coding-principles/SKILL.md
dev-workflows-fullstack/skills/documentation-criteria/SKILL.md
dev-workflows-fullstack/skills/external-resource-context/SKILL.md
dev-workflows-fullstack/skills/frontend-ai-guide/SKILL.md
dev-workflows-fullstack/skills/implementation-approach/SKILL.md
dev-workflows-fullstack/skills/integration-e2e-testing/SKILL.md
dev-workflows-fullstack/skills/llm-friendly-context/SKILL.md
dev-workflows-fullstack/skills/recipe-add-integration-tests/SKILL.md
dev-workflows-fullstack/skills/recipe-build/SKILL.md
dev-workflows-fullstack/skills/recipe-design/SKILL.md
dev-workflows-fullstack/skills/recipe-diagnose/SKILL.md
dev-workflows-fullstack/skills/recipe-front-adjust/SKILL.md
dev-workflows-fullstack/skills/recipe-front-build/SKILL.md
dev-workflows-fullstack/skills/recipe-front-design/SKILL.md

Metadata

Files
0
Version
d23f861
Hash
9f5e10af
Indexed
2026-07-05 12:01

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-18 09:14
浙ICP备14020137号-1