本文へ移動
cccskills
無料GitHub で公開

guideline-writing

Use when creating or editing a guideline in docs/guidelines/ — reference material cited by skills, no auto-triggers — even when the user just says 'write up our naming conventions'.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

<!-- cloud_safe: degrade -->

guideline-writing

When to use

  • Creating a new guideline in docs/guidelines/{topic}/{name}.md
  • Rewriting an existing guideline (not a typo fix)
  • Extracting reference material out of a bloated skill or rule
  • Consolidating repeated explanations from multiple skills

Do NOT use this skill when:

  • The content is a constraint ("never / always") → use rule-writing
  • The content is a triggered workflow → use skill-writing
  • The content is a user-invoked action → use command-writing

Guideline vs rule vs skill — critical test

IntentArtifact
"Here is knowledge skills and rules may cite"Guideline
"Agent must always / never do X"Rule
"When Y happens, run these steps"Skill

A guideline is reference material. It is never a trigger. It has no description used for routing — skills and rules link to it.

Procedure

0. Run the Drafting Protocol

Creating or materially rewriting a guideline must go through Understand → Research → Draft from the artifact-drafting-protocol rule.

  • Understand — which skills or rules will cite this guideline? If the answer is "none", the guideline has no home — stop.
  • Research — inspect docs/guidelines/ for overlap and grep src/ for pages that already cover the topic. Analyze 1–2 peer guidelines in the same topic folder for tone.
  • Draft — propose location (topic folder + filename) and outline. Only fill bodies once the outline is confirmed.

1. Pick the right topic folder

Folders under docs/guidelines/:

FolderContents
agent-infra/Cross-cutting agent-system knowledge (naming, size, output patterns)
php/PHP-specific reference (patterns, services, jobs, resources)
e2e/End-to-end testing patterns

If none fits, ask the user before creating a new folder.

2. Write frontmatter

Guidelines use a minimal frontmatter — no type, no auto-trigger semantics.

---
description: "Short human-readable summary — cited by skills, not used for routing"
source: package     # or project for consumer-local guidelines
---

If you do want to polish the description for a guideline whose summary gets surfaced to agents, delegate to the description-assist skill — same approval-gated flow as for skills and rules.

3. Structure the body

  • Start with a single # heading that matches the filename.
  • Organize by topic, not by workflow — no numbered procedures.
  • Prefer tables, bullet lists, and short code blocks over prose paragraphs.
  • End with explicit "See also" links to related guidelines and the skills that cite it.

4. Wire it in

A guideline is useless if nothing cites it. Before closing the task:

  • Add a link from at least one skill or rule using the pattern → See 'docs/guidelines/{topic}/{name}.md' for full X.
  • Keep the citing skill/rule executable — do not hollow it out into a pointer. (Normative source: preservation-guard.)

5. Enforce the size budget

Guidelines have more room than rules but are not dumping grounds.

CategoryTarget
Ideal≤ 200 lines
Acceptable≤ 400 lines
Split signal> 500 lines

Above the split signal, break by sub-topic into sibling files in the same folder.

6. Validate

  • Run ./scripts-run src/scripts/skill_linter docs/guidelines/{topic}/{name}.md → 0 FAIL (guidelines have relaxed linting but must still parse).
  • Run bash scripts/condense.sh --sync → projects updates.
  • Run ./scripts-run src/scripts/check_references → no broken links.
  • Run the full CI pipeline locally (see Taskfile.yml in this repo for the script list) — must exit 0 except for tolerated warnings.

Output format

  1. Complete guideline at docs/guidelines/{topic}/{name}.md
  2. At least one skill or rule linking to it
  3. Linter + check_references.ts clean
  4. bash scripts/condense.sh --sync confirmation

Gotchas

  • Creating a guideline nothing cites → dead page, remove or inline.
  • Pasting a workflow into a guideline → that is a skill, not reference.
  • Duplicating content already present in another guideline or skill → extract into the guideline and link from both.
  • Hollowing out a skill into "see guideline" — the skill must remain executable (see preservation-guard).

Frugality Standards

Apply the Frugality Charter to every guideline you author.

Examples in this artifact:

  • Per the charter's index nature, guidelines describe practice patterns; they do not restate Iron-Laws from rules.
  • Per the act-skip-narration rule, code examples lead with the pattern, not its motivation.
  • Per the cheap-question check, guidelines do not prescribe stylistic forks ("table vs. paragraph") — pick one.

Pre-save self-check:

  1. Does the guideline restate text from a rule body instead of linking the rule?
  2. Are code examples preceded by narrative ramp-up?
  3. Does the guideline introduce a new convention without citing the rule that holds the obligation?
  4. Are sections labeled "Overview" / "Background" carrying only restatement?

Do NOT

  • Do NOT add type: or alwaysApply: to the frontmatter
  • Do NOT embed numbered procedures — those belong in skills
  • Do NOT create an orphan guideline with no inbound links
  • Do NOT reintroduce .agent-src.uncondensed/guidelines/ — relocated to docs/guidelines/

Cloud Behavior

On cloud surfaces (Claude.ai Web, Skills API) the package's scripts/check_references.ts, scripts/skill_linter.ts, and task runner are not reachable. The skill still applies — with prose-only validation:

  • Emit the full guideline file as a copyable Markdown block. Do not attempt to write to disk.
  • Self-check the frontmatter: description only, no type, no alwaysApply.
  • Self-check the body: reference material, no numbered procedures, named in a topic folder.
  • Tell the user to save under docs/guidelines/{topic}/{name}.md and run task sync && task lint-skills && task check-refs locally before committing.
  • Do not call the linter, ref-checker, or condenseor — they only run on the user's machine.

Examples

Good guideline name + description:

Path: docs/guidelines/agent-infra/size-and-scope.md Description: "Golden size rules for rules, skills, commands, and guidelines"

Bad:

Path: guidelines/stuff (no topic folder, meaningless stem) Description: "Things to know"

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when reviewing UI for accessibility — WCAG 2.2 AA, keyboard nav, focus, ARIA, contrast, screen-reader semantics — even on 'is this a11y-OK?' or 'mach das barrierefrei'.

日本語の概要は準備中です。原文の説明を表示しています。

event4u-app/agent-config112026年10月13日 更新

Use when defining or auditing the activation event — aha-moment selection, retention correlation, falsifiable definition. Triggers on 'what is our aha moment', 'redefine activation'.

日本語の概要は準備中です。原文の説明を表示しています。

event4u-app/agent-config112026年10月13日 更新

Use when capturing an architectural decision — file naming, next ADR number, Status / Context / Decision / Consequences, index regen; fires even without saying 'ADR'.

日本語の概要は準備中です。原文の説明を表示しています。

event4u-app/agent-config112026年10月13日 更新

Adversarial critique — devil's advocate, stress-test, honest teardown ('poke holes', 'be brutal', 'was hältst du davon'); explicit request only. Routine code or design review → code-review.

日本語の概要は準備中です。原文の説明を表示しています。

event4u-app/agent-config112026年10月13日 更新

Use when reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md. Understands the full .augment/, agents/, and copilot-instructions structure.

日本語の概要は準備中です。原文の説明を表示しています。

event4u-app/agent-config112026年10月13日 更新

Use for an adversarial red-team / blue-team / auditor review of an AI agent's CONFIG + behaviour (rules, skills, MCP, hooks, permissions) — attack-chain → defensive-gap list, not a code audit.

日本語の概要は準備中です。原文の説明を表示しています。

event4u-app/agent-config112026年10月13日 更新

event4u-app のスキルをすべて見る

このスキルの問題を報告する