Discover, preview, and insert CircleCI docs reusable includes: AsciiDoc partials and shared code examples. Propose when new or existing content should become a shared partial or example, then create it and replace duplicates after confirmation. Use this skill whenever the user mentions partials, examples, includes, reusable snippets, /partials, or /examples, and whenever you are writing or editing .adoc pages that need shared navigation steps, notes, tips, FAQs, troubleshooting, resource tables, runner setup, or shared config snippets. Other docs-authoring skills must follow this skill instead of copying reusable content by hand.
Two reusable families live next to each other under docs/guides/modules/ROOT/:
| Family | Directory | Use for | Include family |
|---|---|---|---|
| Partials | partials/ | Shared AsciiDoc prose (steps, notes, FAQs, tables) | partial$ |
| Examples | examples/ | Shared code snippets, usually YAML config | example$ |
Choose the family from the request (/partials vs /examples) or from the content. Always scan the repo. Do not invent filenames or rely on a memorized catalog.
If another skill is writing or editing docs content:
include:: line. Never paste the body of a partial or example into a page.Scan these trees. Do not treat the category maps below as file lists.
| Content | Path | Ignore |
|---|---|---|
| Shared docs partials | docs/guides/modules/ROOT/partials/ | ui/src/partials/ (Handlebars UI templates) |
| Shared code examples | docs/guides/modules/ROOT/examples/ | External GitHub sample repos linked from pages |
| Server Admin partials | docs/server-admin-<version>/modules/ROOT/partials/ | Versioned copies. Edit the version you are working on. |
find docs/guides/modules/ROOT/partials -name '*.adoc' | sort
find docs/guides/modules/ROOT/examples -type f | sortSame component (a guides page including a guides partial):
include::ROOT:partial$category/filename.adoc[]Cross-component (orbs, reference, or another component including a guides partial):
include::guides:ROOT:partial$category/filename.adoc[]Prefer the short ROOT:partial$ form inside guides. Use the full guides:ROOT:partial$ coordinate from every other component.
Optional author comment (does not change rendered content; common on well-known notes and nav steps):
include::ROOT:partial$notes/standalone-unsupported.adoc[This feature is not supported for GitLab or GitHub App]AsciiDoc include attributes (do change rendering). Use leveloffset when the partial starts with section headings that must nest under the current heading:
include::guides:ROOT:partial$deploy/configure-validation-providers.adoc[leveloffset=+2]Do not put a comment and leveloffset in the same brackets unless you are sure both are valid attributes.
Wrap the include in a source or listing block. The example file is raw code, not AsciiDoc.
Same component:
.Optional title for the snippet
[source,yaml]
----
include::ROOT:example$category/filename.yml[]
----Cross-component:
[source,yaml]
----
include::guides:ROOT:example$orchestration-examples/job-group.yml[]
----Match the page's existing fence style if it already has one ([source,yaml] or [,yaml]). Default to [source,yaml]. Put titles on the listing block (.Title), not in the include brackets. Comments that explain the snippet belong in the example file.
Confirm the file still exists before inserting.
partials/)| Directory | Use when the page needs |
|---|---|
app-navigation/ | Steps to project, org, user, or job settings, or to find IDs |
create-project/ | Shared Create Project / choose-a-repo / GitLab cleanup steps |
notes/ | Reusable notes and warnings (Docker auth, feature support, org ID) |
tips/ | How to check org type, GitHub type, project slug, env vars vs contexts |
faq/ | FAQ answers (*-snip.adoc). Usually included from FAQ pages |
troubleshoot/ | Troubleshooting snippets (*-snip.adoc) |
runner/ | Self-hosted runner terms, install steps, package install, examples |
orbs/ | Orb type definitions and comparison table |
pipelines-and-triggers/ | Schedule triggers, custom webhooks, pipeline values |
execution-resources/ | Executor resource class tables and related notices |
using-expressions/ | Expression operators and env-var caveats |
deploy/ | Deploy/release shared sections (supported versions, validation providers) |
prerequisites/ | Shared prerequisite bullets (for example org admin) |
shared-sections/ | Longer shared sections (API token, secrets masking, product features) |
installation/ | Server Admin install-phase partials only |
examples/)| Directory | Use when the page needs |
|---|---|
expression-examples/ | Current expression syntax (when: pipeline.git.branch == "main"). Subdirs include workflow-when/ and job-filters/ |
logic-statement-examples/ | Legacy logic-statement maps (when: or: equal:). Use only when documenting the old syntax |
orchestration-examples/ | Job groups, serial groups, and override-with config |
Prefer expression-examples/ over logic-statement-examples/ unless the page is explicitly about legacy logic statements.
Decide which workflow the user asked for. A write-docs skill usually wants Suggest from context, then Insert. When content is duplicated or clearly reusable, follow Propose extraction before writing a second copy.
/partials scopes to partials/. /examples scopes to examples/. If the request is only /partials or /examples, list that family's category directories first.
/partials, /partials navigation, /examples, /examples orchestration)navigation → app-navigation/, orchestration → orchestration-examples/).include:: line (for examples, show the full source-block wrapper). Do not dump every file body./partials search project settings, /examples search job-group)find docs/guides/modules/ROOT/partials -iname '*<term>*'
rg -l -i '<term>' docs/guides/modules/ROOT/partials
find docs/guides/modules/ROOT/examples -iname '*<term>*'
rg -l -i '<term>' docs/guides/modules/ROOT/examplesinclude:: line (plus the source-block wrapper for examples).Use this when writing or editing a page, even if the user did not say "partial" or "example".
include:: lines. Do not re-suggest files that are already there.partials/when clauses, job groups, serial groups → search examples/tips/find-project-slug.adoc, not the generic project-settings stepsapp-navigation/steps-to-project-id.adoc or steps-to-org-id.adoc (these already include the settings steps)tips/check-github-type.adocexpression-examples/, not logic-statement-examples/orchestration-examples/Common starting points (still verify by reading the file):
| Need | First file to open |
|---|---|
| Steps to project settings | partials/app-navigation/steps-to-project-settings.adoc |
| Steps to org settings | partials/app-navigation/steps-to-org-settings.adoc |
| Create Project through pipeline setup | partials/create-project/steps-up-to-pipeline.adoc |
| Docker authenticated pulls note | partials/notes/docker-auth.adoc |
| Feature unsupported for some VCS / pipeline types | partials/notes/standalone-unsupported.adoc |
| Check organization type | partials/tips/check-org-type.adoc |
| Check GitHub App vs OAuth | partials/tips/check-github-type.adoc |
| Find organization ID | partials/notes/find-organization-id.adoc |
| Find project slug | partials/tips/find-project-slug.adoc |
| Resource class table | Matching file in partials/execution-resources/ |
| Pipeline values reference | partials/pipelines-and-triggers/pipeline-values.adoc |
Branch or boolean workflow when | Matching file in examples/expression-examples/workflow-when/ |
| Job group | examples/orchestration-examples/job-group.yml |
| Serial group | examples/orchestration-examples/serial-group.yml |
ROOT:… vs guides:ROOT:…) from the including page's component.include:: another partial (for example steps-to-project-id.adoc includes steps-to-project-settings.adoc). Use the composed file. Do not stack both.ifdef:: / ifndef::. If present, set the matching page attributes before the include. Examples used today: :machine:, :container:, :provisioner:, :linux:, :macos:, :windows:, :server:.**** sidebar, NOTE:, TIP:, or bare list items). Only insert when that wrapper fits the page.== / === headings, add leveloffset so they nest correctly.include:: line. If it sits inside a list or tab, confirm the list markers still work. Some nav and create-project partials start with ordered-list . items on purpose.standalone-unsupported, steps-to-project-settings, steps-up-to-pipeline).include::ROOT:example$… into prose.Use this when existing page content should become a shared partial or example, or when you are about to write the same chunk in a second place.
Extract when all of these are true:
Do not extract when:
**** sidebar vs bare list vs NOTE:)Propose, then wait. Do not create a file or rewrite other pages until the user confirms.
partials/ or examples/) for distinctive phrases from the chunk. Read each match. Drop false positives.docs/guides/modules/ROOT/partials/<category>/<filename>.adoc or docs/guides/modules/ROOT/examples/<category>/<filename>.ymlinclude:: line, including the source-block wrapper for examples)Create a new file only after Propose extraction is confirmed, or the user asked for one.
.adoc (use -snip.adoc for FAQ and troubleshooting snippets). Examples use the language extension, usually .yml.:page-platform:, :page-description:, or other page-only attributesThese apply to partials. Example includes do not take author comments or leveloffset in practice.
Author comments in [brackets] are for humans. They do not substitute text into the partial. notes/standalone-unsupported.adoc does not read the bracket text; every include of that file renders the same support note.
Include attributes such as leveloffset=+2, tag=, or lines= change how AsciiDoc includes the file.
Page attributes set on the including page control ifdef:: / ifndef:: inside the partial. Example from container runner install:
:container:
include::ROOT:partial$runner/install-with-web-app-steps.adoc[]When a partial uses ifdef::, tell the user which attributes they must set. Suggest those attributes if they are missing.
example$ include outside a source or listing block.ui/src/partials/ files in docs pages.installation/ partial from a Cloud guides page.logic-statement-examples/ snippet when documenting current expression syntax./partials
/partials navigation
/partials search project settings
/examples
/examples orchestration
/examples search job-group
Use a partial for the Docker auth note
Is there a partial for checking org type?
Is there a shared example for serial groups?
Should this note be a shared partial?
This project-settings walkthrough is copied on three pages. Extract it.
This workflow when clause is copied in the cookbook and the config reference. Extract it.5c19307
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.