# all·markdown

Code of conduct template for a project

Fill it in and copy it Open in the editor Opens as CODE_OF_CONDUCT.md, ready to edit. Nothing is uploaded.

The shape of it — edit here, or open the full template

Result

Runs entirely in this tab. Open the full editor to work on a real document.

Fill it in and take it

The whole file is below. Type into the boxes to replace the placeholders, then copy it or save it — nothing here is sent anywhere, and there is nothing to sign up for.

   

CODE_OF_CONDUCT.md goes in the repository root, .github/ or docs/. GitHub finds it in any of the three and links it from the community profile and the repository sidebar.

Use the Contributor Covenant unless you have a reason not to

Most projects adopt it, and the reason is recognition rather than wording: contributors know what they are agreeing to without reading it. A bespoke document has to earn that trust from scratch.

The template here is shorter, in the same spirit, for projects that would rather have something people read once than something they scroll past.

The part that is usually missing

Reporting. A code of conduct with no working route to report is decoration, and it is worse than none — it implies a process that does not exist.

A usable reporting section has four things:

The awkward case is worth planning for: what happens when the report is about a maintainer. Naming two or three people, and saying that anyone involved steps out of the review, answers it before it comes up.

Scope

Say where it applies. Most projects extend it to the repository, issues, pull requests, discussions, chat, and anywhere someone is representing the project. Ambiguity here is what makes enforcement contentious later.

When it is worth writing

A solo project does not need one. Once contributors arrive who you have not met, it is twenty minutes well spent — pointing at a document that already existed is far easier than writing one during an incident.

Common questions

Where does CODE_OF_CONDUCT.md go?
The repository root, `.github/` or `docs/`. GitHub detects it in any of the three, links it from the community profile, and shows it in the sidebar of the repository page.
Should I use the Contributor Covenant instead?
Usually yes. Its value is recognition — contributors know what they are agreeing to without reading it, which a bespoke document cannot offer. This template is a shorter document in the same spirit, for projects that want something people will actually read.
What is the part most codes of conduct get wrong?
Reporting. A document with no working address, or one pointing at a mailing list the person being reported is on, is decoration. Name the people who receive reports, say what happens after one, and give a rough timescale.
Does it apply outside the repository?
Say so explicitly in a scope section. Most projects extend it to chat, forums, and anywhere someone is representing the project — including conferences. Ambiguity about scope is what makes enforcement contentious.
Do small projects need one?
A solo project does not. Once there are contributors you have not met, it is worth the twenty minutes: it is far easier to point at a document that already existed than to write one during an incident.