Thank you for wanting to help! This guide walks you through making a contribution entirely through GitHub's website — no terminal, no git commands required.
You'll need a free GitHub account.
A good contribution:
- Is based on a reliable source (a product label, a well-known CG resource, a blog post, a study)
- Includes a note about where the information comes from
- Checks that the ingredient isn't already in the database under a slightly different spelling
The most common mistakes are:
- Adding an ingredient that's already there (search the file first!)
- Putting an ingredient in the wrong category
- Adding a generic word that would accidentally match too many things
When in doubt, open an issue and describe what you found — someone can help figure out the right approach.
Go to ingredientrules.json on GitHub.
Press Ctrl+F (or Cmd+F on Mac) and search for the ingredient name. If it's already in the file, you're done — unless it's in the wrong category, in which case you'll want to move it.
In the top-right corner of the file view, click the pencil (edit) icon. GitHub will create a personal copy of the file for you to edit.
The file is a list of rules. Each rule has a name like "Sulfates to Avoid" or "Gentle Cleansers". Scroll to find the rule where your ingredient belongs.
See the ingredient format reference if you're not sure which rule to use or how the file is structured.
Inside the rule's "Ingredients" array, add your ingredient as a new line. Follow the same format as the surrounding entries — quoted string, comma at the end (except the last item in the list).
Example: adding "sodium phytate" to a list:
"Ingredients": [
"disodium EDTA",
"sodium citrate",
"sodium phytate"
]Important: Matching is case-insensitive — "Sodium Phytate" and "sodium phytate" are treated as identical. Don't add the same ingredient in multiple cases. Pick whichever looks most natural (Title Case is conventional for multi-word names).
Different spellings do need separate entries — "Sodium Lauryl Sulfate" and "Sodium Laurel Sulfate" are genuinely different strings that appear on different product labels.
Scroll to the bottom of the editor. You'll see a "Commit changes" section.
Write a short description of what you changed and why, for example:
Add sodium phytate to Chelating Agents — it's a chelating agent used in many CG-friendly products
Click "Propose changes". This creates a pull request (a proposed change) for maintainers to review.
Here's an annotated example of one rule:
{
"Name": "Sulfates to Avoid",
"Description": "These ingredients are sulfates that should be avoided.",
"Result": "danger",
"Rank": 1,
"Ingredients": [
"sodium lauryl sulfate",
"sodium laureth sulfate",
"ammonium lauryl sulfate"
]
}| Field | What it means |
|---|---|
Name |
The category name shown in results |
Description |
Shown below the category name |
Result |
danger, warning, or good (also success, which is an older alias for good) |
Rank |
Lower number = shown higher in results. Danger categories are ranked 1–4. |
Ingredients |
The list of ingredient strings to match against |
For a deeper explanation of how matching works and common pitfalls, see guides/ingredient-format.md.
The site has a glossary page for each ingredient category. Most are stubs. You can flesh them out with descriptions, context, tips, or links to helpful resources.
Browse to docs/glossary/ and click the file for the category you want to improve.
Same as before — click the pencil icon in the top right to start editing.
Add information that would help a curly hair enthusiast understand the category. For example:
- What these ingredients do
- Why they're considered CG or not-CG
- Common products that contain them
- Links to CG resources or studies
Same process as above — scroll down, write a commit message, click "Propose changes."
- Your pull request appears in the PR list
- GitHub automatically runs tests to check that the JSON is valid
- A maintainer or volunteer admin will review the change — usually within a few days
- If everything looks good, it gets merged and the site automatically updates within minutes
If the reviewer asks for changes, you'll get a notification and can make edits directly on the pull request page.