docs-skills
CLAUDE.md4 starsChanged 4 months agoApache-2.0View on GitHub
Follow the shared project conventions in @AGENTS.md for repository structure, skill naming, contributing rules, and general script invocation patterns. The instructions below apply only to Claude Code. Behavioral rules to reduce common mistakes. These bias toward caution over speed — use judgment for trivial tasks. Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify. When editing existing code: - Don't "improve" adjacent code, comments, or formatting. - Don't refactor things that aren't broken. - Match existing…
In this repository53 other files it gives its agents.
- AGENTS.mdAGENTS.md
- action-commentsSkill
- article-extractorSkill
- docs-convert-gdoc-mdSkill
- docs-orchestratorSkill
- docs-review-content-qualitySkill
- docs-review-modular-docsSkill
- docs-review-securitySkill
- docs-review-styleSkill
- docs-review-technicalSkill
- docs-ticket-readinessSkill
- docs-workflow-code-analysisSkill
- docs-workflow-create-jiraSkill
- docs-workflow-create-merge-requestSkill
- docs-workflow-jira-readySkill
- docs-workflow-pipeline-diagnosticsSkill
- docs-workflow-planningSkill
- docs-workflow-pr-analysisSkill
- docs-workflow-quality-gateSkill
- docs-workflow-requirementsSkill
- docs-workflow-scope-req-auditSkill
- docs-workflow-security-reviewSkill
- docs-workflow-startSkill
- docs-workflow-style-reviewSkill
- docs-workflow-tech-reviewSkill
- docs-workflow-writingSkill
- git-pr-readerSkill
- ibm-sg-audience-and-mediumSkill
- ibm-sg-language-and-grammarSkill
- ibm-sg-legal-informationSkill
- ibm-sg-numbers-and-measurementSkill
- ibm-sg-punctuationSkill
- ibm-sg-referencesSkill
- ibm-sg-structure-and-formatSkill
- ibm-sg-technical-elementsSkill
- jira-readerSkill
- jira-writerSkill
- learn-codeSkill
- lint-with-valeSkill
- mdita-writeSkill
- query-codeSkill
- redhat-docs-tocSkill
- rh-ssg-accessibilitySkill
- rh-ssg-formattingSkill
- rh-ssg-grammar-and-languageSkill
- rh-ssg-gui-and-linksSkill
- rh-ssg-legal-and-supportSkill
- rh-ssg-release-notesSkill
- rh-ssg-structureSkill
- rh-ssg-technical-examplesSkill
- rn-known-issuesSkill
- understand-pull-requestSkill
- validate-plugin-prereqsSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
35 rules. About 0 are common, 18 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 3
Follow the shared project conventions in @AGENTS.md for repository structure, skill naming, contributing rules, and general script …
- Distinctive: line 23
If multiple interpretations exist, present them — don't pick silently.
- Distinctive: line 24
If a simpler approach exists, say so.
- Distinctive: line 25
If something is unclear, stop.
- Distinctive: line 29
No features beyond what was asked.
- Distinctive: line 30
No duplication of existing functionality.
- Distinctive: line 31
No abstractions for single-use code.
- Distinctive: line 33
If you write 200 lines and it could be 50, rewrite it.
- Distinctive: line 35
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
- Distinctive: line 39
When editing existing code:
- Distinctive: line 40
Don't "improve" adjacent code, comments, or formatting.
- Distinctive: line 41
Don't refactor things that aren't broken.
- Distinctive: line 43
If you notice unrelated dead code, mention it — don't delete it.
- Distinctive: line 45
When your changes create orphans:
- Very specific: line 46
Remove imports/variables/functions that YOUR changes made unused.
- Distinctive: line 47
Don't remove pre-existing dead code unless asked.
- Very specific: line 87
In skills (SKILL.md): Use relative markdown links for progressive disclosure.
- Very specific: line 93
In agents (subagents): Use ${CLAUDE_PLUGIN_ROOT} paths with explicit Read instructions.
- Very specific: line 119
Do NOT embed procedural logic (conditionals, path construction, validation, JSON assembly, decision tables) inline in SKILL.md.
- Distinctive: line 125
Before merging a conversion, inventory what the prose actually produced:
- Very specific: line 141
Follow the common schema defined in skills/docs-orchestrator/schema/step-result-schema.md
- Very specific: line 142
Every sidecar must include schema_version, step, ticket, and completed_at
- Very specific: line 147
Every docs-workflow-* step skill must have both an input schema and an output schema in its schema/ directory:
- Very specific: line 152
When adding or modifying a step, update both schemas.
- Very specific: line 156
Every function in scripts/docs_orchestrator.py must have test coverage in tests/test_docs_orchestrator.py.
- Very specific: line 158
All post-processor functions (_pp_*)
- Very specific: line 159
All action constructors (make_run_skill, make_complete, make_fail)
- Very specific: line 160
All pure helpers (build_step_args, evaluate_when, check_input_deps, etc.)
- Very specific: line 161
All filesystem helpers (atomic_write_json, read_sidecar, read/write_progress, etc.)
- Very specific: line 163
When adding or modifying an orchestrator function, add or update corresponding tests.
- Distinctive: line 173
When creating or modifying skills, agents, hooks, or plugin components, follow the official Anthropic documentation.
- Distinctive: line 205
When investigating issues in this repo:
- Very specific: line 207
Wrong workflow output: Read the relevant skill's SKILL.md for expected behavior.
- Very specific: line 208
Orchestrator stuck or skipping steps: Check the workflow progress JSON in .agent_workspace/<TICKET>/workflow/.
- Very specific: line 209
Script failures: Check that PEP 723 scripts are invoked with uv run --script, not python3.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
docs-skills
Follow the shared project conventions in @AGENTS.md for repository structure, skill naming, contributing rules, and general script invocation patterns. The instructions below apply only to Claude Code.
Repository structure
.claude-plugin/plugin.json Plugin packaging metadata
skills/ Skill directories (each contains SKILL.md + scripts/)
agents/ Subagent definitions (.md files)
reference/ Shared domain knowledge (frameworks, templates, style guides)
hooks/ Plugin-level Claude Code event hooks
eval/ Evaluation test cases and harness configCoding guidelines
Behavioral rules to reduce common mistakes. These bias toward caution over speed — use judgment for trivial tasks.
Think before coding
- State assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them — don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
Simplicity first
- No features beyond what was asked.
- No duplication of existing functionality.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
Surgical changes
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it — don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
The test: every changed line should trace directly to the user's request.
Script calls in skills
The runtime working directory is the project root, not the skill directory. Bare relative paths like scripts/foo.py will fail. Use the appropriate substitution variable:
${CLAUDE_SKILL_DIR}— resolves to the directory containing the skill'sSKILL.md. Use for scripts bundled with the same skill.${CLAUDE_PLUGIN_ROOT}— resolves to the plugin's installation directory (repo root). Use for cross-skill calls, reference files, and hook/MCP/LSP subprocess contexts.
PEP 723 scripts (external dependencies)
Scripts with external dependencies use PEP 723 inline metadata and must be invoked via uv run --script:
uv run --script ${CLAUDE_SKILL_DIR}/scripts/jira_reader.py --issue PROJ-123Do not insert a -- separator between the script path and its arguments. With uv run --script <path>, uv passes everything after the path straight to the script, so a -- ends up in the script's argv. Subcommand-first scripts (e.g. git_pr_reader resolve) tolerate it, but flag-first scripts like jira_reader --issue fail with error: unrecognized arguments: --. The lint workflow rejects any uv run --script <path> -- … invocation.
Stdlib-only scripts
Scripts with no external dependencies use plain python3:
python3 ${CLAUDE_SKILL_DIR}/scripts/detect_language.py --repo /path/to/repoCross-skill calls
uv run --script ${CLAUDE_PLUGIN_ROOT}/skills/jira-reader/scripts/jira_reader.py --issue PROJ-123
python3 ${CLAUDE_PLUGIN_ROOT}/skills/learn-code/scripts/detect_language.py --repo /pathReferencing files from agents and skills
@ references (e.g., @reference/file.md) are a user input feature resolved by the Claude Code CLI when typing in the chat prompt. They are NOT resolved inside agent or skill body text — the body becomes the system prompt verbatim.
In skills (SKILL.md): Use relative markdown links for progressive disclosure. Claude follows these by reading the files on demand:
See [reference/asciidoc-reference.md](../../reference/asciidoc-reference.md)In agents (subagents): Use ${CLAUDE_PLUGIN_ROOT} paths with explicit Read instructions. Agent bodies become system prompts where markdown links are not auto-resolved:
## CRITICAL: Mandatory reference loading
Read: ${CLAUDE_PLUGIN_ROOT}/reference/jtbd-framework.md
Read: ${CLAUDE_PLUGIN_ROOT}/reference/asciidoc-reference.md
If either file cannot be read, STOP and report the error.Reference files under reference/ contain domain knowledge (frameworks, templates, style guides) shared across agents. Agents MUST read them at runtime via the Read tool — they are not automatically injected.
Skill logic must live in scripts
If a step can be scripted, it MUST be a script — not prose for Claude to execute by hand. Any procedural logic — argument parsing, mode determination, input validation, path computation, directory creation, conditionals, state transitions, decision rules, template rendering — belongs in a script under skills/<skill-name>/scripts/, never as step-by-step instructions in SKILL.md. Text that walks Claude through a deterministic procedure is a bug: it drifts under context compaction, cannot be tested, and produces inconsistent results. The test: if you could write a function that does it, write the function.
All JSON reading and writing MUST go through a script. Never hand-author a JSON file (sidecars, progress files, config, manifests) from a template in SKILL.md, and never hand-parse JSON in prose. Hand-authored JSON silently drifts from its schema (see the pipeline-diagnostics and security-review sidecar drift that motivated this rule); a script derives every field deterministically and can be unit-tested. SKILL.md may show a JSON example for documentation, but the actual read/write is always a script call.
The SKILL.md itself should only contain:
- Frontmatter and description
- Instructions to run the script and act on its output
- Domain knowledge that is genuinely Claude's judgment — prompt templates, checklists, review criteria, agent dispatch instructions, when to STOP and ask the user
- Output verification (that the script produced what was expected)
Do NOT embed procedural logic (conditionals, path construction, validation, JSON assembly, decision tables) inline in SKILL.md. If you find yourself writing "if X then set Y" or a JSON block with placeholders to fill in, stop and move it to a script.
Converting prose steps to scripts
When you replace prose instructions in a SKILL.md with a script, the script inherits only the behaviour someone wrote down. Anything the prose runs did incidentally — extra artifacts, retained intermediates, snapshots taken before an overwrite — stops happening silently, because no test covers a file nobody specified.
Before merging a conversion, inventory what the prose actually produced:
python3 scripts/artifact_inventory.py --step <step-name> --current <new-output-dir>It takes the union of paths that prior runs wrote under .agent_workspace/*/<step-name>/, diffs it against what the scripted version writes, and reports what is no longer produced along with how many runs produced it. For every dropped path, state in the PR whether it is dead weight, an unspecified feature to preserve, or an accident being dropped on purpose.
The test: if you cannot say why an artifact stopped being produced, the conversion is not finished.
This catches dropped artifacts only. Prose that chose to re-read a file, reorder work, or batch adaptively leaves nothing on disk, and no inventory will find it — weigh that separately when the prose step made decisions rather than just writing output.
Workflow step skills must write step-result.json
All docs-workflow-* step skills must write a step-result.json sidecar alongside their primary output. This lightweight metadata file lets the orchestrator read structured results without parsing markdown.
- Follow the common schema defined in
skills/docs-orchestrator/schema/step-result-schema.md - Every sidecar must include
schema_version,step,ticket, andcompleted_at - Each step's full JSON Schema lives in the step skill's own
schema/directory (e.g.,skills/docs-workflow-requirements/schema/requirements-output.json)
Step schemas are mandatory
Every docs-workflow-* step skill must have both an input schema and an output schema in its schema/ directory:
- Output schema (
<step-name>-output.json): defines thestep-result.jsonsidecar contract - Input schema (
<step-name>-input.json): defines the CLI args contract — whatbuild_step_args()produces and what the step expects to receive
When adding or modifying a step, update both schemas. The full index is at skills/docs-orchestrator/schema/step-result-schema.md.
Orchestrator steps must have tests
Every function in scripts/docs_orchestrator.py must have test coverage in tests/test_docs_orchestrator.py. This includes:
- All post-processor functions (
_pp_*) - All action constructors (
make_run_skill,make_complete,make_fail) - All pure helpers (
build_step_args,evaluate_when,check_input_deps, etc.) - All filesystem helpers (
atomic_write_json,read_sidecar,read/write_progress, etc.)
When adding or modifying an orchestrator function, add or update corresponding tests. Tests gate in CI via .github/workflows/test.yml — PRs with failing tests will not merge. Run make test locally before pushing.
Schema conformance tests
tests/test_schema_conformance.py validates that all step JSON Schemas are well-formed and that sidecars conform to them. It auto-discovers schemas from skills/docs-workflow-*/schema/ and validates golden examples against them. When adding or modifying a step schema, update the corresponding golden example in the test file. See skills/docs-orchestrator/schema/step-result-schema.md for full details.
The validate_sidecar() helper in tests/schema_helpers.py can be imported by other test files to validate sidecar dicts against their schemas.
Authoring skills, agents, and plugins
When creating or modifying skills, agents, hooks, or plugin components, follow the official Anthropic documentation. Do NOT rely on training data for schemas, frontmatter fields, or best practices — use WebFetch to consult the canonical docs.
Canonical documentation references
| Component | Documentation |
| Skill authoring best practices | https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices.md |
| Skills overview and structure | https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview.md |
| Skills in Claude Code | https://code.claude.com/docs/en/skills.md |
| Plugin schema and reference | https://code.claude.com/docs/en/plugins-reference.md |
| Plugin creation guide | https://code.claude.com/docs/en/plugins.md |
| Subagents | https://code.claude.com/docs/en/sub-agents.md |
| Hooks | https://code.claude.com/docs/en/hooks.md |
Skill files
New skills must use the directory-based format: skills/<skill-name>/SKILL.md. Each skill directory contains a SKILL.md and optional scripts/, config/, defaults/, hooks/, schemas/, references/ subdirectories.
Agent files (subagents)
Key constraints:
- The markdown body becomes the agent's system prompt — agents do NOT receive the full Claude Code system prompt
@references in agent body text are NOT resolved — use${CLAUDE_PLUGIN_ROOT}paths with explicit Read instructions- Plugin agents cannot use
hooks,mcpServers, orpermissionModefrontmatter fields - Subagents cannot spawn other subagents
Hooks
Plugin-level hooks are registered in hooks/hooks.json. The orchestrator also has a setup-hooks.sh script that installs project-level hooks for workflow completion and source resolution.
Debugging
When investigating issues in this repo:
- Wrong workflow output: Read the relevant skill's
SKILL.mdfor expected behavior. Check the step skill'sschema/<step-name>.jsonfor the output schema (index atskills/docs-orchestrator/schema/step-result-schema.md). Verifystep-result.jsonwas written correctly. - Orchestrator stuck or skipping steps: Check the workflow progress JSON in
.agent_workspace/<TICKET>/workflow/. Verify step dependencies andwhen:conditions in the workflow YAML. - Script failures: Check that PEP 723 scripts are invoked with
uv run --script, notpython3. Check that${CLAUDE_SKILL_DIR}and${CLAUDE_PLUGIN_ROOT}resolve correctly. - Agent missing context: Agents must explicitly Read reference files — they are not auto-injected. Check the agent's Read instructions point to valid
${CLAUDE_PLUGIN_ROOT}/reference/paths.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

