/symfony-contribution-skills:symfony-docs-contributionfrom symfony-contribution-skills
Guides writing and editing reStructuredText documentation for Symfony projects, covering RST syntax, writing standards, and PR workflow.
Ships in symfony-contribution-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use when writing or editing reStructuredText (.rst) documentation for symfony/symfony-docs or for a Symfony package's own docs (bundles, UX, AI, ...). Covers RST syntax, the documentation writing standards, and the doc PR workflow.
For PHP code changes, use the symfony-code-contribution skill instead.
.. code-block:: <lang> for code. Single backticks and indented lists are Markdown habits — don't.foo/bar/demo; use Acme as the vendor and example.com (then example.org/example.net) as domains.Headers — underline the title with the text's exact width:
| Level | Char |
|---|---|
| 1 | = |
| 2 | - |
| 3 | ~ |
| 4 | . |
| 5 | " |
Lists start at column 0 (no indentation). - or * for unordered, numbers for ordered.
Code blocks — .. code-block:: <lang> then an indented block; default language is PHP. Common languages: php, yaml, xml, twig, html, html+twig, html+php, js, json, bash, terminal, diff, text, env, ini, rst, php-symfony, php-standalone, php-attributes.
.. code-block:: yaml
framework:
secret: '%env(APP_SECRET)%'
Multi-format config — show a config in all supported formats with .. configuration-block:: wrapping nested .. code-block:: directives (order below). When a feature is also usable outside the framework, show both php-symfony and php-standalone blocks. Use .. tabs:: Title / .. tab:: Name for tabbed content of any kind (e.g. install methods).
Directives: .. note::, .. warning::, .. versionadded:: X.Y, .. deprecated:: X.Y, and .. _target-name: placed above a section to define a cross-reference anchor. Directive content must be indented.
Version markers:
.. versionadded:: 8.x and a short note ("... was introduced in Symfony 8.2."). For a behavior change, briefly add how it behaved before... deprecated:: 8.x ("... was deprecated in Symfony 8.2.").9.0).Inline roles:
double backticks (never single).*italic*, **bold** — don't span markup across lines.:doc:`/path/to/page` or :doc:`Custom text </path/to/page>` (absolute path, no .rst). Never relative — it breaks the PDF docs.:ref:`Text <target-name>`.:class:`Symfony\\Component\\...\\ClassName`, :method:`Symfony\\...\\ClassName::method`.:phpclass:`SimpleXMLElement`, :phpmethod:`DateTime::createFromFormat`, :phpfunction:`iterator_to_array`.you'd, it's). Do not use serial (Oxford) commas.:: shorthand (A PHP example would be::) instead of .. code-block:: php, unless :: would be alone on its line.Config format order (show the supported formats in this order):
| Context | Order |
|---|---|
| Configuration / Services | YAML, PHP |
| Routing | Attributes, YAML, PHP |
| Validation | Attributes, YAML, XML, PHP |
| Doctrine Mapping | Attributes, YAML, XML, PHP |
| Translation | XML, YAML, PHP |
| Code Examples (if applicable) | PHP Symfony, PHP Standalone |
{ and before } ({ _controller: ... }) — but not in Twig templates.Code examples:
// config/services.php); no blank line after it unless the next line is also a comment.namespace declaration.use statements for the classes you reference — only those the block actually uses.... in a language comment: // ... (PHP), # ... (YAML/bash), {# ... #} (Twig), <!-- ... --> (XML/HTML), ; ... (INI), ... (text). Fold part of a line with a bare ....... when folding lines (// ... check if $bar has the correct value), on the line before when folding part of a line.$.bin/), file extensions with a leading dot (.xml), and the project root as your-project/.Images: create/edit diagrams with Dia, in the Symfony docs style. Every image and diagram needs alt text: concise, not duplicating the surrounding text, capital first letter, trailing period, no "A screenshot of" / "Diagram of" preamble unless the type matters. Describe complex diagrams in the surrounding text and let the alt say where ("These elements are described further in the next sections.").
.rst directly on GitHub.symfony/symfony-docs, add the upstream remote, and branch from the right base — bug/inaccuracy fix -> oldest maintained branch that has it (merges up); new-feature docs -> the branch of the version that introduces it. Name it improve_xxx or fix_xxx..rst, following the format and standards above.Canonical sources in symfony/symfony-docs:
contributing/doc.rstcontributing/documentation/format.rstcontributing/documentation/standards.rst| Bad | Good |
|---|---|
`config.yaml` (single backticks) | config.yaml (double) |
| "We can simply configure the service" | "You can configure the service" |
| "This is obviously the easiest way" | "This is the recommended way" |
| heading underline shorter than the title | underline matches the title width exactly |
[link](https://ex.com) (Markdown link) | `text <target>`_ with the target defined at the page bottom |
:doc:`controller` (relative) | :doc:`/controller` (absolute) |
"A PHP example would be:" + .. code-block:: php | "A PHP example would be::" |
foo/bar sample classes | realistic names, Acme vendor, example.com domains |
| indented bullet list | list markers flush at column 0 |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub kocal/symfony-contribution-skills --plugin symfony-contribution-skills2 skills in this plugin